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
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
Why store them in text files?
• Easy to read and edit
• Shareable
• Can use standard version control like Git or SVN
• Becomes executable documentation
Simple example
node 'www2' {
class { 'apache': } # use apache module
apache::vhost { 'awesomewebsite.com': # define vhost resource
port => '80',
docroot => '/var/www/html'
}
}
Snowflake servers
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
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