Infrastructure as Code
-
Upload
robert-greiner -
Category
Documents
-
view
167 -
download
5
Transcript of Infrastructure as Code
Infrastructure as CodeMerging Development and Operations for a more
effective application development process
FIN talkRyan RoarkClement Yu
Robert Greiner
February 19, 2014
Table of Contents1. The Problem
2. Infrastructure
3. Application
4. Code
5. Putting it all together
6. AWS Goodness
7. Wrapping Up
CHAPTERThe Problem(s)
Developers
• Take requirements• Write Code• Write Tests (Maybe)• Manual Testing• Refactor
• Developers create
Operations
• Server Admins• DBAs• Release• Networking• Security• Monitoring
• Operators maintain
People who deal with applications after they are created
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
Poll: How long does it take to provision a new
server at your client?
SpaceX launches 1 rocket every 4 weeks
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)
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
CHAPTERInfrastructure
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
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
Non-AWS Infrastructure• Manual Labor
• Server admin physical installation
• Error Prone
• Chef-Provisioning
• VMWare VirtualCenter
• Heat for OpenStack
• Azure PaaS
CHAPTERApplication
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
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
CHAPTERCode
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
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
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
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
CHAPTERPutting it all
together
Putting it all together
Infrastructure Provisioning Application Provisioning Code Provisioning
Now it’s your turn
Developers Operations Dev + Ops
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
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
You heard right… Your score will (probably) be determined by Judges
CHAPTERAWS Goodness
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
CHAPTERWrapping Up
The Automation Dream• Automation is our client’s and your friend
• Automation is hard work
• Free to experiment• AWS Free Tier
• Azure Free Trial