My DevOps toolsets
@ijin
May 21, 2019
JAWS-UG Yokohama #16
Slide 2
Slide 2 text
Michael H. Oshita (@ijin)
• Cloud Engineer/
Architect
• From Japan/US
• AWS community
• Serverless community
• https://ijin.github.io
Slide 3
Slide 3 text
AGENDA
• Infrastructure as Code
• Continuous Integration
• Continuous Testing
• Process Automation
Slide 4
Slide 4 text
Infrastructure as Code
Slide 5
Slide 5 text
Terraform
• Common - common
infra like rds parameter
groups, IAM service
roles, CircleCI users, etc.
• Modules - modules
based by service
• Main - simply call
modules
Slide 6
Slide 6 text
Terraform
• Retreive variables from common state file
• Use terraform workspace for env (stg/prd)
• Pass variables from module outputs
Slide 7
Slide 7 text
Terraform
• Retreive variables from common state file or
ssm parameter store
• Use terraform workspace for env (stg/prd)
• Pass variables from module outputs
Slide 8
Slide 8 text
Terraform
SSM parameter store
Chamber - CLI to manage secrets
(https://github.com/segmentio/chamber)
Slide 9
Slide 9 text
Continuous Integration
Slide 10
Slide 10 text
CircleCI
Slide 11
Slide 11 text
CircleCI
Slide 12
Slide 12 text
.circleci/config.yml
Slide 13
Slide 13 text
.circleci/config.yml
Slide 14
Slide 14 text
ecspresso
a deployment tool for Amazon ECS
(https://github.com/kayac/ecspresso)
Slide 15
Slide 15 text
Continuous Integration
Slide 16
Slide 16 text
Continuous Integration
Slide 17
Slide 17 text
Continuous Integration
Slide 18
Slide 18 text
Continuous Testing
Test environments per
git branch!
Slide 19
Slide 19 text
On-Demand ECS environments
Slide 20
Slide 20 text
Branch A
Slide 21
Slide 21 text
Branch B
Slide 22
Slide 22 text
Branch C
Slide 23
Slide 23 text
Create env
• Create target group
• Create ALB listener
• Create ECS service
• Deploy if necessary
Slide 24
Slide 24 text
Create env (reality)
• Create target group
• Create ALB listener
• Create ECS service…….wait
• Deploy if necessary
Slide 25
Slide 25 text
Destroy env
• Stop tasks
• Delete service
• Delete listener
• Delete target group