Continuous Delivery in the AWS Cloud

Post on 15-Jan-2015

3.175 views 2 download

Tags:

description

A presentation on Continuous Delivery by Fabio Lessa and Nigel Fernandes at the Amazon Web Services summit in Melbourne and in Sydney

Transcript of Continuous Delivery in the AWS Cloud

Continuous Delivery in the

cloud

@flessa

github.com/flessa

@nigelfds

github.com/nigelfds

BIG IDEAS

Real World Tested

What are we talking about?

Ideas behind this workshop

Ideas in practice Continuous integration

System integration Production deployment

Summary

Questions

Agenda

Infrastructure as code

Application

Environment

Infrastructure

consistency from development to production

accidental inconsistency

necessary inconsistency>>

deployment process

environment configuration

testing tools

Automation

Rebuild from code + data

Disk

CPUNetwork

Memory

Dev Ops

Dev Ops

In short.

1 2 3

Automate DevOpsInfrastructureas code

continuous delivery

software always production readyreleases tied to business needs, not IT constraints

minimize the lead time from idea to liveconcept to cash

time

small feature chunks

Ideas behind this workshop

Ideas in practice Continuous integration

System integration Production deployment

Summary

Questions

Agenda

SampleApp

Sample Application for #AWS Tweets

github.com/nigelfds/aws-twitter-feed

WebApp

Java/JVM

Executable War

Unix Service

Native Packaging/RPM

~ 30 lines of code

Lets see this working

I win with

Continuous Integration

while (true) {if (change checked into vcs) then build & testsleep 60

}

aws-twitter-feed repository

while (true) {if (change checked into vcs) then build & testsleep 60

}

RPM

Building Useful Servers

Application

Environment

Infrastructure

Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to patch management and compliance.

Puppet definition for our GO machine

Puppet definition continued…

Don’t make the Version Control Sad

github.com/nigelfds/configuration-master

Puppet definitions and AWS scripts

To keep things moving, lets kick it off

BuildServer

S3 Bucket

Nigel’s Laptop

Puppet & AWS scripts

Cloud Formation

APIs

PackagedScripts

Create Machine

Self Configured

Behind the scenes

AWS CloudFormation gives developers and systems administrators an easy way to create and manage a collection of related AWS resources.

Once deployed, you can modify and update the AWS resources in a

controlled and predictable way allowing you to version control your AWS infrastructure in the same way as you version control your software

Cloud Formation Template…… "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "InstanceType" : "c1.medium", "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, "UserData": { "Ref": "BootScript" } } },……

Creating the stack with CloudFormation

Name of the stack

Self configuration scripts (Invokes Puppet)

Create the stack

Lets see how we’re doing

Repeatable & Continuous

Puppet definition for our GO machine

Server Monitoring

In Short

Packaging for the target ( Using PMs)

Infrastructure as Code (Using )

Continuous Integration (Using )

Declarative Env. Conf. (Using )

Ideas behind this workshop

Ideas in practice Continuous integration

System integration Production deployment

Summary

Questions

Agenda

Everything works by itself

But they need to work together

=

Bring in the conductor

Complex !

How does this look in

AppServer

Cloud Formation

APIs

Behind the scenes

GOServer

Self Configured

Create an AMI from the running instace

Creating the AMI

Save a reference to the Image IdDelete the running instance

Lets see this on AWS

Snapshot -> AMIsare awesome

Boot Speed

Test=

Prod

QAInstances

Ideas behind this workshop

Ideas in practice Continuous integration

System integration

Production deployment

Summary

Questions

Agenda

To keep things moving, lets kick it off

ELB

Autoscaling

APPV1.0

APPV1.0

APPV2.0

Terminate InstanceID-1

Remove ID-1

ID-1 ID-2ID-3

Terminate InstanceID-2

Remove ID-2

APPV2.0

ID-4

ZERO DOWNTIME !

Lets see this working

Ideas behind this workshop

Ideas in practice Continuous integration

System integration Production deployment

Summary

Questions

Agenda

1 2 3

Automate DevOpsInfrastructureas codeContin

uous

Delivery !

Thank you and …

How? By fast, automated feedback on the production readiness of your applications every time there is a change whether code, infrastructure, configuration or database

Jez HumbleAuthor Continuous Delivery

Ps. We’re hiring ;-)