Infrastructure as Code

21
Infrastructure As Code 2015 Q2 EMC Accreditation Jonas Rosland & Matt Cowger

Transcript of Infrastructure as Code

Page 1: Infrastructure as Code

Infrastructure As Code

2015 Q2 EMC AccreditationJonas Rosland & Matt Cowger

Page 2: Infrastructure as Code

What do we define as infrastructure?

Page 3: Infrastructure as Code
Page 4: Infrastructure as Code
Page 5: Infrastructure as Code
Page 6: Infrastructure as Code

Why define infrastructure as code?• 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

Page 7: Infrastructure as Code

How do we do this?• Desired state specified in text files

• Autonomic (self-corrects to desired state)

• State should be known through monitoring

• Remove snowflake servers

Page 8: Infrastructure as Code

Why store them in text files?• Easy to read and edit

• Shareable

• Can use standard version control like Git or SVN

• Becomes executable documentation

Page 9: Infrastructure as Code

Simple examplenode 'www2' { class { 'apache': } # use apache module apache::vhost { 'awesomewebsite.com': # define vhost resource port => '80', docroot => '/var/www/html' }}

Page 10: Infrastructure as Code

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

Page 11: Infrastructure as Code
Page 12: Infrastructure as Code
Page 13: Infrastructure as Code

Manually configured environments are like a

house of cards in a china shop— Neal Ford

Page 14: Infrastructure as Code

Snowflake serversDeploying, provisioning and scaling automatically is virtually impossible if every server is unique

Adds friction between the requestor and the deployer

Mistakes happenWe're all human

Page 15: Infrastructure as Code

What can happen if you don't treat

infrastructure as code?

Page 16: Infrastructure as Code

Some firms have found that up to 60% of failures are caused by human error, not

hardware failure

Page 17: Infrastructure as Code

Example - Knight Capital Group

Page 18: Infrastructure as Code

Knight Capital Group - What happened?Manual deployment of new trading software

7 of 8 servers correctly updated

Old function still alive on the 8th server led to

$440 million loss in 45 minutes

Page 19: Infrastructure as Code

Treat your infrastructure as code

Page 20: Infrastructure as Code

BenefitsSelf documenting infrastructure

You now have source code for how anything in your datacenter is setup

Executable documentation

Page 21: Infrastructure as Code

Further reading:PuppetLabsVagrantDocker

Infrastructure as Code: A reason to smile