AWS Webcast - Intro to DevOps: Using Amazon RDS with AWS OpsWorks

35
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. Intro to DevOps: Using AWS OpsWorks and Amazon RDS Chris Barclay Amazon Web Services

description

You can now use RDS with AWS OpsWorks, an application deployment and management service. OpsWorks allows you to incorporate DevOps practices to seamlessly deploy code and operate services. DevOps focuses on collaborating across development and operations facilitating continuous software delivery, shared code bases, and automated deploys, which results in faster delivery of features and more stable operating environments. OpsWorks automates deployments and standardizes production environments, a key aspect of DevOps. What this means for an RDS user is OpsWorks can scale your EC2 application servers according to demand and ensure it has the most current code base deployed. It can automatically configure and connect your new server to your RDS database. OpsWorks will ensure consistent provisioning of your resources with no manual configuring.

Transcript of AWS Webcast - Intro to DevOps: Using Amazon RDS with AWS OpsWorks

Page 1: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

Intro to DevOps: Using AWS OpsWorks and

Amazon RDS

Chris Barclay

Amazon Web Services

Page 2: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

What is “DevOps”?

• A philosophy? Cultural change? Paradigm shift?

• Alignment of development and IT operations

with better communication and collaboration?

• Improvement in software deployment?

Page 3: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

What is “DevOps”?

• A philosophy? Cultural change? Paradigm shift?

• Alignment of development and IT operations

with better communication and collaboration?

• Improvement in software deployment?

Yes!

Page 4: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Deliver scalable,

resilient

applications with

less work

Source: http://xkcd.com/844/

Why are we here?

Page 5: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Software development process

Dev

Team

Test

Team

Ops

Team

Sustaining

Team

Code

Wal l

Developer IT Operations

Page 6: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Software development process

• Handoffs can cause trouble – Who is responsible for scaling?

– How to troubleshoot issues that span teams?

– Coordination can cause delays.

Dev

Team

Test

Team

Ops

Team

Sustaining

Team

Page 7: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

“DevOps” culture of ownership

• Accountability

• Coordination

• Predictability

• Speed

Page 8: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

How to get there

• Iterative improvements

• Everything is code

• Automation

• Practice the hard things

Page 9: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Iterative improvements

Page 10: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Long release cycles for major new versions

Traditional Software Delivery

Page 11: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Constant stream of incremental improvements

Agile Software Delivery

Page 12: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

React quickly 1 2 Reduce risk

Constant stream of incremental improvements

Agile Software Delivery

Page 13: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

The path to iterative improvements

Design Code Refactor Unit Test Bug Fix Deploy

Developers

(application)

Provision Configure Orchestrate Deploy Report Monitor

IT Operations

(infrastructure)

Agile

Development

DevOps

• Continuous Integration

• Continuous Deployment

• IT Automation

• Application Management

• Iterative development

• Scrum, sprints, stories

• Velocity

Development

Agility

IT

Agility

Page 14: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Everything is code

Page 15: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Your app = resources + software config + deploy

Page 16: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Your app, defined by recipes

Ap

p

Page 17: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Resources modeled as a Stack

• Checked into

your repository

• Reproducible MySQL Primary

(RDS)

Ap

p

EL

B

Alert

Log

Mon

Page 18: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Automation

Page 19: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

1. Provision server

2. Configure networks

3. Configure storage

4. Download software

5. Install software

6. Configure software

7. Deploy application

8. Apply security patches

9. Add sprinkles (optional)

Page 20: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

• Repeatability

• Consistency

• Speed

Page 21: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Practice the hard things

Page 22: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

• All environments are the same

• Alarms

• Logs

• Permissions

• Canaries

• Simulate failures

Page 23: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

An application management service that

makes it easy to deploy and operate

applications of all shapes and sizes.

Page 24: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Monitoring

Provisioning

Logging

Deployment Modeling

Configuration Management Auto Scaling Access Management

Resource Management

Page 25: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Why is it hard to scale apps? • Receive capacity alarm

• Provision new server

• Install required software

• Deploy app

• Install database drivers

• Securely send database connection info (e.g., passwords)

• Health check

• Add to load balancer

Ap

p

EL

B

AZ AZ

Amazon RDS

DB

Auto Scaling

Page 26: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

How OpsWorks scales apps • What you do:

– Define application

– Define auto scaling

• What OpsWorks does: – Receive capacity alarm

– Provision new server

– Install required software

– Deploy app

– Install database drivers

– Securely send database connection info (e.g., passwords)

– Health check

– Add to load balancer

Page 27: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

What about database scaling? • Provision server

• Install HAProxy

• Create HAProxy configuration file with RDS instances

• Scale load balancer to accommodate load

• Health check load balancer

• When add/remove RDS read replicas, update HAProxy configuration

Ap

p

EL

B

AZ AZ Auto Scaling

HA

Pro

xy

AZ AZ

Amazon RDS DB

Page 28: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

How OpsWorks scales databases • What you do:

– Create HAProxy layer

– Add/remove RDS read replicas

• What OpsWorks does: – Provision server

– Install HAProxy

– Create HAProxy configuration file with RDS instances

– Scale load balancer to accommodate load

– Health check load balancer

– When add/remove RDS instances, update HAProxy configuration

Page 29: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

What’s hard about deploying changes?

• For any change, such as database credentials, source code, package updates, security fixes – Authorize requestor

– Get change onto each server

– Perform update

– Verify

– Make logs available

• OpsWorks handles these tasks for you

Page 30: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Demo

Page 31: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Questions?

Page 32: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

@AWSOpsWorks

aws.amazon.com/opsworks

Page 33: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Dynamic Configuration

Page 34: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

Modeling in OpsWorks

Page 35: AWS Webcast - Intro to DevOps:  Using Amazon RDS with AWS OpsWorks

With Dev, Test, and Prod

Amazon

S3

Pro

d -

su

bn

et

Web

server

App

server

Amazon RDS

ELB

Pro

duction

Dev -

su

bn

et

Auto Scaling group

Web

server

Auto Scaling group

App

server

Amazon RDS

ELB

Develo

pm

ent

Te

st

- su

bn

et

Web

server

App

server

Amazon RDS

ELB

Test

CI/CD

Server

Project mgt

Ticketing

Server

Amazon

RDS Version

Control

Shared Service Subnet

Automation

Master