๋กœ์ผ“๐Ÿพ
article thumbnail

 

 

 

์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํ™˜๊ฒฝ์—์„  ARC ๋ฅผ ์ด์šฉํ•˜๋ฉด ์–ด๋ ต์ง€ ์•Š๊ฒŒ ๋‹ค์–‘ํ•œ OS ์œ„์— ์˜คํ† ์Šค์ผ€์ผ๋ง์— ๊ธฐ๋ฐ˜ํ•œ Runner ๊ตฌํ˜„์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

Karpenter ์™€ ํ•จ๊ป˜๋ผ๋ฉด ๋” ํšจ์œจ์ ์ด์ฃ .

(Karpenter ๊ณผ ๊ถ๊ธˆํ•˜๋‹ค๋ฉด ์—ฌ๊ธฐ ์ฐธ๊ณ , ARC ๊ฐ€ ๊ถ๊ธˆํ•˜๋‹ค๋ฉด ์—ฌ๊ธฐ ์ฐธ๊ณ )

 

๋˜ํ•œ EKS ์—์„œ Linux ์™€ Windows ๊ธฐ๋ฐ˜์˜ ๋…ธ๋“œ๋ฅผ ์ง€์›ํ•ด์ฃผ๊ธฐ ๋•Œ๋ฌธ์— ๋„์šฐ๊ธฐ๋งŒ ํ•œ๋‹ค๋ฉด ํŒŒ๋“œ ๋‹จ์œ„๋กœ Runner ๋ฅผ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

(EKS ์—์„œ Windows ๋ฅผ ํ™œ์„ฑํ™” ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ๊ถ๊ธˆํ•˜๋‹ค๋ฉด ์—ฌ๊ธฐ ์ฐธ๊ณ )

 

ํ•˜์ง€๋งŒ MacOS ๋Š” ์–˜๊ธฐ๊ฐ€ ๋‹ฌ๋ผ์š”..

EKS ์—์„œ ์ง€์›์„ ์•ˆํ•ด์ค๋‹ˆ๋‹ค.. ๊ทธ๋ž˜์„œ ๋งŒ์•ฝ MacOS ๊ธฐ๋ฐ˜์˜ ์›Œ์ปค ๋…ธ๋“œ๋ฅผ ํ”„๋กœ๋น„์ €๋‹ ํ•˜๋ ค๊ณ  ํ•œ๋‹ค๋ฉด, ์•„๋งˆ MacOS ๊ธฐ๋ฐ˜์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ๋„์šด ํ›„ ๊ฑฐ๊ธฐ์„œ ์ˆ˜๋™์œผ๋กœ EKS ํด๋Ÿฌ์Šคํ„ฐ์— ์กฐ์ธํ•ด์•ผ ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

๋ฟ๋งŒ ์•„๋‹ˆ๋ผ, Runner ์ด๋ฏธ์ง€๋Š” Linux ๋งŒ ์ง€์›๋˜์„œ MacOS ๊ธฐ๋ฐ˜์œผ๋กœ ๋˜ ๋งŒ๋“ค์–ด์•ผ ํ•˜์ฃ .

 

๊ด€๋ฆฌ ์š”์†Œ๊ฐ€ ๋งŽ์•„์ง€๋Š” ๊ฑด ๋‘˜์งธ์น˜๊ณ , ๊ฐ€์žฅ ํฐ ๋ฌธ์ œ๋Š” MacOS x86 ํ•œ๋‹ฌ ๋น„์šฉ์ด ์•ฝ 130๋งŒ์› ์ •๋„ ๋ฉ๋‹ˆ๋‹ค. ๋„ˆ๋ฌด ๋น„์‹ธ์š”.

mac x86 ๋น„์šฉ

 

AWS ์ธ์Šคํ„ด์Šค๋Š” ์„ ํƒ์˜ ์—ฌ์ง€ ์—†์ด ํฌ๊ธฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 

๊ทธ๋ž˜์„œ ๊ฒฐ๊ตญ MacBook Intel ์— ์ง์ ‘ Runner ๋ฅผ ์‹คํ–‰ ์‹œํ‚ค๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์˜ค๋Š˜์€ ๊ทธ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค.

 

๋ ›์ธ ๋‘๋”์ฝ”๋“œ~

 

 

Runner ๋ฅผ ๋“ฑ๋กํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๊นƒํ—™ ๊ณต์‹ ๋ฌธ์„œ์— ๋„ˆ๋ฌด ์ž˜ ๋‚˜์™€ ์žˆ์–ด์š”.

๋ณด๊ณ  ๋”ฐ๋ผํ•œ๋‹ค๋ฉด ์–ด๋ ต์ง€ ์•Š๊ฒŒ ๋“ฑ๋กํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

๊นƒํ—™์œผ๋กœ ๋“ค์–ด๊ฐ€์„œ ์•„๋ž˜์™€ ๊ฐ™์€ ํƒญ์„ ํด๋ฆญํ•˜๋ฉด OS ๋ณ„ ์ปค๋งจ๋“œ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ๋ฐ, ์ด๊ฑธ ์กฐ๊ธˆ๋งŒ ๋ฐ”๊ฟ”์„œ ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

MacOS, Windows, Linux ๊ทธ๋ฆฌ๊ณ  arm64, x86 ์ด ์žˆ๋Š”๋ฐ ๊ตฌ๋ถ„ ์ž˜ํ•ด์„œ ํ•˜์ž! x86 ์—์„œ arm64 ๋‹ค์šด ๋ฐ›๊ณ  ์™œ ์•ˆ๋˜์ง€ ๋ผ๋Š” ๋ป˜์ง“์€ ํ•˜์ง€ ๋ง์ž! (๋‚ด๊ฐ€ ๊ทธ๋žฌ๋‹ค..)

 

 

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. #Configure ๋ถ€๋ถ„์ด ๋ฐ”๋€Œ์—ˆ๋Š”๋ฐ ๊ทธ ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ๋Š” ์•„๋ž˜์—์„œ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

$ mkdir actions-runner && cd actions-runner 
$ curl -o actions-runner-osx-x64-2.311.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-osx-x64-2.311.0.tar.gz 
$ echo "f4d8d1dd850fd0889e0d250c82fa587b0e21934f8441143ee6772284b2ae6211  actions-runner-osx-x64-2.311.0.tar.gz" | shasum -a 256 -c 
$ tar xzf ./actions-runner-osx-x64-2.311.0.tar.gz

#Configure
$ ./config.sh --name runner-macos-x86-01 --url https://github.com/<my-org> --runnergroup "my-group" --token "my-token" --labels macos,x86,my-runner --unattended --replace # you can add --ephemeral 
$ ./svc.sh install
$ ./svc.sh start

 

 

--ephemeral ์˜ต์…˜์€ ์˜คํ† ์Šค์ผ€์ผ๋ง ํ™˜๊ฒฝ์— ์ ํ•ฉํ•œ ์˜ต์…˜์ด๋ฏ€๋กœ ์—ฌ๊ธฐ์„  ์ง€์ •ํ•ด์ฃผ์ง€ ์•Š๊ฒ ์Šต๋‹ˆ๋‹ค.

์ฐธ๊ณ ๋กœ ARC ์—์„œ ํŒŒ๋“œ ๋‹จ์œ„์˜ Runner ์—๋Š” --ephemeral ์˜ต์…˜์ด ๋ถ€์—ฌ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

 

๋˜ํ•œ ํ† ํฐ์€ 1์‹œ๊ฐ„ ๋’ค์— ๋งŒ๋ฃŒ๋˜์„œ ์žฌ๋ฐœ๊ธ‰์„ ๋ฐ›์•„์•ผ ํ•˜๋Š”๋ฐ API ๋ฅผ ํ†ตํ•ด ์–ด๋ ต์ง€ ์•Š๊ฒŒ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค๋งŒ ๊ถŒํ•œ์— ์œ ์˜ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค. (๊ด€๋ จ ๋ฌธ์„œ๋Š” ์—ฌ๊ธฐ ์ฐธ๊ณ )

$ curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/runners/registration-token

 

 

๊ทธ๋Ÿผ ์ด์ œ ์œ„์œ„ ์ฝ”๋“œ #Configure ์— ๋ช…์‹œ๋˜์–ด ์žˆ๋Š” ๋ช…๋ น์–ด๋ฅผ ์ฐจ๋ก€๋Œ€๋กœ ์‹คํ–‰ํ•ด์ค๋‹ˆ๋‹ค.

./config.sh ๋ฅผ ํ†ตํ•ด์„œ ์šฐ์„  ์ธ์ฆ์„ ํ•ด์ค๋‹ˆ๋‹ค.

 

๋‹ค์Œ์€ ./svc.sh install ์„ ํ•ด์ค๋‹ˆ๋‹ค. 

run.sh ๊ฐ€ ์•„๋‹Œ svc.sh ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์ด์œ ๋Š” ๋‹จ์ˆœํžˆ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์•„๋‹Œ ๋ฐ๋ชฌ(์„œ๋น„์Šค)๋กœ ๋“ฑ๋กํ•˜๊ธฐ ์œ„ํ•จ์ž…๋‹ˆ๋‹ค.

๋ฐ๋ชฌ์œผ๋กœ ๋“ฑ๋กํ•˜์ง€ ์•Š๋Š” ๋‹ค๋ฉด, Mac ์ด ์žฌ๋ถ€ํŒ…๋  ๊ฒฝ์šฐ ์ˆ˜๋™์œผ๋กœ ๋‹ค์‹œ ์‹คํ–‰์‹œ์ผœ์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด์ฃ .

์„ฑ๊ณต์ ์œผ๋กœ ๋๋‹ค๋ฉด plist ๋ผ๋Š” ํŒŒ์ผ์ด ์ƒ์„ฑ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

 

๋‹ค์Œ์€ ./svc.sh start ์ž…๋‹ˆ๋‹ค.

์ด ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ๋Š” ์•ˆ๋˜๋Š” ๋ถ„๋“ค์ด ์žˆ์„๊ฑฐ์—์š”.

(์ € ๊ฐ™์€ ๊ฒฝ์šฐ Root ์ด ์•„๋‹Œ Runner ๋ผ๋Š” Mac ์œ ์ €๋ฅผ ๋งŒ๋“ค์—ˆ๊ณ , Runner ์œ ์ €๋กœ ์‹คํ–‰ํ–ˆ๋”๋‹ˆ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.)

 

๋‹คํ–‰ํžˆ ์—๋Ÿฌ ๊ด€๋ จํ•ด์„œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. (์—ฌ๊ธฐ ์ฐธ๊ณ )

๋‹ค์–‘ํ•œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์ด ๋งŽ์€๋ฐ ์ €๋Š” ์ด ๋ฐฉ๋ฒ•์„ ํƒํ–ˆ์Šต๋‹ˆ๋‹ค.

 

./svc.sh start ๊ฐ€ ๋ฌธ์ œ ์—†์ด ์‹คํ–‰๋๋‹ค๋ฉด, ์ด์ œ ./svc.sh status ๋ฅผ ํ†ตํ•ด ์ƒํƒœ ํ™•์ธ์„ ํ•ด์ค๋‹ˆ๋‹ค.

 

๊ทธ๋ฆฌ๊ณ  ์‹ค์ œ๋กœ๋„ ๋“ฑ๋ก์ด ์•„์ฃผ ์ž˜ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

 

 

๊ทธ๋Ÿฐ๋ฐ ์—ฌ๊ธฐ์„œ ๋ฌธ๋“ ํ•œ๊ฐ€์ง€ ์ƒ๊ฐ์ด ๋– ์˜ฌ๋ž์Šต๋‹ˆ๋‹ค.. ์šฐ๋ฆฌ๋Š” ์œ„์—์„œ Runner ๋ฅผ ๋ฐ๋ชฌ์œผ๋กœ ๋“ฑ๋กํ–ˆ์ฃ .

๊ทธ ๋ง์€ ์ฆ‰์Šจ, ํ•˜๋‚˜์˜ ํ˜ธ์ŠคํŠธ์— ์—ฌ๋Ÿฌ ๊ฐœ์˜ Runner ๋“ฑ๋ก์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๋ง์ด์ฃ !

 

Runner ๋ฅผ ๊ตฌ๋ถ„ ์ง“๋Š” ํด๋”๋ฅผ 2๊ฐœ ๋” ๋งŒ๋“  ํ›„, ์œ„ ๊ณผ์ •์„ ๋ฐ˜๋ณตํ–ˆ์Šต๋‹ˆ๋‹ค.

 

 

๊ทธ๋ฆฌ๊ณ  ์„ฑ๊ณต์ ์œผ๋กœ 2๊ฐœ ๋” ์ถ”๊ฐ€์ ์ธ Runner ๋ฅผ ๋“ฑ๋กํ–ˆ์Šต๋‹ˆ๋‹ค!

 

 

์˜ค๋Š˜์€ MacOS ์— Runner ๋ฅผ ์—ฌ๋Ÿฌ ๊ฐœ ๋“ฑ๋กํ•˜๋Š” ๋ฐฉ๋ฒ•์— ์•Œ์•„๋ดค์Šต๋‹ˆ๋‹ค.

ํ•˜๋ฉด์„œ ๋Š๋‚€ ์ ์ด ์žˆ๋‹ค๋ฉด, ARC ๊ฐ€ ํ›จ~~~~~์”ฌ ํŽธํ•˜๋‹ค ์˜€์Šต๋‹ˆ๋‹ค.

 

๊ทธ๋Ÿผ ์˜ค๋Š˜์€ ์—ฌ๊ธฐ๊นŒ์ง€!

profile on loading

Loading...