Download - Infrastructure as Code
![Page 1: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/1.jpg)
Infrastructure as CodeMerging Development and Operations for a more
effective application development process
FIN talkRyan RoarkClement Yu
Robert Greiner
February 19, 2014
![Page 2: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/2.jpg)
Table of Contents1. The Problem
2. Infrastructure
3. Application
4. Code
5. Putting it all together
6. AWS Goodness
7. Wrapping Up
![Page 3: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/3.jpg)
CHAPTERThe Problem(s)
![Page 4: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/4.jpg)
Developers
• Take requirements• Write Code• Write Tests (Maybe)• Manual Testing• Refactor
• Developers create
![Page 5: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/5.jpg)
Operations
• Server Admins• DBAs• Release• Networking• Security• Monitoring
• Operators maintain
People who deal with applications after they are created
![Page 6: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/6.jpg)
Typical Software Development Flow
Write Code(Dev)
Create Tests Run all TestsDeploy to Dev/QA (Ops)
Integration Tests
QA TestsDeploy to
UAT
More Testing – Regression
(QA)
Performance Tests
Configure Production
Environment
Buy Hardware
Install OS / Software
Provision Database
Upgrade RAM
Deploy to Production
Manual
Time Consuming
![Page 7: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/7.jpg)
Poll: How long does it take to provision a new
server at your client?
![Page 8: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/8.jpg)
SpaceX launches 1 rocket every 4 weeks
![Page 9: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/9.jpg)
DevOps
DevOps is the practice of operations and development engineers participating together in the entire service lifecycle, from design through the development process to production support. (TheAgileAdmin)
![Page 10: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/10.jpg)
The New Normal
It’s up to us as developers to help enable our operations counterparts. We can use our skills to teach others how to make their jobs easier, so our jobs become easier.
This requires developers to gain skills in operations: networking, OS, patching, deployments, etc…
Every systems administrator should know Ruby and every Developer should know how to configure an automated deployment on a Windows or Linux server they setup themselves
![Page 11: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/11.jpg)
CHAPTERInfrastructure
![Page 12: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/12.jpg)
Infrastructure Automation• Write your code and write the infrastructure it
runs on• Servers, Networking, Users, etc…
• Documented, Repeatable, and Fast
• Fixing Deployment Pains• A/B Deployments (blue/green)
• Rolling Deployments
![Page 13: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/13.jpg)
Infrastructure Tooling• CloudFormation for AWS
• Template driven design with JSON
• Templates versioned like code
• AWS::CloudFormation::Init• Bootstrap other processes
• OPSWorks & Elastic BeanStalk for AWS
• Demo CloudFormation
![Page 14: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/14.jpg)
Non-AWS Infrastructure• Manual Labor
• Server admin physical installation
• Error Prone
• Chef-Provisioning
• VMWare VirtualCenter
• Heat for OpenStack
• Azure PaaS
![Page 15: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/15.jpg)
CHAPTERApplication
![Page 16: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/16.jpg)
Configuration Management
• Transform any server quickly• Build it as a web server, DB server, etc.• Automate build process
• Install and configuration steps are saved as code• Re-configure quickly• Avoid dependency issues
![Page 17: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/17.jpg)
Configuration Tools
• Powerful• Robust• Written
in Ruby• Developer-
friendly• Steep learning
curve for sys-admins
• Mature• Built for sys-
admins• Easy JSON
data structure• Master pushes
changes to agents
• AWS version of Chef
• Free to use with instances
![Page 18: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/18.jpg)
CHAPTERCode
![Page 19: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/19.jpg)
Continuous IntegrationDeploy your code quickly, consistently,
and often• Practice Deploying Code
• Detect problems faster• Automatically build code & run tests
• Eliminate the “well it works on my machine”
dilemma
• Encourages public shaming
![Page 20: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/20.jpg)
CI in the Sky Cloud• Code Deploy
• Hook into source control and automate your
deployments to an elastic set of resources
• Code Pipeline• Continuous delivery and software release automation
• Code Commit• Code is ‘closer’ to servers it runs on
• Integrates with CodeDeploy and CodePipeline
• Demo Code Deploy
![Page 21: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/21.jpg)
Automation outside AWS• Jenkins
• Self hosted CI Server
• Travis-CI• Hosted CI Server
• TFS / VisualStudio.com• Does a little of EVERYTHING
• Easily integrate with Azure
![Page 22: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/22.jpg)
SummaryINFRASTRUCTURE
• Automatically provision physical hardware
• Unique deployment strategies
• Documented and versioned environment configurations
APPLICATION
• Transform a server into web or database server
• Reduce number of steps in configuration
CODE
• Automatically build, test, and deploy code
• Identify issues quickly by performing often
![Page 23: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/23.jpg)
CHAPTERPutting it all
together
![Page 24: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/24.jpg)
Putting it all together
Infrastructure Provisioning Application Provisioning Code Provisioning
Now it’s your turn
Developers Operations Dev + Ops
![Page 25: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/25.jpg)
2015 AWS DevOps Challenge
Design and implement a fully-automated AWS environment suitable for hosting and operating a complex open-source application.
The current plan is to have a panel of judges decide the winning team’s presentation and demo of solution
Monitor
• Dashboard Status Overview
Alert
• Active Push Notifications on Error
Log
• Application / OS log management
Audit
• Complete History of Interactions
Provision
• On-Demand Environment
Manage
• Live Changes to Environment
Deploy
• Automated Application Deployment
Patch
• Live Changes to Application
![Page 26: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/26.jpg)
What’s in it for me?
Gain real world, hands-on experience with automated provisioning (infrastructure, application, code)
Showcase your skills to the Dallas officeGain experience on the AWS platformTeam up to design a solution that
outperforms the competitionWin a trip to the AWS re:Invent 2015
conference in Las Vegas, NV on October 6-8, 2015
![Page 27: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/27.jpg)
You heard right… Your score will (probably) be determined by Judges
![Page 28: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/28.jpg)
CHAPTERAWS Goodness
![Page 29: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/29.jpg)
New AWS ServicesAt re:Invent, AWS released a number of new services
to their line-up. Here are the highlights.
Lambda Aurora
EC2 Container
Service
![Page 30: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/30.jpg)
CHAPTERWrapping Up
![Page 31: Infrastructure as Code](https://reader031.vdocuments.us/reader031/viewer/2022013118/55a64a021a28abd06d8b45e7/html5/thumbnails/31.jpg)
The Automation Dream• Automation is our client’s and your friend
• Automation is hard work
• Free to experiment• AWS Free Tier
• Azure Free Trial