SlideShare a Scribd company logo
1 of 38
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
Interstella GTC: CI/CD for
Containers on AWS
C O N 3 1 9
H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t
A n d y M u i , A W S S o l u t i o n s A r c h i t e c t
D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t
N o v e m b e r 3 0 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
CI/CD for Containers on AWS
H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t
A n d y M u i , A W S S o l u t i o n s A r c h i t e c t
D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t
C O N 3 1 9
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ABOOT ME
Hubert Cheung hubertc@amazon.com
Solutions Architect
Canuck
@ AWS 5 Years
- AWS Support
- AWS Solutions Architecture
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHAT TO EXPECT FROM THIS WORKSHOP
Release Processes
CI/CD on AWS
• Amazon EC2
• AWS CodeCommit
• AWS CodePipeline
• AWS CodeBuild
• Amazon ECS Deployments
Hands on lab
• Workshop Architecture/Goals
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RELEASE PROCESS PHASES
Source Build Test Production
• Integration
tests with
other systems
• Load testing
• UI tests
• Penetration
testing
• Check-in
source code
such as
Dockerfiles
• Peer review
new code
• Compile code
• Unit tests
• Style checkers
• Code metrics
• Create
container
images
• Deployment
to production
environments
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RELEASE PROCESS PHASES
Source Build Test Production
Continuous integration
Continuous delivery
Continuous deployment
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHY SHOULD I CARE ABOUT CI/CD?
• Velocity
• Improved Productivity and Efficiency
• Reduced Risk
• Shorter Feedback Loop
• Automation!
Source: xkcd - https://xkcd.com/1629/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CHALLENGES
• Automation!
• Metrics and Monitoring
• Legacy processes
• Legacy…anything
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
COMMON PATTERNS AND SOLUTIONS
Automate as much as possible
• Start small. Don’t try to automate everything
Microservices
Strict API Contracts
• Get expected outputs from teams consuming your
service
Testing
• Mandate arbitrary number of tests to start
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild Third Party
Tooling
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild Third Party
Tooling
Amazon Elastic
Container Service
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild Third Party
Tooling
Amazon Elastic
Container Service
AWS CodePipeline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE AUTOMATE AUTOMATE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild Third Party
Tooling
Amazon Elastic
Container
Service
AWS CodePipeline
AWS CodeStar
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AUTOMATE INFRASTRUCTURE AS CODE!
Source Build Test Production
AWS CodeCommit AWS CodeBuild Third Party
Tooling
AWS CodePipeline
AWS
CloudFormation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CODECOMMIT
Fully managed Git service
Available in all public AWS Regions
Data encrypted at rest with a customer-specific
AWS KMS key
Integrated with IAM and AWS CloudTrail for
security and compliance
Extensible through Amazon CloudWatch Events
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CODEBUILD
Fully managed build service that compiles source
code, runs tests, and produces software packages
Scales continuously and processes multiple builds
concurrently
Custom build environments suited to your needs via
Docker images
Only pay by the minute for the compute resources
you use
AWS CodePipeline and Jenkins integration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HOW DOES AWS CODEBUILD WORK?
1. Downloads source code
2. Executes commands configured in the
buildspec in temporary compute
containers (created fresh on every build)
3. Streams the build output to the service
console and CloudWatch logs
4. Uploads the generated artifact to an
Amazon S3 bucket
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SAMPLE BUILDSPEC.YML
Variables to be used by
phases of build
Examples phases of a build:
• Install packages or run commands to
prepare your environment in ”install”.
• Run syntax checking, commands in
“pre_build”.
• Execute your build tool/command in
“build”
• Test your app further or ship a
container image to a repository in
post_build
Create and store
an artifact in S3
version: 0.1
environment_variables:
plaintext:
JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64"
phases:
install:
commands:
- apt-get update -y
- apt-get install -y maven
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
type: zip
files:
- target/messageUtil-1.0.jar
discard-paths: yes
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CODEPIPELINE
Fully managed continuous integration and delivery
service for fast and reliable application and infrastructure
updates
Builds, tests, and deploys your code and infrastructure
with every source change
Let’s you model, and visualize your software release
process
Integrates with multiple AWS services and 3rd party tools
Extensible and customizable through custom actions and
AWS Lambda functions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLOUDFORMATION
Create templates of your infrastructure
Version control /code review /update
templates like code
CloudFormation provisions AWS resources
based on dependency needs
Integrates with development, CI/CD,
management tools
No additional charge to use
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLOUDFORMATION CHANGE SETS
Preview the set of actions that CloudFormation will take on
your behalf before you create or update stacks.
Change sets show you what resources will be created, updated
or replaced. This ensures that only expected operations are
executed.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HANDS-ON LAB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WELCOME TO INTERSTELLA GTC
Interstella GTC is an intergalactic trading company that was
established to import and export rare resources in the universe.
Interstella was a thriving company but business has been
declining despite a booming economy. You and a few other
consultants have been brought on board to turn this around. Will
you be able to restore Interstella to its former glory?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
YOUR MISSION
Interstella GTC already enlisted help to move their system into Docker and then
break up their services into microservices. Now that they have broken up their
application, they want to move faster to beat their competitors.
It’s up to you to figure out how to apply CI/CD principles to each one of their
processing centers of the 2 rare resources – Iridium and Magnesite ore.
Lab 0: Deploy fulfillment service manually
Lab 1: Break apart monolith repo and offload builds
Lab 2: Automate end to end deployment
Lab 3: Build in tests into deployment pipeline
Bonus Lab: Build governance into pipeline - black days
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKSHOP 1 RECAP
Public subnet – AZ #1 Public subnet – AZ #2
Amazon SNS
EC2 Instance
ECS Cluster
EC2 Instance
Amazon API
Gateway
ORDER
Amazon S3
bucket
Amazon
DynamoDB
1. Build a Docker image
for the monolith
from the provided
Dockerfile. Push
image to Amazon
ECR.
2. Create an Amazon
ECS task definition to
deploy the monolith
image and log to
CloudWatch Logs.
3. Deploy the monolith
using ECS.
M
FULFILL
Amazon
CloudWatch
Amazon
ECR
Amazon
ECS
LOGS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKSHOP 2 RECAP
Public subnet – AZ #1 Public subnet – AZ #2
Amazon SNS
EC2 Instance
ECS Cluster
EC2 Instance
Amazon
ECR
Amazon API
Gateway
ORDER
Amazon S3
bucket
Amazon
DynamoDB
Amazon
ECS
1. Build a Docker image for
a resource microservice
and store in ECR.
2. Create an an ECS task
definition to deploy the
microservice image.
3. Deploy the microservice
image using ECS to start
processing orders for that
resource.
4. Modify the monolith code
to remove functionality
of the microservice.
Rebuild the monolith
image and re-deploy.
M
FULFILL
Amazon
CloudWatch
m
FULFILL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD WORKSHOP ENVIRONMENT
Public subnet – AZ #1 Public subnet – AZ #2
Amazon SNS
EC2 Instance
ECS Cluster
EC2 Instance
Amazon
ECR
Amazon API
Gateway
ORDER
Amazon S3
bucket
Amazon
DynamoDB
Amazon
ECS
Amazon
CloudWatch Application
Load Balancer
Orders come into
the logistics
platform as HTTP
POST messages via
Amazon Simple
Notification Service
(SNS)
Amazon S3 hosts
web content and
utilities – API key
generator, order
subscription, order
dashboard
The logistics platform
communicates with an
order fulfillment API
running on Amazon
API Gateway. Order
data is stored in
Amazon DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD WORKSHOP ENVIRONMENT
1. Microservices are
subscribed to ALB
behind path based
routes
2. Microservices process
and use glue code
through existing
monolith to fulfill
requests to API
Gateway
Public subnet – AZ #1 Public subnet – AZ #2
Amazon SNS
EC2 Instance
ECS Cluster
EC2 Instance
Amazon
ECR
Amazon API
Gateway
ORDER
Amazon S3
bucket
Amazon
DynamoDB
Amazon
ECS
M
FULFILL
Amazon
CloudWatch
Application
Load Balancer
m
FULFILL
/iridium/
/magnesite/
m
/fulfill/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 0: DEPLOY MONOLITH
Public subnet – AZ #1 Public subnet – AZ #2
Amazon SNS
EC2 Instance
ECS Cluster
EC2 Instance
Amazon
ECR
Amazon API
Gateway
ORDER
Amazon S3
bucket
Amazon
DynamoDB
Amazon
ECS
1. Manually build and
deploy monolith onto
ECS. This is just to
understand what
you’re automating
M
Amazon
CloudWatch Application
Load Balancer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 1: BREAK APART REPO AND OFFLOAD BUILDS
AWS
CodeCommit
AWS
CodeBuild
Amazon ECR
Amazon
CloudWatch
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 2: AUTOMATE END TO END DEPLOYMENT
AWS
CodeCommit
AWS
CodeBuild
Amazon ECR
Amazon
CloudWatch
AWS
CodePipeline
Amazon ECS
source deploy
build
pushwrite pull
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 2: AUTOMATE WITH CLOUDFORMATION
AWS
CodeCommit
AWS
CodeBuild
Amazon ECR
Amazon
CloudWatch
AWS
CodePipeline
Amazon ECS
source create change set
build
pushwrite pull
AWS
CloudFormation
deploy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 3: IMPLEMENT AUTOMATED TESTING
AWS
CodeCommit
AWS
CodeBuild
Amazon ECR
Amazon
CloudWatch
AWS
CodePipeline
Amazon ECS
source
create change set
build
pushwrite pull
AWS
CloudFormation
deploy
AWS
CodeBuild
test
write
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BONUS LAB: IMPLEMENT CODE FREEZE
AWS
CodeCommit
Amazon
CloudWatch
AWS
CodePipeline
Amazon ECS
source
build, deploy, etc
check policy
AWS
CodeBuild
test
write
Lambda
function
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LOGISTICS
INSTRUCTIONS:
http://interstella.trade/workshop3/
Raise your hand if you have any questions. High five your neighbors and
have fun!
Please fill out feedback forms once you are done! Feel free to email us
with comments/questions/feedback: aws-interstella-team@amazon.com
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
THANK YOU!

More Related Content

What's hot

NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017Amazon Web Services
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Amazon Web Services
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSAmazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSAmazon Web Services
 
CON302_Building a CICD Pipeline for Containers on Amazon ECS
CON302_Building a CICD Pipeline for Containers on Amazon ECSCON302_Building a CICD Pipeline for Containers on Amazon ECS
CON302_Building a CICD Pipeline for Containers on Amazon ECSAmazon Web Services
 
Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Amazon Web Services
 
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017Amazon Web Services
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)sriram_rajan
 
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeCTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeAmazon Web Services
 
Architecting Container Infrastructure for Security and Compliance - CON406 - ...
Architecting Container Infrastructure for Security and Compliance - CON406 - ...Architecting Container Infrastructure for Security and Compliance - CON406 - ...
Architecting Container Infrastructure for Security and Compliance - CON406 - ...Amazon Web Services
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWSAmazon Web Services
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSAmazon Web Services
 
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksContainers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksAmazon Web Services
 
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...Amazon Web Services
 
K8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSK8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSAmazon Web Services
 
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...Amazon Web Services
 

What's hot (20)

NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
CON302_Building a CICD Pipeline for Containers on Amazon ECS
CON302_Building a CICD Pipeline for Containers on Amazon ECSCON302_Building a CICD Pipeline for Containers on Amazon ECS
CON302_Building a CICD Pipeline for Containers on Amazon ECS
 
Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017
Birds of a Feather: Containers and Open Source at AWS - CON205 - re:Invent 2017
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)
 
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeCTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
 
Serverless DevOps to the Rescue
Serverless DevOps to the RescueServerless DevOps to the Rescue
Serverless DevOps to the Rescue
 
Architecting Container Infrastructure for Security and Compliance - CON406 - ...
Architecting Container Infrastructure for Security and Compliance - CON406 - ...Architecting Container Infrastructure for Security and Compliance - CON406 - ...
Architecting Container Infrastructure for Security and Compliance - CON406 - ...
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
 
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksContainers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
 
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...
DEV315_Automating Lambda Deployments with GitHub, Jenkins, AWS CodePipeline a...
 
K8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSK8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKS
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...
Living on the Edge, It’s Safer Than You Think! Building Strong with Amazon Cl...
 

Similar to Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017

Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Web Services
 
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Amazon Web Services
 
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit Sydney
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit SydneyIntegrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit Sydney
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit SydneyAmazon Web Services
 
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...Amazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSAmazon Web Services
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersAmazon Web Services
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Amazon Web Services
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSAmazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateAmazon Web Services
 
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summits
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueAmazon Web Services
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueAmazon Web Services
 
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesIntroduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesAmazon Web Services
 
SRV313 Introduction to Building Web Apps on AWS
 SRV313 Introduction to Building Web Apps on AWS SRV313 Introduction to Building Web Apps on AWS
SRV313 Introduction to Building Web Apps on AWSAmazon Web Services
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...Amazon Web Services
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfAmazon Web Services
 

Similar to Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017 (20)

Building Web Apps on AWS
Building Web Apps on AWSBuilding Web Apps on AWS
Building Web Apps on AWS
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
 
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit Sydney
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit SydneyIntegrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit Sydney
Integrate Your Favourite Microsoft DevOps Tools with AWS - AWS Summit Sydney
 
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...
Strumenti e servizi basici per sviluppatori, come iniziare a creare sul cloud...
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWS
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
 
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWSAWS Summit Singapore 2019 | Microsoft DevOps on AWS
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS Glue
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS Glue
 
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesIntroduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
 
AWS 容器服務入門實務
AWS 容器服務入門實務AWS 容器服務入門實務
AWS 容器服務入門實務
 
SRV313 Introduction to Building Web Apps on AWS
 SRV313 Introduction to Building Web Apps on AWS SRV313 Introduction to Building Web Apps on AWS
SRV313 Introduction to Building Web Apps on AWS
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT Interstella GTC: CI/CD for Containers on AWS C O N 3 1 9 H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t A n d y M u i , A W S S o l u t i o n s A r c h i t e c t D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t N o v e m b e r 3 0 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT CI/CD for Containers on AWS H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t A n d y M u i , A W S S o l u t i o n s A r c h i t e c t D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t C O N 3 1 9
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ABOOT ME Hubert Cheung hubertc@amazon.com Solutions Architect Canuck @ AWS 5 Years - AWS Support - AWS Solutions Architecture
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHAT TO EXPECT FROM THIS WORKSHOP Release Processes CI/CD on AWS • Amazon EC2 • AWS CodeCommit • AWS CodePipeline • AWS CodeBuild • Amazon ECS Deployments Hands on lab • Workshop Architecture/Goals
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RELEASE PROCESS PHASES Source Build Test Production • Integration tests with other systems • Load testing • UI tests • Penetration testing • Check-in source code such as Dockerfiles • Peer review new code • Compile code • Unit tests • Style checkers • Code metrics • Create container images • Deployment to production environments
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RELEASE PROCESS PHASES Source Build Test Production Continuous integration Continuous delivery Continuous deployment
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHY SHOULD I CARE ABOUT CI/CD? • Velocity • Improved Productivity and Efficiency • Reduced Risk • Shorter Feedback Loop • Automation! Source: xkcd - https://xkcd.com/1629/
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CHALLENGES • Automation! • Metrics and Monitoring • Legacy processes • Legacy…anything
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. COMMON PATTERNS AND SOLUTIONS Automate as much as possible • Start small. Don’t try to automate everything Microservices Strict API Contracts • Get expected outputs from teams consuming your service Testing • Mandate arbitrary number of tests to start
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit AWS CodeBuild
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit AWS CodeBuild Third Party Tooling
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit AWS CodeBuild Third Party Tooling Amazon Elastic Container Service
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit AWS CodeBuild Third Party Tooling Amazon Elastic Container Service AWS CodePipeline
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE AUTOMATE AUTOMATE! Source Build Test Production AWS CodeCommit AWS CodeBuild Third Party Tooling Amazon Elastic Container Service AWS CodePipeline AWS CodeStar
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AUTOMATE INFRASTRUCTURE AS CODE! Source Build Test Production AWS CodeCommit AWS CodeBuild Third Party Tooling AWS CodePipeline AWS CloudFormation
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CODECOMMIT Fully managed Git service Available in all public AWS Regions Data encrypted at rest with a customer-specific AWS KMS key Integrated with IAM and AWS CloudTrail for security and compliance Extensible through Amazon CloudWatch Events
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CODEBUILD Fully managed build service that compiles source code, runs tests, and produces software packages Scales continuously and processes multiple builds concurrently Custom build environments suited to your needs via Docker images Only pay by the minute for the compute resources you use AWS CodePipeline and Jenkins integration
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HOW DOES AWS CODEBUILD WORK? 1. Downloads source code 2. Executes commands configured in the buildspec in temporary compute containers (created fresh on every build) 3. Streams the build output to the service console and CloudWatch logs 4. Uploads the generated artifact to an Amazon S3 bucket
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SAMPLE BUILDSPEC.YML Variables to be used by phases of build Examples phases of a build: • Install packages or run commands to prepare your environment in ”install”. • Run syntax checking, commands in “pre_build”. • Execute your build tool/command in “build” • Test your app further or ship a container image to a repository in post_build Create and store an artifact in S3 version: 0.1 environment_variables: plaintext: JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64" phases: install: commands: - apt-get update -y - apt-get install -y maven pre_build: commands: - echo Nothing to do in the pre_build phase... build: commands: - echo Build started on `date` - mvn install post_build: commands: - echo Build completed on `date` artifacts: type: zip files: - target/messageUtil-1.0.jar discard-paths: yes
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CODEPIPELINE Fully managed continuous integration and delivery service for fast and reliable application and infrastructure updates Builds, tests, and deploys your code and infrastructure with every source change Let’s you model, and visualize your software release process Integrates with multiple AWS services and 3rd party tools Extensible and customizable through custom actions and AWS Lambda functions
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLOUDFORMATION Create templates of your infrastructure Version control /code review /update templates like code CloudFormation provisions AWS resources based on dependency needs Integrates with development, CI/CD, management tools No additional charge to use
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLOUDFORMATION CHANGE SETS Preview the set of actions that CloudFormation will take on your behalf before you create or update stacks. Change sets show you what resources will be created, updated or replaced. This ensures that only expected operations are executed.
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HANDS-ON LAB
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WELCOME TO INTERSTELLA GTC Interstella GTC is an intergalactic trading company that was established to import and export rare resources in the universe. Interstella was a thriving company but business has been declining despite a booming economy. You and a few other consultants have been brought on board to turn this around. Will you be able to restore Interstella to its former glory?
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. YOUR MISSION Interstella GTC already enlisted help to move their system into Docker and then break up their services into microservices. Now that they have broken up their application, they want to move faster to beat their competitors. It’s up to you to figure out how to apply CI/CD principles to each one of their processing centers of the 2 rare resources – Iridium and Magnesite ore. Lab 0: Deploy fulfillment service manually Lab 1: Break apart monolith repo and offload builds Lab 2: Automate end to end deployment Lab 3: Build in tests into deployment pipeline Bonus Lab: Build governance into pipeline - black days
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKSHOP 1 RECAP Public subnet – AZ #1 Public subnet – AZ #2 Amazon SNS EC2 Instance ECS Cluster EC2 Instance Amazon API Gateway ORDER Amazon S3 bucket Amazon DynamoDB 1. Build a Docker image for the monolith from the provided Dockerfile. Push image to Amazon ECR. 2. Create an Amazon ECS task definition to deploy the monolith image and log to CloudWatch Logs. 3. Deploy the monolith using ECS. M FULFILL Amazon CloudWatch Amazon ECR Amazon ECS LOGS
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKSHOP 2 RECAP Public subnet – AZ #1 Public subnet – AZ #2 Amazon SNS EC2 Instance ECS Cluster EC2 Instance Amazon ECR Amazon API Gateway ORDER Amazon S3 bucket Amazon DynamoDB Amazon ECS 1. Build a Docker image for a resource microservice and store in ECR. 2. Create an an ECS task definition to deploy the microservice image. 3. Deploy the microservice image using ECS to start processing orders for that resource. 4. Modify the monolith code to remove functionality of the microservice. Rebuild the monolith image and re-deploy. M FULFILL Amazon CloudWatch m FULFILL
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CI/CD WORKSHOP ENVIRONMENT Public subnet – AZ #1 Public subnet – AZ #2 Amazon SNS EC2 Instance ECS Cluster EC2 Instance Amazon ECR Amazon API Gateway ORDER Amazon S3 bucket Amazon DynamoDB Amazon ECS Amazon CloudWatch Application Load Balancer Orders come into the logistics platform as HTTP POST messages via Amazon Simple Notification Service (SNS) Amazon S3 hosts web content and utilities – API key generator, order subscription, order dashboard The logistics platform communicates with an order fulfillment API running on Amazon API Gateway. Order data is stored in Amazon DynamoDB
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CI/CD WORKSHOP ENVIRONMENT 1. Microservices are subscribed to ALB behind path based routes 2. Microservices process and use glue code through existing monolith to fulfill requests to API Gateway Public subnet – AZ #1 Public subnet – AZ #2 Amazon SNS EC2 Instance ECS Cluster EC2 Instance Amazon ECR Amazon API Gateway ORDER Amazon S3 bucket Amazon DynamoDB Amazon ECS M FULFILL Amazon CloudWatch Application Load Balancer m FULFILL /iridium/ /magnesite/ m /fulfill/
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 0: DEPLOY MONOLITH Public subnet – AZ #1 Public subnet – AZ #2 Amazon SNS EC2 Instance ECS Cluster EC2 Instance Amazon ECR Amazon API Gateway ORDER Amazon S3 bucket Amazon DynamoDB Amazon ECS 1. Manually build and deploy monolith onto ECS. This is just to understand what you’re automating M Amazon CloudWatch Application Load Balancer
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 1: BREAK APART REPO AND OFFLOAD BUILDS AWS CodeCommit AWS CodeBuild Amazon ECR Amazon CloudWatch
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 2: AUTOMATE END TO END DEPLOYMENT AWS CodeCommit AWS CodeBuild Amazon ECR Amazon CloudWatch AWS CodePipeline Amazon ECS source deploy build pushwrite pull
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 2: AUTOMATE WITH CLOUDFORMATION AWS CodeCommit AWS CodeBuild Amazon ECR Amazon CloudWatch AWS CodePipeline Amazon ECS source create change set build pushwrite pull AWS CloudFormation deploy
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 3: IMPLEMENT AUTOMATED TESTING AWS CodeCommit AWS CodeBuild Amazon ECR Amazon CloudWatch AWS CodePipeline Amazon ECS source create change set build pushwrite pull AWS CloudFormation deploy AWS CodeBuild test write
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BONUS LAB: IMPLEMENT CODE FREEZE AWS CodeCommit Amazon CloudWatch AWS CodePipeline Amazon ECS source build, deploy, etc check policy AWS CodeBuild test write Lambda function
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LOGISTICS INSTRUCTIONS: http://interstella.trade/workshop3/ Raise your hand if you have any questions. High five your neighbors and have fun! Please fill out feedback forms once you are done! Feel free to email us with comments/questions/feedback: aws-interstella-team@amazon.com
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. THANK YOU!