Slide 1

Slide 1 text

Considerations in Cloud DevOps. Ben Whaley @iAmTheWhaley

Slide 2

Slide 2 text

Mobile Scale

Slide 3

Slide 3 text

0 900000000 1800000000 2700000000 3600000000 PCs Mobile Phones Connected Clients 3.5 billion 1.8 billion Source: Andreessen Horowitz

Slide 4

Slide 4 text

Growth in Connected Client Devices Units (millions) 0 400 800 1,200 1,600 Jun 07 Jun 08 Jun 09 Jun 10 Jun 11 Jun 12 Jun 13 Tablets iPhone & Android PCs Source: Andreessen Horowitz

Slide 5

Slide 5 text

0 400000000000 800000000000 1200000000000 1600000000000 Photos Taken 2014 1999 1.5 trillion 80 billion Source: Andreessen Horowitz

Slide 6

Slide 6 text

~1.3 Million Apps

Slide 7

Slide 7 text

Revisions measured in days or weeks.

Slide 8

Slide 8 text

IoT

Slide 9

Slide 9 text

Mobile is powered by APIs.

Slide 10

Slide 10 text

Mature Mobile • Use the cloud to enable rich native apps • Blur the line between apps and the web • Hyperlocal via iBeacons & NFC • Mobile != Smartphone

Slide 11

Slide 11 text

Business Benefits • APIs engage customers, partners • Data pipelines for business analytics • Improved availability • Elasticity for • Cost savings • Capacity on demand • Focus on core competencies

Slide 12

Slide 12 text

Systems

Slide 13

Slide 13 text

Systems • n+2 redundancy n n+1 n+2 Load Balancer

Slide 14

Slide 14 text

Systems • n+2 redundancy • Compute is ephemeral n n+1 n+2 n+3 n+4 n+5 Load Balancer

Slide 15

Slide 15 text

Systems • n+2 redundancy • Compute is ephemeral • Infrastructure is code resource "digitalocean_droplet" "www-1" {! image = "ubuntu-14-04-x64"! name = "www-1"! region = "nyc2"! size = "512mb"! private_networking = true! ssh_keys = [! "${var.ssh_fingerprint}"! ]! }!

Slide 16

Slide 16 text

Systems • n+2 redundancy • Compute is ephemeral • Infrastructure is code • Less is more

Slide 17

Slide 17 text

Systems • n+2 redundancy • Compute is ephemeral • Infrastructure is code • Less is more • Ubiquitous monitoring

Slide 18

Slide 18 text

Systems • n+2 redundancy • Compute is ephemeral • Infrastructure is code • Less is more • Ubiquitous monitoring • Service discovery

Slide 19

Slide 19 text

Applications

Slide 20

Slide 20 text

Applications • Loosely coupled

Slide 21

Slide 21 text

Applications • Loosely coupled • Deeply instrumented

Slide 22

Slide 22 text

Applications • Loosely coupled • Deeply instrumented • Lean

Slide 23

Slide 23 text

Applications • Loosely coupled • Deeply instrumented • Lean • Built to be disabled

Slide 24

Slide 24 text

Applications • Loosely coupled • Deeply instrumented • Lean • Built to be disabled • Stateless

Slide 25

Slide 25 text

Applications • Loosely coupled • Deeply instrumented • Lean • Built to be disabled • Stateless • Robustly implemented “Be conservative in what you send, be liberal in what you accept”

Slide 26

Slide 26 text

Applications • Loosely coupled • Deeply instrumented • Lean • Built to be disabled • Stateless • Robustly implemented • Continuously integrated

Slide 27

Slide 27 text

Delivery

Slide 28

Slide 28 text

Delivery Commit Test Build Deploy

Slide 29

Slide 29 text

Delivery Build server Commit Site Deploy

Slide 30

Slide 30 text

Delivery

Slide 31

Slide 31 text

Delivery Challenges

Slide 32

Slide 32 text

Delivery Challenges 1. Zero downtime

Slide 33

Slide 33 text

Zero Downtime Green/Blue www.example.com Old Code

Slide 34

Slide 34 text

Zero Downtime Green/Blue www.example.com Old Code New Code

Slide 35

Slide 35 text

Zero Downtime Rolling Upgrade www.example.com Old Old Old

Slide 36

Slide 36 text

Zero Downtime Rolling Upgrade www.example.com New Old Old

Slide 37

Slide 37 text

Zero Downtime Rolling Upgrade www.example.com New New Old

Slide 38

Slide 38 text

Zero Downtime Rolling Upgrade www.example.com New New New

Slide 39

Slide 39 text

Zero Downtime Replacement www.example.com Old Old Old

Slide 40

Slide 40 text

Zero Downtime Replacement www.example.com New New New

Slide 41

Slide 41 text

Delivery Challenges 1. Zero downtime 2. Distributing credentials

Slide 42

Slide 42 text

Distributing Credentials 1. Seed credentials in the OS image Pros Cons Simpler bootstrap process Must load credential to image initially May be more difficult to modify Credentials in plain text in stored image

Slide 43

Slide 43 text

Distributing Credentials 1. Seed credentials in the OS image! 2. Commit encrypted config data to DVCS repository Pros Cons Data stored alongside code in version control Distributing decryption key to nodes varies by tool Easily updated Key distribution

Slide 44

Slide 44 text

Distributing Credentials 1. Seed credentials in the OS image! 2. Commit encrypted config data to DVCS repository! 3. Asymmetric encryption Pros Cons Public/Private key pair may already exist Requires mature, possibly automated cert infrastructure Easy rotation and revocation Limited implementations No shared secret

Slide 45

Slide 45 text

Delivery Challenges 1. Zero downtime 2. Distributing credentials 3. Database migrations

Slide 46

Slide 46 text

Database Migrations 1. NoSQL vs Relational!

Slide 47

Slide 47 text

Database Migrations 1. NoSQL vs Relational! 2. Multi-stage! a. Make backward compatible DB changes ! b. Run new code that is both backward and forward compatible! c. Migrate old data to new schema! d. Remove code that understands old schema! e. Clean up old schema

Slide 48

Slide 48 text

Delivery Challenges 1. Zero downtime! 2. Distributing credentials! 3. Database migrations! 4. Distributing the code! 5. Updating the config! 6. Rollbacks

Slide 49

Slide 49 text

Thanks! ! Ben Whaley ! bwhaley.com @iAmTheWhaley