ci&cd with aws - aws prague user group - may 2015

31
© 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

Upload: vladimir-simek

Post on 09-Aug-2015

73 views

Category:

Technology


0 download

TRANSCRIPT

© 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

Agenda

• The Age of DevOps

• AWS Offering for DevOps

• CodeCommit

• CodePipeline

• CodeDeploy

• Demos

• Q&A

Software is eating the world1

1 Wall Street Journal article by Marc Andreessen (2011)

Software distribution and development changes

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

AWS Offering for CI & CD

MonitorProvisionDeployTestBuildCode

Elastic Beanstalk

OpsWorks

Cloud

Watch

Cloud

Formation

Code

Deploy

Code

Commit

(preview)

Code

Pipeline

(preview)

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

AWS CodeCommit

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

Demo (Code Commit / Git)

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

AWS CodePipeline

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

How CodePipeline Works

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

AWS CodeDeploy

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

How CodeDeploy Works

Agent Agent

Agent Agent

Agent

Agent

Deployment Group

Deployment

Amazon S3

GitHub

Application

Bundle

Coordinate automated deployments, just like Amazon

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

Rolling update – Deploy without downtime

Load Balancer

v1 v1 v1v1

Rolling update – Deploy without downtime

Load Balancer

v1 v1 v1v2

Rolling update – Deploy without downtime

Load Balancer

v1 v1v2 v2

Rolling update – Deploy without downtime

Load Balancer

v1 v2v2 v2

Rolling update – Deploy without downtime

Load Balancer

v1 v2v2 v2

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v2 v2

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v3 v2Stop

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v3 v2

Rollback

Health Tracking – Catch Deployment Problems

Load Balancer

v1 v2v2 v2

Demo (CodeDeploy / CodePipeline)

Product Integrations

Thank you