Top Banner
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Vladimir Simek, Solutions Architect, AWS 21 st May 2015 Continuous Integration and Deployment on AWS Prague AWS User Group
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CI&CD with AWS - AWS Prague User Group - May 2015

© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Vladimir Simek, Solutions Architect, AWS

21st May 2015

Continuous Integration and

Deployment on AWSPrague AWS User Group

Page 2: CI&CD with AWS - AWS Prague User Group - May 2015

Agenda

• The Age of DevOps

• AWS Offering for DevOps

• CodeCommit

• CodePipeline

• CodeDeploy

• Demos

• Q&A

Page 3: CI&CD with AWS - AWS Prague User Group - May 2015

Software is eating the world1

1 Wall Street Journal article by Marc Andreessen (2011)

Page 4: CI&CD with AWS - AWS Prague User Group - May 2015

Software distribution and development changes

Page 5: CI&CD with AWS - AWS Prague User Group - May 2015

DevOps Principles

Definition

Collaboration - work as one team end to

end

Breakdown the barriers between

developers and IT ops

Continuous integration & deployment

Treat Infrastructure as code

Support business and IT agility

Automate everything

Test everything

Measure & monitor everything

Page 6: CI&CD with AWS - AWS Prague User Group - May 2015

AWS Offering for CI & CD

MonitorProvisionDeployTestBuildCode

Elastic Beanstalk

OpsWorks

Cloud

Watch

Cloud

Formation

Code

Deploy

Code

Commit

(preview)

Code

Pipeline

(preview)

Page 7: CI&CD with AWS - AWS Prague User Group - May 2015

Coding Phase

Developer creates a code.

How and where to store it? How to get the following functionality?

• Tracking all changes

• Distributed to allow collaboration

• Branching and merging

• Option to switch across different versions

Version Control System

Page 8: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodeCommit

Page 9: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodeCommit

git push CodeCommit

Git objects

in Amazon S3

Git index

in Amazon

DynamoDB

Encryption key

in AWS KMS

SSH or Smart HTTP

• Data redundancy across Availability Zones

• Data-at-rest encryption

• Integrated with AWS Identity and Access Management

• No repo size limit

Secure, scalable and managed source control

Page 10: CI&CD with AWS - AWS Prague User Group - May 2015

Demo (Code Commit / Git)

Page 11: CI&CD with AWS - AWS Prague User Group - May 2015

Build and Test Phase

1. Developers deploy code to the version control system (CodeCommit, Git)

2. SysOps build and deploy the software to the testing / staging environment

3. Q&A team executes load and performance test so the software can be

released for production use

Page 12: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodePipeline

Page 13: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodePipeline

Continuous Delivery and Release Automation

• Customizable workflow engine

• Integrate with partner and custom systems

• Visual editor and status

Source Staging Region 2

Region 3

BuildUnit

TestsDeploy

UI

TestDeployDeploy

Region 1

Page 14: CI&CD with AWS - AWS Prague User Group - May 2015

How CodePipeline Works

Page 15: CI&CD with AWS - AWS Prague User Group - May 2015

Deployment Phase

Software has to be deployed to different environments (dev/test/staging/production)

Deployment has to be automated as much as possible to minimize downtime

In case of issues, it has to allow roll-back to the previous version

Page 16: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodeDeploy

Page 17: CI&CD with AWS - AWS Prague User Group - May 2015

AWS CodeDeploy

• Automated application deployments to EC2,

and any Internet-connected computer

• Consistent and reliable releases, without downtime

• Scale from 1 instance to thousands

• Centralize deployment control and monitoring

Coordinate automated deployments, just like Amazon

Page 18: CI&CD with AWS - AWS Prague User Group - May 2015

How CodeDeploy Works

Agent Agent

Agent Agent

Agent

Agent

Deployment Group

Deployment

Amazon S3

GitHub

Application

Bundle

Coordinate automated deployments, just like Amazon

Page 19: CI&CD with AWS - AWS Prague User Group - May 2015

Deployment config – choose speed

v2 v1 v1 v1 v1 v1 v1 v1One at a time

v2 v2 v2 v2 v1 v1 v1 v1

v2 v2 v2 v2 v2 v2 v2 v2

Half-at-a-time

All-at-once

Page 20: CI&CD with AWS - AWS Prague User Group - May 2015

Rolling update – Deploy without downtime

Load Balancer

v1 v1 v1v1

Page 21: CI&CD with AWS - AWS Prague User Group - May 2015

Rolling update – Deploy without downtime

Load Balancer

v1 v1 v1v2

Page 22: CI&CD with AWS - AWS Prague User Group - May 2015

Rolling update – Deploy without downtime

Load Balancer

v1 v1v2 v2

Page 23: CI&CD with AWS - AWS Prague User Group - May 2015

Rolling update – Deploy without downtime

Load Balancer

v1 v2v2 v2

Page 24: CI&CD with AWS - AWS Prague User Group - May 2015

Rolling update – Deploy without downtime

Load Balancer

v1 v2v2 v2

Page 25: CI&CD with AWS - AWS Prague User Group - May 2015

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v2 v2

Page 26: CI&CD with AWS - AWS Prague User Group - May 2015

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v3 v2Stop

Page 27: CI&CD with AWS - AWS Prague User Group - May 2015

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v3 v2

Rollback

Page 28: CI&CD with AWS - AWS Prague User Group - May 2015

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v2 v2

Page 29: CI&CD with AWS - AWS Prague User Group - May 2015

Demo (CodeDeploy / CodePipeline)

Page 30: CI&CD with AWS - AWS Prague User Group - May 2015

Product Integrations

Page 31: CI&CD with AWS - AWS Prague User Group - May 2015

Thank you