๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ›  Infrastructure34

Github Action ๊ณผ Elastic Beanstalk ๋กœ ์„œ๋ฒ„ ๋ฐฐํฌํ•˜๊ธฐ - Github Actions ์ •์˜ํ•˜๊ธฐ ํ•ด๋‹น ์‹œ๋ฆฌ์ฆˆ๋Š” 3๊ฐœ์˜ ๊ธ€๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ๋‹จ๊ณ„์˜ ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ์กฐํ•ด์ฃผ์„ธ์š” 1ํŽธ Spring Boot ์„œ๋ฒ„ ์ƒ์„ฑํ•˜๊ธฐ 2ํŽธ Elastic Beanstalk ์ƒ์„ฑํ•˜๊ธฐ 3ํŽธ Github Actions ์ •์˜ํ•˜๊ธฐ ํ•ด๋‹น ๊ธ€์˜ ์‹ค์Šต ์ฝ”๋“œ ๋ฐ github repository ์ง€๋‚œ ์‹œ๊ฐ„... ์ง€๋‚œ ์‹œ๊ฐ„ ์šฐ๋ฆฌ๋Š” Spring Boot ๋ฅผ ์ด์šฉํ•ด์„œ Application ์„œ๋ฒ„๋ฅผ ์ƒ์„ฑํ–ˆ๊ณ  Elastic Beanstalk ๋ฅผ ์ƒ์„ฑ ํ–ˆ๋‹ค. ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” Github Actions ๋ฅผ ์ด์šฉํ•˜์—ฌ Master branch ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์žˆ๋‹ค๋ฉด ์ž๋™์œผ๋กœ ๋ฐฐํฌํ•˜๋Š” ๋ฐฐํฌ ์ž๋™ํ™”์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด์ž. Github Actions ์— ๋Œ€ํ•ด์„œ ๋” ์ž์„ธํžˆ Github Actions ๋Š” ๊นƒํ—ˆ๋ธŒ์—์„œ ๊ณต์‹์ ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” workflow ์ž.. 2022. 1. 23.
Github Action ๊ณผ Elastic Beanstalk ๋กœ ์„œ๋ฒ„ ๋ฐฐํฌํ•˜๊ธฐ - EB ์ƒ์„ฑํ•˜๊ธฐ ํ•ด๋‹น ์‹œ๋ฆฌ์ฆˆ๋Š” 3๊ฐœ์˜ ๊ธ€๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ๋‹จ๊ณ„์˜ ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ์กฐํ•ด์ฃผ์„ธ์š” 1ํŽธ Spring Boot ์„œ๋ฒ„ ์ƒ์„ฑํ•˜๊ธฐ 2ํŽธ Elastic Beanstalk ์ƒ์„ฑํ•˜๊ธฐ 3ํŽธ Github Actions ์ •์˜ํ•˜๊ธฐ ํ•ด๋‹น ๊ธ€์˜ ์‹ค์Šต ์ฝ”๋“œ ๋ฐ github repository ์ง€๋‚œ ์‹œ๊ฐ„... ์ง€๋‚œ ์‹œ๊ฐ„ ์šฐ๋ฆฌ๋Š” Spring Boot ๋ฅผ ์ด์šฉํ•ด์„œ Application ์„œ๋ฒ„๋ฅผ ์ƒ์„ฑํ–ˆ๊ณ  github ์— push ํ•˜๋Š” ์ž‘์—…๊นŒ์ง€ ๋งˆ์ณค๋‹ค. ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” Elastic Beanstalk ์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๊ณ  ์‹ค์ œ๋กœ ์ƒ์„ฑ์„ ํ•ด๋ณด๋„๋ก ํ•˜์ž. Elastic Beanstalk ์— ๋Œ€ํ•ด์„œ ๋” ์ž์„ธํžˆ Elastic Beanstalk ์— ๋Œ€ํ•ด์„œ ๋‹ค์‹œ ํ•œ ๋ฒˆ ์ •์˜ํ•ด๋ณด์ž. Elastic Beanstalk ๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰ํ•˜๋Š” .. 2022. 1. 23.
Github Action ๊ณผ Elastic Beanstalk ๋กœ ์„œ๋ฒ„ ๋ฐฐํฌํ•˜๊ธฐ - Spring Boot ์„œ๋ฒ„ ์ƒ์„ฑํ•˜๊ธฐ ํ•ด๋‹น ์‹œ๋ฆฌ์ฆˆ๋Š” 3๊ฐœ์˜ ๊ธ€๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ๋‹จ๊ณ„์˜ ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ์กฐํ•ด์ฃผ์„ธ์š” 1ํŽธ Spring Boot ์„œ๋ฒ„ ์ƒ์„ฑํ•˜๊ธฐ 2ํŽธ Elastic Beanstalk ์ƒ์„ฑํ•˜๊ธฐ 3ํŽธ Github Actions ์ •์˜ํ•˜๊ธฐ ํ•ด๋‹น ๊ธ€์˜ ์‹ค์Šต ์ฝ”๋“œ ๋ฐ github repository ๋™๊ธฐ ์ตœ๊ทผ ์‚ฌ๋‚ด์—์„œ ์ƒˆ๋กญ๊ฒŒ ๊ฐœ๋ฐœํ•˜๋Š” ์„œ๋ฒ„๋ฅผ EB ์™€ Github Action ์„ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌ ์ž๋™ํ™” ๊ตฌ์„ฑ์„ ํ•˜๋Š” ๊ธฐํšŒ๊ฐ€ ์ƒ๊ฒผ์—ˆ๋‹ค. ์ง€๊ธˆ๊นŒ์ง€ ํ•ด๋ดค๋˜ CI/CD, ๋ฐฐํฌ ์ž๋™ํ™”๋Š” ๋‹ค์Œ 2๊ฐœ์ด๋‹ค. Travis CI + CodeDeploy EC2 + Jenkins ์ฒ˜์Œ ์ž๋™ํ™”์— ๋Œ€ํ•ด์„œ ํ•™์Šตํ•  ๋•Œ Elastic Beanstalk ์— ๋Œ€ํ•œ ํ›„๊ธฐ๋Š” ๊ฑฐ์˜ ๋ชป๋ณด๋‹ค ์‹ถ์ด ํ–ˆ์ง€๋งŒ ํ˜„์žฌ๋Š” EB ์™€ Github Action ์— ๋Œ€ํ•œ ์„ฑ๊ณต ์ผ€์ด์Šค๊ฐ€ ๋งŽ์•„.. 2022. 1. 23.
[๋ฆฌ๋ˆ…์Šค] gcc ๋กœ c ์–ธ์–ด๋กœ ์ž‘์„ฑ๋œ ์†Œ์Šค ์ฝ”๋“œ ์ปดํŒŒ์ผํ•˜๊ธฐ (ํ—ค๋” ํŒŒ์ผ๋กœ ๋‚˜๋ˆ ์„œ ์ปดํŒŒ์ผํ•˜๊ธฐ) ์šฐ๋ฆฌ๊ฐ€ ์ผ๋ฐ˜์ ์œผ๋กœ c ์–ธ์–ด๋ฅผ ์ปดํŒŒ์ผํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Visual Studio๋‚˜ CLion ์„ ์ด์šฉํ•ด์„œ Run ํ˜น์€ Debugging ์„ ํ•˜์˜€์—ˆ๋‹ค. ํ•˜์ง€๋งŒ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์—์„œ๋Š” Visual Studio ๋‚˜ CLion ์„ ์„ค์น˜ํ•˜๊ธฐ๋ž€ ๋งค์šฐ ๊นŒ๋‹ค๋กญ๊ณ  QT-Creator ๊ณผ ๊ฐ™์€ ํ”„๋กœ๊ทธ๋žจ์„ ์ด์šฉํ•ด์•ผ ํ•œ๋‹ค. ์ด๋ ‡๊ฒŒ IDE๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์ ˆ๋Œ€ ์•ˆ๋˜๋Š” ๊ฒƒ์€ ์•„๋‹ˆ์ง€๋งŒ, ๊ทธ๊ฒƒ๋ณด๋‹ค ํ„ฐ๋ฏธ๋„์—์„œ g++์ด๋‚˜ gcc ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด์„œ ์ปดํŒŒ์ผํ•˜๋Š” ํŽธ์ด ์˜คํžˆ๋ ค ๋” ํŽธํ•  ๋–„๊ฐ€ ์žˆ๋‹ค. ์˜ค๋Š˜์€ ํ„ฐ๋ฏธ๋„์—์„œ gcc ๋กœ c ์–ธ์–ด๋ฅผ ์ปดํŒŒ์ผํ•˜๊ณ  object ํŒŒ์ผ์„ ๋งŒ๋“œ๋Š” ๊ฒƒ์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณผ ๊ฒƒ์ด๋‹ค. ๋ฆฌ๋ˆ…์Šค์—์„œ c ์–ธ์–ด ์ปดํŒŒ์ผํ•˜๊ธฐ ์šฐ์„  gcc ๋‚˜ g++ ์„ ์„ค์น˜ํ•ด์•ผ ํ•˜๋ฏ€๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์ด apt๋ฅผ ํ†ตํ•ด์„œ g++, gcc ๋ฅผ ์„ค์น˜ํ•ด์ฃผ์ž. apt-get ์„ ์‚ฌ์šฉ.. 2021. 7. 16.