Autoscale κ°λ₯ν μν€ν
μ³
κΈ°λ³Έ νκ²½μ AWSλ₯Ό μ΄μ©νκ³ , κ΄λ ¨ μλ μ£Όμ μλΉμ€λ€μ λ€μ νμ κ°λ€.
virtual network environment
2.1 μν ꡬ쑰
[μΆμ²] https://bit.ly/2UwnZcD AutoScaleμ κ²½μ° Scale Outμ ν΅ν μλ² λμλ₯Ό λλ € μ²λ¦¬ λ₯λ ₯μ ν₯μ
AWS : EC2 Auto Scaling
Azure : Virtual Machine Scale Sets
3.1.1 ꡬμ±μμ
Groups : μΈμ€ν΄μ€ μ μ§μ
Configuration templates : AMI, μΈμ€ν΄μ€ νμ
, ν€νμ΄, 보μκ·Έλ£Ή λ±
Scaling options : λμ 쑰건 μ€μ
[μΆμ²] https://craig.goddenpayne.co.uk/task-autoscaling-fargate/ AMI(Amazon Machine Image)λ EC2λ₯Ό μ²μ ꡬμ±ν λ μ§μ νλ μννΈμ¨μ΄κ° ꡬμ±λ μΌμ’
μ ν
νλ¦Ώ
AMI μ’
λ₯ 1. AWS κΈ°λ³Έ μ΄λ―Έμ§ 2. AWS Marketplace μ΄λ―Έμ§ 3. Custom μ΄λ―Έμ§
3.3 νλ‘λΉμ λ(Provisioning)
μ¬μ©μμ μꡬμ λ§κ² μλ²λ₯Ό μ€μ ν΄ λμλ€κ° νμ μ μλ²λ₯Ό μ¦μ μ¬μ©ν μ μλ μνλ‘ λ―Έλ¦¬ μ€λΉν΄ λλ κ² (feat. wikipedia)
ex) JDKλ MySQLμ 미리 μ€μΉνκ±°λ μ€μ
3.3.1.1 Packer
Build Automated Machine Images 1. Builder : μ΄λ―Έμ§ μμ±ν νλ«νΌ μ§μ (AWS, Azure, Google, docker, vmware, Hyper-V, Naver...)
2. Provisioner : μ΄λ―Έμ§ μμ±ν λ μ¬μ©ν λΉλ λꡬ (Shell, Ansible, Chef, Salt, Puppet..) 3. Template : Builder + Provisioner μ€μ νμΌ (output:json)
3.3.1.2 Ansible
Configuration Management
Title Bar : Ansible is Simple IT Automation
Automation for everyone
Packerμμλ λ¬Όλ‘ shell scriptλ₯Ό ν΅ν΄μ κ΅¬μ± κ΄λ¦¬κ° κ°λ₯νλ, script λλΉ ansibleμμλ νμΌκ΄λ¦¬, ν¨ν€μ§μ€μΉ, μμ€ν
κ΄λ¦¬μ λν λͺ¨λ μ§μ
3.3.1.3 terraform
Infarstructure Provisioning
Use Infrastructure as Code to provision and manage any cloud, infrastructure, or service
κ³νμ ν΅ν΄ ν΄λΌμ°λμ λ°°ν¬(μ€μ μ μ©)μ 리μμ€μ λ³κ²½λλ λ΄μ©μ μ¬μ νμΈ κ°λ₯
Stamp Pattern
[μΆμ²] https://read.acloud.guru/immutable-ami-with-packer-a71694529d60 [μΆμ²] https://blog.gofynd.com/how-we-rebuilt-fynds-infrastructure-3238ec757281 3.4 μΆκ°μ¬ν
Blue/Green λ°°ν¬ νμ©
Scale Out Pattern
[μΆμ²] https://datacenterrookie.wordpress.com/2017/05/10/bluegreen-deployment-on-aws/ Weight Transition Pattern
[μΆμ²] https://aws.amazon.com/blogs/startups/upgrades-without-tears-part-2-bluegreen-deployment-step-by-step-on-aws/