Infrastructure as Code
-
Upload
matt-cowger -
Category
Internet
-
view
17 -
download
0
Transcript of Infrastructure as Code
![Page 1: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/1.jpg)
Infrastructure As Code
2015 Q2 EMC AccreditationJonas Rosland & Matt Cowger
![Page 2: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/2.jpg)
What do we define as infrastructure?
![Page 3: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/3.jpg)
![Page 4: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/4.jpg)
![Page 5: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/5.jpg)
![Page 6: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/6.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/7.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/8.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/9.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/10.jpg)
Change root passworduser { root: ensure => present, password => '$ecretP@ssw0rd',}
![Page 11: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/11.jpg)
![Page 12: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/12.jpg)
![Page 13: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/13.jpg)
Manually configured environments are like a
house of cards in a china shop— Neal Ford
![Page 14: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/14.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/15.jpg)
What can happen if you don't treat
infrastructure as code?
![Page 16: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/16.jpg)
Some firms have found that up to 60% of failures are caused by human error, not
hardware failure
![Page 17: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/17.jpg)
Example - Knight Capital Group
![Page 18: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/18.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/19.jpg)
Treat your infrastructure as code
![Page 20: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/20.jpg)
BenefitsSelf documenting infrastructure
You now have source code for how anything in your datacenter is setup
Executable documentation
![Page 21: Infrastructure as Code](https://reader030.fdocuments.us/reader030/viewer/2022032506/55cddcf6bb61eb78368b469b/html5/thumbnails/21.jpg)
Further reading:PuppetLabsVagrantDocker
Infrastructure as Code: A reason to smile