Top Banner
1 © Copyright 2015 EMC Corporation. All rights reserved. INFRASTRUCTURE AS CODE BAN SNOWFLAKE SERVERS 1 © Copyright 2015 EMC Corporation. All rights reserved.
59

VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

Feb 08, 2017

Download

Technology

Jonas Rosland
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

1© Copyright 2015 EMC Corporation. All rights reserved.

INFRASTRUCTURE AS CODEBAN SNOWFLAKE SERVERS

1© Copyright 2015 EMC Corporation. All rights reserved.

Page 2: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

2© Copyright 2015 EMC Corporation. All rights reserved. 2© Copyright 2015 EMC Corporation. All rights reserved.

Jonas RoslandDeveloper AdvocateEMC {code}

@jonasrosland

Loves retro gamingTalks a lot

Page 3: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

3© Copyright 2015 EMC Corporation. All rights reserved. 3© Copyright 2015 EMC Corporation. All rights reserved.

Reid VandewieleSolutions EngineerPuppet Labs®

@reidmv

Biking, HikingCode

Page 4: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

4© Copyright 2015 EMC Corporation. All rights reserved.

Page 5: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

5© Copyright 2015 EMC Corporation. All rights reserved.

WHAT IS DEVOPS?

Page 6: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

6© Copyright 2015 EMC Corporation. All rights reserved.

AN IDEA OR COLLABORATIVE CULTURE/PHILOSOPHY BETWEEN

TECHNICAL TEAMS

Page 7: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

7© Copyright 2015 EMC Corporation. All rights reserved.

UNIFIED PROCESSES AND TOOLS FOR FASTER END-TO-END DELIVERY

OF QUALITY SOFTWARE

Page 8: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

8© Copyright 2015 EMC Corporation. All rights reserved.

NOT A JOB DESCRIPTION!

Page 9: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

9© Copyright 2015 EMC Corporation. All rights reserved.

SO WHY SHOULD YOU CARE?

Page 10: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

10© Copyright 2015 EMC Corporation. All rights reserved.

YOU CAN'T WAIT 6 MONTHS FOR A FEATURE UPGRADE/BUG FIX/ETC

Page 11: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

11© Copyright 2015 EMC Corporation. All rights reserved.

SOLVE CONFIGURATION DRIFT ISSUES QUICKLY

Page 12: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

12© Copyright 2015 EMC Corporation. All rights reserved.

KNOW EXACTLY WHAT'S WRONG, WHERE AND WHY

Page 13: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

13© Copyright 2015 EMC Corporation. All rights reserved.http://46zwyrvli634e39iq2l9mv8g.wpengine.netdna-cdn.com/wp-content/uploads/2013/06/DevOps-infinity-loop2.png

Page 14: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

14© Copyright 2015 EMC Corporation. All rights reserved.

LAST BUT NOT LEAST, IMPROVE TEAM COMMUNICATION

Page 15: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

15© Copyright 2015 EMC Corporation. All rights reserved.

SO WHAT'S THE RESULT OF DEVOPS?

Page 16: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

16© Copyright 2015 EMC Corporation. All rights reserved.

IT'S REALLY BIG ACTUALLY...

Page 17: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

17© Copyright 2015 EMC Corporation. All rights reserved.

DEVOPS PRACTICES AND IT PERFORMANCE IMPACT

ORGANIZATIONAL PERFORMANCE

http://www.slideshare.net/realgenekim/2014-state-of-devops-findings-velocity-conference

Page 18: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

18© Copyright 2015 EMC Corporation. All rights reserved.

LET'S START WITH

INFRASTRUCTURE AS CODE

Page 19: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

19© Copyright 2015 EMC Corporation. All rights reserved.

WHAT DO WE DEFINE AS INFRASTRUCTURE?

Page 20: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

20© Copyright 2015 EMC Corporation. All rights reserved.

Page 21: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

21© Copyright 2015 EMC Corporation. All rights reserved.

Page 22: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

22© Copyright 2015 EMC Corporation. All rights reserved.

Page 23: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

23© Copyright 2015 EMC Corporation. All rights reserved.

• Deploy, monitor and connect together all the pieces needed to run services for the organization• Processes and tools for faster end-to-end delivery of

quality services• Automation comes built-in

WHY DEFINE INFRASTRUCTURE AS CODE?

Page 24: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

24© Copyright 2015 EMC Corporation. All rights reserved.

• Desired state specified in text files• Autonomic (self-corrects to desired state)• State should be known through monitoring• Remove snowflake servers

HOW DO WE DO THIS?

Page 25: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

25© Copyright 2015 EMC Corporation. All rights reserved.

• Easy to read and edit• Shareable• Can use standard version control like Git or SVN• Becomes executable documentation

WHY STORE THEM IN TEXT FILES?

Page 26: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

26© Copyright 2015 EMC Corporation. All rights reserved.

node 'www2' {

class { 'apache': } # use apache module

apache::vhost { 'awesomewebsite.com': # define vhost

port => '80',

docroot => '/var/www/html'

}

}

SIMPLE EXAMPLE

Page 27: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

27© Copyright 2015 EMC Corporation. All rights reserved.

user { root: ensure => present, password => '$ecretP@ssw0rd',}

CHANGE ROOT PASSWORD

Page 28: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

28© Copyright 2015 EMC Corporation. All rights reserved.

MANUALLY CONFIGURED ENVIRONMENTS ARE LIKE A HOUSE

OF CARDS IN A CHINA SHOP

- NEAL FORD

Page 29: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

29© Copyright 2015 EMC Corporation. All rights reserved.

• Deploying, provisioning and scaling automatically is virtually impossible if every server is unique• Adds friction between the requestor and the deployer• Mistakes happen• We're all human

SNOWFLAKE SERVERS

Page 30: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

30© Copyright 2015 EMC Corporation. All rights reserved.

WHAT CAN HAPPEN IF YOU DON'T TREAT

INFRASTRUCTURE AS CODE?

Page 31: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

31© Copyright 2015 EMC Corporation. All rights reserved.

UP TO 60% OF FAILURES ARE CAUSED BY HUMAN ERROR, NOT

HARDWARE FAILURE

Page 32: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

32© Copyright 2015 EMC Corporation. All rights reserved.

EXAMPLE - KNIGHT CAPITAL GROUP

https://infocus.emc.com/wp-content/uploads/2012/08/KCG.jpg

Page 33: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

33© Copyright 2015 EMC Corporation. All rights reserved.

• Manual deployment of new trading software• 7 of 8 servers correctly updated• Old function still alive on the 8th server led to…

KNIGHT CAPITAL GROUP - WHAT HAPPENED?

Page 34: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

34© Copyright 2015 EMC Corporation. All rights reserved.

$440 MILLION LOSSIN 45 MINUTES

Page 35: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

35© Copyright 2015 EMC Corporation. All rights reserved.

SO

Page 36: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

36© Copyright 2015 EMC Corporation. All rights reserved.

TREAT YOUR INFRASTRUCTURE AS CODE

Page 37: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

37© Copyright 2015 EMC Corporation. All rights reserved.

BARE METAL APP STACK

INFRASTRUCTURE AS CODE

Page 38: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

38© Copyright 2015 EMC Corporation. All rights reserved.

• Razor– Text / JSON configuration– Bare-metal provisioning– Policy based

• Puppet– Text configuration manifests– Software configuration management

INFRASTRUCTURE AS CODE

Page 39: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

39© Copyright 2015 EMC Corporation. All rights reserved.

OS – DNS – DHCP - DB

Storage – Network - Compute

INFRASTRUCTURE AS CODERA

ZOR

Page 40: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

40© Copyright 2015 EMC Corporation. All rights reserved.

OS – DNS – DHCP - DB

Storage – Network - Compute

App Queue Business Logic

PUPP

ETINFRASTRUCTURE AS CODE

Page 41: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

41© Copyright 2015 EMC Corporation. All rights reserved.

STARTING ENVIRONMENT:INFRASTRUCTURE AS CODE

One Razor ServerOne Puppet Server

Page 42: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

42© Copyright 2015 EMC Corporation. All rights reserved.

LIVE DEMO

INFRASTRUCTURE AS CODE

Page 43: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

43© Copyright 2015 EMC Corporation. All rights reserved.

INFRASTRUCTURE AS CODE

Boot PXE To Razor

OS Installed Puppetize! Decommissio

n

One-time Provisioning

Lifetime Management

Page 44: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

44© Copyright 2015 EMC Corporation. All rights reserved.

Boot PXE To Razor

OS Installed Puppetize! Decommissio

n

One-time Provisioning

Lifetime Management

INFRASTRUCTURE AS CODE

Page 45: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

45© Copyright 2015 EMC Corporation. All rights reserved.

• Self documenting infrastructure• You now have source code for how anything in your

datacenter is setup• Executable documentation

RECAP OF THE BENEFITS

Page 46: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

46© Copyright 2015 EMC Corporation. All rights reserved.

ALRIGHT

Page 47: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

47© Copyright 2015 EMC Corporation. All rights reserved.

THEN WHAT?

Page 48: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

48© Copyright 2015 EMC Corporation. All rights reserved.

HOW ABOUTAUTOMATING SOME MORE?

Page 49: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

49© Copyright 2015 EMC Corporation. All rights reserved.

• Jenkins CI• Travis CI• Codeship• CloudFoundry• OpenShift

DEPLOYMENT AUTOMATION

Page 50: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

50© Copyright 2015 EMC Corporation. All rights reserved.

• Docker• Framework for application container management• HUGE community

CONTAINERS

Page 51: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

51© Copyright 2015 EMC Corporation. All rights reserved.

• Splunk• Loggly• LogInsight• ELK Stack

– ElasticSearch– LogStash– Kibana

LOG MANAGEMENT

Page 52: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

52© Copyright 2015 EMC Corporation. All rights reserved.

• vCenter Operations• New Relic• AppDynamics• DataDog

PERFORMANCE MANAGEMENT

Page 53: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

53© Copyright 2015 EMC Corporation. All rights reserved.

• Nagios• Sensu• VictorOps• PagerDuty

MONITORING

Page 54: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

54© Copyright 2015 EMC Corporation. All rights reserved.

• Slack• HipChat• Trello• Asana

COMMUNICATION

Page 55: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

55© Copyright 2015 EMC Corporation. All rights reserved.

• Github• Quip

COLLABORATION

Page 56: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

56© Copyright 2015 EMC Corporation. All rights reserved.

• And by smartly we mean cooperatively between Devs and Ops• Will help operators understand what's running and

happening in the infrastructure• Will give developers insight into the underlying

infrastructure and the way it behaves under load

USE THESE TOOLS SMARTLY

Page 57: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

57© Copyright 2015 EMC Corporation. All rights reserved.

• Start talking about it• Choose low-hanging fruit• Learn, make wrong decisions, learn again• Involve the broader team

– Give books, presentations, blog posts etc.

SO HOW DO WE GET STARTED?

Page 58: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments

58© Copyright 2015 EMC Corporation. All rights reserved.

QUESTIONS?Jonas Rosland

Developer Advocate @ EMC {code}@jonasrosland

Page 59: VMworld 2015 San Francisco - INF5432 - Infrastructure as Code - Ban Snowflake Deployments