13. Infrastructure as code : Area and Cycle
Source code Build Test Deployment Production
Modern Infrastructure as Code
- Source Repo
- Library manager
- Security Inspect
- Measurement
- C.I Tools
- Golden AMI
- Measurement
- Testing as code
- Synthetic
- Load testing
- Measurement
- Deployment as
code
- Immutable
- Measurement
- GitOps
- Monitoring as
code
- Alerting as Code
- Chaos engineering
- Log management
- Analyzing
- Measurement
14. Infrastructure as code : Area and Cycle
Best practices
● Servers are never modified after they're deployed.
● If server has some problem, terminate it!
● If something needs to be updated, do deploy!
● Do troubleshooting !
But do not change something in server
● Ensure each phase is the same
● Create and use golden AMI by Packer
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
15. Best practices for deployment
Immutable infrastructure : Blue/Green Deployment #1
exists v001
new v002
1.create ASG
goployer deploy
GOPLOYER
1.Notify Slack
16. Best practices for deployment
new v002
1.create instance
goployer deploy
GOPLOYER
2.userdata boot up
exists v001
Immutable infrastructure : Blue/Green Deployment #2
17. Best practices for deployment
new v002
1.create ASG
goployer deploy
GOPLOYER
2.userdata boot up
3.health check
exists v001
3.Notify Slack
Immutable infrastructure : Blue/Green Deployment #3
18. Best practices for deployment
new v002
1.create ASG
goployer deploy
GOPLOYER
2.userdata boot up
3.health check
4.Terminate exist ASG
exists v001
Blue/Green
deployment!
4.Notify Slack
Immutable infrastructure : Blue/Green Deployment #4
19. Best practices for deployment
current v002
5.Notify Slack
goployer deploy
GOPLOYER
Immutable infrastructure : Blue/Green Deployment #5
20. Best practices for deployment
Immutable infrastructure : How about Canary ?
exists v001
new v002
1.create ASG
goployer deploy
GOPLOYER
1.Notify Slack
- Create 1 instance
- Create endpoint for the instance
2.userdata boot up
21. Best practices for deployment
new v002
1.create ASG
goployer deploy
GOPLOYER
2.userdata boot up
3.health check
4.Terminate exist ASG
exists v001
Canary
deployment!
4.Notify Slack
Immutable infrastructure : How about Canary ?
4.Increase the
number of instance
22. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● service.yaml file
23. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● If move it, measure it
● Get insight from everything
● metrics.yaml
● Dynamodb
○ Metrics for deployment : info, date
○ Metrics for server : uptime,
○ Stats : RequestCount,
24.
25. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● Enable/Disable automate testing
● Integrated with Vegeta
○ https://github.com/tsenart/vegeta
○ Simple http(s) loadtest tool
○ Support Go library
26.
27. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● Easy to use ASG
● Easy to predict
● Support spot instance
● Support scheduled instance
EC2 Pricing Model Score
(normalized RI hours + normalized Savings Plans hours
+ normalized Spot hours) / (total normalized EC2 hours)
28. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● Easy to use ASG
● Easy to predict
● Support spot instance
● Support scheduled instance
EC2 Pricing Model Score is 96%
(normalized RI hours + normalized Savings Plans hours
+ normalized Spot hours) / (total normalized EC2 hours)
29. Deployment best practices
Best practices
Immutable Infrastructure
Deployment as Code
Measurement
Test
Cost effective
Simple
● Developed by golang
● Simple commands
● Various powerful commands
goployer deploy --manifest=manifests/hello.yaml
--stack=yourstack --region=ap-northeast-2
31. DevOps 철학의 올바른 개념적 이해와
철학에 기반한 이상적인 구현을 위한
프로젝트
DevOps 의 목적인 업무 속도와 효율화를 위해 다양한
코드를 공유하고 오픈소스를 개발하고 있습니다.
- Sharing Infrastructure code for best practices
- Opensource with Terraform
- CLI for automation
- Deployment tool
- Online workshop
Github: https://github.com/DevopsArtFactory
Owner & Maintainer
- https://www.linkedin.com/in/jupitersong
- https://www.linkedin.com/in/gwonsoolee
- https://blog.2dal.com
DevOps Art
What is the project DevOps Art and purpose ?
Concept Art
Be Art from Tech
Designed by Cindy
32. DevOps 철학의 올바른 개념적 이해와
철학에 기반한 이상적인 구현을 위한 프로젝트
전직군, 전계열이 하나처럼 일하는 것
Be an Artist From a Technician
Be an Engineer From a Firefighter
Youtube 구독과 좋아요, 그리고 Github Star는 프로젝트를 만들어나가는 이들에게 큰
힘이 됩니다.
Goployer Github: https://github.com/DevopsArtFactory/goployer
Youtube: https://bit.ly/34QWr6U
DevOps Art project
DevOps Art Project
Conclusion