18
Continuous Integration & Scalable Application Deployments http://linkedin.com/in/davidnedved On the Cloud

Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Embed Size (px)

DESCRIPTION

Slides from my talk at our 2013 July Amazon Web Services, Brisbane (Queensland, Australia) User-group. This time I return to give you a run down on using Amazon's EC2 to deploy continuous integration & scalable & automated build processes leveraging the AWS API to help save resources, costs, and most importantly accelerate your innovation to the next level!

Citation preview

Page 1: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Continuous Integration & Scalable Application Deployments

http://linkedin.com/in/davidnedved

On the Cloud

Page 2: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

What is continuous integration?

● Integrate changes at least daily● Solve problems quickly

○ You don't need a whole team to do a single deploy...

○ Less time debugging & more time innovating new features!

● More than a process○ Make builds "self test"○ Automate whole process○ Maintain single repository

Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.

Page 3: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

There are many CI-Deploy tools (servers) out there that can be scripted to leverage the AWS API - Some are SAAS, some self-hosted, and some open source...

Build & Deploy Tools

Often there is no "one-size-fits-all" for CI due to application specific requirements. Thanks to the AWS API that gap is rapidly shrinking!

Page 4: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

... Please excuse my photoshop skills

Simple CI Process & Deployment

David Nedved - 2013

Page 5: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Traditional app Architect, Dev, Test, UA, Deploy,

Admin, (and so on) team...

Lean dev team, CI & the AWS Cloud takes care of

the rest...

SME Use Case: Wynbox

Your Enterprise or Growing SME

Page 6: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

● Integration with Source Control Systems (Atlassian Stash)● Integration with Build Tools (Atlassian Bamboo + Scala SBT)● Integration with Project Management Tools (Atlassian Jira)● Metrics/notifications collection, build statuses etc (via bamboo)● Ability to deploy to automated, scalable, HA environment using AWS API.

○ Zero down time○ High volume transactional system

(payment processing) meaning noservice interruptions

○ Ability to roll back and forwardbuild versions

What they wanted..

Spend time to utilise the AWS API's with your tools/application properly and you will be rewarded in days to come...

Page 7: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

How it works (in a nutshell)

Build Server Creates New AMI (v2.0)

BLD

v1.0 AMI

v2.0 AMI

Scalable DynamoDB Backend

v1.0 v2.0

DNS

Cloudwatch Auto-scales each AMI

v1 v1 v2 v2

David Nedved - 2013

baseimg

baseimg

1. Bamboo takes code from repo, performs test/ua (selenium).

2. Code is placed on "base img" which is then turned into an AMI.

3. New AMI is deployed behind a new auto-scaling ELB and pre- warms instances.

4. Route53 points app to the new ELB (running v2 AMI) which begins to serve application requests.

5. v1 application stack terminates on instances once all requests have finished processing, v2 application is now running and can auto-scale to accommodate application load...

● TTL on Route53 is generally set to 60 sec.● Application can be rolled back to old AMI (whole instance) version.● Provides true 99.99~ uptime guarantee, faster innovation & less

room for human error as oppose to manually deploying!● Model displayed here can be obviously deployed as often as you like!

AZ-

1

AZ-2

AZ-

1

AZ-2

Page 8: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 9: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 10: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 11: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 12: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 13: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 14: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 15: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 16: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

A/B Testing?

Page 17: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Many ways to scale & test!

There are many ways to scale your CI on AWS using their APIs. The Wynbox example uses multiple ELB's so that another layer of automated "testing" can be performed before the application is officially rolled out.. (final-stage load testing & dr testing etc).

For example A/B testing can be rolled out using similar methods to select customers, UA testing could be performed in a "real world environment" before cutting over, the list goes on....

https://github.com/Netflix/SimianArmy

You could run Chaos Monkey as part of your standard deploy tests.

Page 18: Continuous Integration & Scalable Application Deployments on AWS Cloud - With David Nedved @ITOCAustralia

Questions, Beer & Thank You!

http://linkedin.com/in/davidnedved

http://aws.amazon.com/

Email: [email protected]

Deploying HA Applications on: