๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

DevOps/AWS6

AWS CloudWatch๋ฅผ ํ†ตํ•ด CPU ์‚ฌ์šฉ๋Ÿ‰ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ธฐ ๐Ÿ“Ž AWS CloudWatch๋ฅผ ํ†ตํ•ด CPU ์‚ฌ์šฉ๋Ÿ‰ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š”, ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” AWS์—์„œ ์ œ๊ณตํ•˜๋Š” ์„œ๋น„์Šค ์ค‘ ํ•˜๋‚˜์ธ CloutWatch๋ฅผ ํ†ตํ•ด EC2 ์ธ์Šคํ„ด์Šค์˜ CPU ์‚ฌ์šฉ๋Ÿ‰์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜์—ฌ ์ด๋ฉ”์ผ๋กœ ์•Œ๋ฆผ์„ ๋ณด๋‚ด์ฃผ๋Š” ์„ค์ •์„ ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. AWS ๊ณต์‹๋ฌธ์„œ Amazon CloudWatch๋Š” DevOps ์—”์ง€๋‹ˆ์–ด, ๊ฐœ๋ฐœ์ž, SRE(์‚ฌ์ดํŠธ ์•ˆ์ •์„ฑ ์—”์ง€๋‹ˆ์–ด) ๋ฐ IT ๊ด€๋ฆฌ์ž๋ฅผ ์œ„ํ•ด ๊ตฌ์ถ•๋œ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๊ด€์ฐฐ ๊ธฐ๋Šฅ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. CloudWatch๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ , ์‹œ์Šคํ…œ ์ „๋ฐ˜์˜ ์„ฑ๋Šฅ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์— ๋Œ€์‘ํ•˜๋ฉฐ, ๋ฆฌ์†Œ์Šค ์‚ฌ์šฉ๋ฅ ์„ ์ตœ์ ํ™”ํ•˜๊ณ , ์šด์˜ ์ƒํƒœ์— ๋Œ€ํ•œ ํ†ตํ•ฉ๋œ ๋ณด๊ธฐ๋ฅผ ํ™•๋ณดํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ์™€ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ํ†ต์ฐฐ๋ ฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. CloudWatch๋Š” ๋กœ๊ทธ, ์ง€ํ‘œ ๋ฐ ์ด๋ฒคํŠธ ํ˜•ํƒœ๋กœ ๋ชจ๋‹ˆํ„ฐ.. 2021. 8. 6.
AWS Amazon S3 ๋ฒ„ํ‚ท ์ƒ์„ฑํ•˜๊ธฐ ๐Ÿ“Ž AWS Amazon S3 ๋ฒ„ํ‚ท ์ƒ์„ฑํ•˜๊ธฐ(Sipmle Storage Service) ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด๋ฒˆ์—๋Š” AWS์—์„œ Amazon S3 ๋ฒ„ํ‚ท์„ ์ƒ์„ฑํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค :) ๋จผ์ € S3์„ ์ƒ์„ฑํ•˜๊ธฐ ์ „์—, S3๋ž€ ๋ฌด์—‡์ธ์ง€ ๊ฐ„๋žตํžˆ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๐ŸŽฏ Amazon S3 Amazon S3๋ž€, Simple Storage Service์˜ ์•ฝ์ž๋กœ ์ธํ„ฐ๋„ท์šฉ ์Šคํ† ๋ฆฌ์ง€ ์ž…๋‹ˆ๋‹ค. Amazon S3๋Š” ์›น์ƒ์—์„œ, ์–ธ์ œ ์–ด๋””๋“ ์ง€ ์›ํ•˜๋Š” ์–‘์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ๊ฒ€์ƒ‰ํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ„๋‹จํ•œ ์›น ์„œ๋น„์Šค ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. Amazon S3์˜ ํŠน์ง•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. REST ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด ์ €์žฅ / ์‚ญ์ œ / ์กฐํšŒ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ฃผ๋กœ ์ด๋ฏธ์ง€ ํŒŒ์ผ, ์ •์  ๋ฆฌ์†Œ์Šค ๋“ฑ์„ S3์— ์˜ฌ๋ ค๋†“๊ณ  ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๊ตฌ์„ฑ์ด ์ข‹์Šต๋‹ˆ๋‹ค.(๋ฐ์ดํ„ฐ ์œ ์‹ค ๊ฐ€.. 2021. 7. 9.
AWS EC2 ์„œ๋ฒ„ ์ ‘์†ํ•˜๊ธฐ (๋งฅ๋ถOS m1) • ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด์ „์— ์šด์˜ํ•˜๋˜ ๋ธ”๋กœ๊ทธ ๋ฐ GitHub, ๊ณต๋ถ€ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋Š” Study-GitHub ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค! • ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ • GitHub • Study-GitHub • ๐Ÿ” ๐Ÿ“Ž ๋งฅOS์—์„œ AWS EC2 ์„œ๋ฒ„ ์ ‘์†ํ•˜๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š”~ ํ˜„์žฌ AWS์˜ ํ”„๋ฆฌํ‹ฐ์–ด์—์„œ ๋ฌด๋ฃŒ๋กœ(?) ์‚ฌ์šฉ์„ ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ „๊นŒ์ง€๋Š” ์œˆ๋„์šฐ๋ฅผ ์‚ฌ์šฉํ•˜๋‹ค๋ณด๋‹ˆ PuTTY๋ฅผ ํ†ตํ•ด AWS์˜ ์ธ์Šคํ„ด์Šค์— ์ ‘์†์„ ํ–ˆ์—ˆ๋Š”๋ฐ, ์ด๋ฒˆ์— ๋งฅ๋ถ์„ ์ƒˆ๋กœ ์‚ฌ๋ฉด์„œ๋Š” ๋”์ด์ƒ ์œˆ๋„์šฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์—, ๋งฅOS์—์„œ AWS์˜ ์ธ์Šคํ„ด์Šค๋กœ ์ ‘์†ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Mac์—์„œ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ํ„ฐ๋ฏธ๋„(iTerm2)๋ฅผ ์ด์šฉํ•ด ์ ‘์†์„ ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ”๋กœ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~ ๐ŸŽฏ ssh key ์ƒ์„ฑํ•˜๊ธฐ ๋จผ์ € ์ด์ „์— ์ƒ์„ฑ๋œ key๊ฐ€ ์žˆ๋Š”์ง€ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด .. 2021. 5. 13.
AWS EC2 iptables๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„ ํฌํŠธ ํฌ์›Œ๋”ฉ(HTTP 80 -> Tomcat 8080) • ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด์ „์— ์šด์˜ํ•˜๋˜ ๋ธ”๋กœ๊ทธ ๋ฐ GitHub, ๊ณต๋ถ€ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋Š” Study-GitHub ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค! • ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ • GitHub • Study-GitHub • ๐Ÿ” โœ” AWS EC2 ์„œ๋ฒ„ ํฌํŠธ ํฌ์›Œ๋”ฉ(HTTP 80 -> Tomcat 8080) ์•ˆ๋…•ํ•˜์„ธ์š”, ์ด๋ฒˆ์— ์ •๋ฆฌํ•  ๋‚ด์šฉ์€ AWS EC2์œ„์˜ ์„œ๋ฒ„์—์„œ iptables ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ํฌํŠธ ํฌ์›Œ๋”ฉ(80 -> 8080)์„ ์ง„ํ–‰ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๐ŸŽ— ์™œ 80ํฌํŠธ๋ฅผ 8080ํฌํŠธ๋กœ ํฌ์›Œ๋”ฉ์„ ํ•ด์•ผํ• ๊นŒ์š”? ํ˜„์žฌ ์ €๋Š” AWS EC2์— ์Šคํ”„๋ง ๋ถ€ํŠธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ฐฐํฌํ•œ ์ƒํƒœ์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— IP๋ฅผ ํ†ตํ•ด ์ ‘๊ทผํ•˜๋ ค๋ฉด IP ๋’ค์— ํ†ฐ์บฃ์˜ ํฌํŠธ(8080) ์„ ๋ถ™์—ฌ์•ผ ์ ‘์†์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. - 15.162.211.192:8080 ๋งŒ์•ฝ 80 ํฌํŠธ๋ฅผ 808.. 2021. 4. 30.
AWS EC2 ์ธ์Šคํ„ด์Šค ์ƒ์„ฑํ•˜๊ธฐ • ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด์ „์— ์šด์˜ํ•˜๋˜ ๋ธ”๋กœ๊ทธ ๋ฐ GitHub, ๊ณต๋ถ€ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋Š” Study-GitHub ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค! • ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ • GitHub • Study-GitHub • ๐Ÿ” โœ” AWS EC2(Elastic Compute Cloud) ์ธ์Šคํ„ด์Šค ์ƒ์„ฑํ•˜๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด๋ฒˆ ์‹œ๊ฐ„์— ์ •๋ฆฌํ•  ๋‚ด์šฉ์€ AWS์—์„œ EC2 ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. AWS์— ํšŒ์› ๊ฐ€์ž…์€ ๋˜์–ด ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ  ์ž‘์„ฑํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ! ๋จผ์ € ๋ณธ์ธ์˜ ๋ฆฌ์ „์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋ฆฌ์ „์ด๋ž€? AWS์˜ ์„œ๋น„์Šค๊ฐ€ ๊ตฌ๋™๋  ์ง€์—ญ์„ ์ด์•ผ๊ธฐํ•ฉ๋‹ˆ๋‹ค. AWS๋Š” ๋„์‹œ๋ณ„๋กœ ํด๋ผ์šฐ๋“œ ์„ผํ„ฐ๋ฅผ ์ง€์–ด ํ•ด๋‹น ์„ผํ„ฐ์—์„œ ๊ตฌ์ถ•๋œ ๊ฐ€์ƒ๋จธ์‹ ๋“ค์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ์ด๋ฅผ ๋ฆฌ์ „์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์„œ์šธ ๋ฆฌ์ „์ด ์ƒ๊ธฐ๊ธฐ ์ „๊นŒ์ง€๋Š” ๊ตญ๋‚ด ์„œ๋น„์Šค๋“ค์€ ๋„์ฟ„ ๋ฆฌ์ „์„ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ์š”, ํ•œ๊ตญ๊ณผ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ง€.. 2021. 4. 19.
AWS RDS ์™ธ๋ถ€ ์ ‘์† • ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด์ „์— ์šด์˜ํ•˜๋˜ ๋ธ”๋กœ๊ทธ ๋ฐ GitHub, ๊ณต๋ถ€ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋Š” Study-GitHub ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค! • ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ • GitHub • Study-GitHub • ๐Ÿ” โœ” AWS RDS ์™ธ๋ถ€ ์ ‘์† ์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด๋ฒˆ์— ์ •๋ฆฌํ•  ๋‚ด์šฉ์€ AWS RDS์˜ DB์— ์™ธ๋ถ€ IP์—์„œ ์ ‘์†ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์ด๋ฒˆ์— RDS์— DB(MySQL)์„ ์ƒ์„ฑํ•œ ํ›„ ๋กœ์ปฌPC์—์„œ๋Š” DB ์ ‘์†์ด ์ •์ƒ์ ์œผ๋กœ ๋˜์—ˆ์œผ๋‚˜, ๋‹ค๋ฅธ ๋ถ„(์™ธ๋ถ€PC)์—์„œ๋Š” DB ์ ‘์†์— Commnuications link failure ~ connect timed out ์ด๋ผ๋Š” ์˜ค๋ฅ˜๊ฐ€ ๋œจ๋ฉด์„œ ์ ‘์†์ด ์•ˆ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. RDS์— DB๋ฅผ ์ƒ์„ฑํ•œ ํ›„ ์™ธ๋ถ€ IP์—์„œ ์ ‘์†์„ ํ—ˆ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‘ ๊ฐ€์ง€ ์„ค์ •์„ ํ•ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๐ŸŽต ํผ๋ธ”๋ฆญ ์•ก์„ธ์Šค ํ—ˆ์šฉ ๋จผ์ € RDS์— ํผ๋ธ”๋ฆญ ์•ก.. 2021. 4. 10.
๋ฐ˜์‘ํ˜•