SlideShare une entreprise Scribd logo
1  sur  49
VCs on line 1
Scaling under pressure
with
Chef, Packer and Terraform
Opex Founders
Sanju Burkule & Gunanand Nagarkar
15-20 years Global
Experience
(US, Europe, India)
Monitoring &
infrastructure domain
R&D background
Who are we: Uchit Vyas
6 years of exciting experience
Infrastructure automation domain
Leading Cloud Infrastructure
automation in Opex Software
Introduction
Single metric we measure: Speed with correctness
Mission: Automate IT. Create Time
Focus: SAAS applications
SAAS Startup Dream
Scaling with SPEED
How to make this happen, technically?
Images: 4actionmarketing.net, dreamstime.com, thenextweb.com
Pressure from investors
How to make this happen, technically?
Images: startupinitiative.com
SAAS is value: Step 1 of 3
Clear value is delivered
SAAS is value: Step 2 of 3
Clear value is delivered
Onboarding new customers rapidly
SAAS is value: Step 3 of 3
Clear value is delivered
Onboarding new customers rapidly
Upgrade fast, maintain lead,
make value irresistible
Mortality Rate
Images: jeepneymanilaph.files.wordpress.com
Execution Problems
All good
Execution Problems
All good
Harden the OS skill not available immediately
Automate app deploy/cfg after thought
Automate Testing fully after thought
Execution Problems
All good
Harden the OS skill not available immediately
Automate app deployment after thought
Automate app configuration after thought
Microservices independently upgradable?
Lead starting to lose speed, competition!
Images: avopress.com, animationmagazine.net, thenextweb.com
1412/05/15
DevOps + Strong Ops
Dev
Test
Ops
15
Transform test automation for DevOps
Strong Ops to scale
Helpdesk Monitoring
Configuration
Management
Auto-Self
healing
Synthetic
Monitoring
Log analytics
Good News
OS Hardening: Why is it imp?
protecting IP
unfair competition
cybersecurity
private data
direct or indirect
attacks via cloud
President Barack Obama delivers remarks at the Business Roundtable offices in Washington
September 16, 2015.
OS Hardening
Use Chef templates and Terraform
Include following in server configuration definition
Security Rules, Password policies,
Secure SSH, Compliance policy
Important agents (AV, monitoring)
Use “Chef-Vault” for storing secrets
Sample code: login definition
template '/etc/login.defs' do
source 'login.defs.erb'
mode '0444'
owner 'root'
group 'root'
variables(
additional_user_paths: node['env’] …
)
end
Sample code: erb file
'sample.erb'
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
Two simple, but powerful concepts
a) Expression evaluation
b) Variable value replacement
Sample code: login definition
variables(
password_max_age: node['auth']['pw_max_age'],
password_min_age: node['auth']['pw_min_age'],
login_retries: node['auth']['retries'],
login_timeout: node['auth']['timeout'],
chfn_restrict: '', # "rwh"
allow_login_without_home: node['auth']
['allow_homeless'],
…
)
Quality gates: Serverspec
High speed lab creation
Terraform is parallelized
Auto-sequencing based on graphs
Terraform can integrate with any layer of the
stack
Lab setup on pre-existing servers, provisioning
servers from scratch - both are supported
Speed of provisioning
Why we chose terraform for high-speed scaling
Number of Machines Chef-metal Terraform
10 2.7 minutes 1.20 minutes
30 3.9 minutes 3.08 minutes
40 5.6 minutes 3.36 minutes
60 9.4 minutes 7.08 minutes
100 15.2 minutes 7.41 minutes
Distributing load elegantly
Next few slides explain the code.
Key highlighted portions are in a red rectangle
Use cases 1: Synthetic monitoring
Use case 2: Load balancing across all regions in a
cloud
How to scale across AZs? How to scale across clouds?
.tf Provisioning (AWS multi AZs)
provider "aws" {
region = "us-west-2"
access_key = "XXXXXXX"
secret_key = "XXXXXXXXX"
}ia
variable "region"
{
default = "us-west-2"
}
variable "region_az" {
default = {
"us-east-1" = "us-east-1a,us-east-1c,us-east-1d,us-east-1e"
"us-west-1" = "us-west-1a,us-west-1b,us-west-1c"
"us-west-2" = "us-west-2a,us-west-2b,us-west-2c"
"eu-west-1" = "eu-west-1a,eu-west-1b,eu-west-1c"
"eu-central-1" = "eu-central-1a,eu-central-1b"
"ap-southeast-1" = "ap-southeast-1a,ap-southeast-1b"
"ap-northeast-1" = "ap-northeast-1a,ap-northeast-1b,ap-northeast-1c"
"ap-southeast-2" = "ap-southeast-2a,ap-southeast-2b"
"sa-east-1" = "sa-east-1a,sa-east-1b,sa-east-1c"
}
}
Variables for AZs and AMIs
Lets use this region to start
Region based AZ map
variable "region_az" {
default = {
"us-east-1" = "us-east-1a,us-east-1c,us-east-1d,us-east-1e"
"us-west-1" = "us-west-1a,us-west-1b,us-west-1c"
"us-west-2" = "us-west-2a,us-west-2b,us-west-2c"
"eu-west-1" = "eu-west-1a,eu-west-1b,eu-west-1c"
"eu-central-1" = "eu-central-1a,eu-central-1b"
"ap-southeast-1" = "ap-southeast-1a,ap-southeast-1b"
"ap-northeast-1" = "ap-northeast-1a,ap-northeast-1b,ap-northeast-1c"
"ap-southeast-2" = "ap-southeast-2a,ap-southeast-2b"
"sa-east-1" = "sa-east-1a,sa-east-1b,sa-east-1c"
}
}
variable "ami"
{
default = ...
used in lookup
variable "ami"
{
default =
{
"description" = "Ubuntu server 14.04 ami id"
"us-west-1" = "ami-df6a8b9b"
"us-west-2" = "ami-5189a661"
"us-east-1" = "ami-d05e75b8"
"eu-west-1" = "ami-47a23a30"
"eu-central-1" = "ami-accff2b1"
"ap-northeast-1" = "ami-936d9d93"
"ap-southeast-1" = "ami-96f1c1c4"
"ap-southeast-2" = "ami-69631053"
"sa-east-1" = "ami-4d883350"
}
}
Region based Ubuntu AMI map
resource "aws_instance" "web" {
ami = "${lookup(var.ami, var.region)}"
instance_type = "${var.instance_type}"
count = "${var.servers}"
availability_zone =
"${element(split(",",lookup(var.region_az,
var.region)),
count.index%length
(split(",",lookup(var.region_az, var.
region))
))}"
Resource declaration
resource "aws_instance" "web" {
ami = "${lookup(var.ami, var.region)}"
instance_type = "${var.instance_type}"
count = "${var.servers}"
availability_zone =
"${element(split(",",lookup(var.region_az,
var.region)),
count.index%length
(split(",",lookup(var.region_az, var.
region))
))}"
Scaling and iterating
Math library added from
terraform v0.4
Simulating iteration
Scaling to 100s of servers
Multi-cloud distribution
Step 1
Creating an image
for each cloud
Step 2
Using that image in
the code that we
just saw
Creating image using Packer
"provisioners": [{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get update",
"sudo apt-get install -y redis-
server"
]
}] Provisioning Redis server
Strong Ops - Chef provisioner
"provisioners": [{
"type": "chef-client",
"server_url”: “https://mychefserver.com/”
}]
Cookbooks and Recipes:
Helpdesk, monitoring server, monitoring clients, antivirus
agents, auto-healing servers, analytics data couriers...
Using Chef client-server
App context: Data bags
Creating image using Packer
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-example {{timestamp}}"
},
Build in Amazon Cloud
Same code for multi-cloud
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-example {{timestamp}}"
},
{
"type": "digitalocean",
"api_token": "{{user `do_api_token`}}",
"image": "ubuntu-14-04-x64",
"region": "nyc3",
"size": "512mb"
}],
Build in Amazon Cloud Build in Digital Ocean Cloud
Beautiful multi-color output
amazon-ebs output will be in this color.
digitalocean output will be in this color.
==> digitalocean: Creating temporary ssh key for droplet...
==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Inspecting the source AMI...
==> amazon-ebs: Creating temporary keypair: packer 55f6c5e5-2b50-c8c3-5e37-7d246b6f0bca
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing access to port 22 the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> digitalocean: Creating droplet...
==> digitalocean: Waiting for droplet to become active...
Pilot of great idea - clear value delivered - all good
Onboarding new customers rapidly without sacrificing quality
Harden the OS - chef-templates, packer, Terraform
Automate app deployment - Terraform + Chef
Automate app configuration - Terraform + Chef + Data bags
Pivot fast, maintain the lead, make value irresistible
DevOps for building new features fast - Adopt DevOps early
Upgrade customers DevOps pipeline + Roles + Environments
Hope this helps!
The 4th question in daily agile scrums that was never asked
4th question: Are you blocking Ops?
Meaning:
a) Are there any new binaries created/deleted?
b) Are there any configuration files that changed?
c) Are there any configuration attributes that changed?
Why DevOps projects fail
Recap, takeaway
Easy to code infrastructure
Easy to replicate infrastructure
Easy to distribute infrastructure across AZs
Easy to balance infrastructure across regions
Easy to balance infrastructure across clouds,countries
Easy to integrate with other apps
The 4th scrum question
Opex forecast: Next few years
Cheaper, stable, scalable, elastic infra needed by
millions of businesses to win
&
Opex is poised to provide innovative solutions
Opex Software Thanks You
AUTOMATE IT. CREATE TIME

Contenu connexe

Tendances

Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
Rayed Alrashed
 
Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
Infrastructure as code with Terraform
Infrastructure as code with TerraformInfrastructure as code with Terraform
Infrastructure as code with Terraform
Sam Bashton
 

Tendances (20)

Terraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud ServicesTerraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud Services
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As Code
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & Packer
 
Baking in the cloud with packer and puppet
Baking in the cloud with packer and puppetBaking in the cloud with packer and puppet
Baking in the cloud with packer and puppet
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps begins
 
London Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in ProductionLondon Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in Production
 
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-end
 
Infrastructure as code with Terraform
Infrastructure as code with TerraformInfrastructure as code with Terraform
Infrastructure as code with Terraform
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 
(APP310) Scheduling Using Apache Mesos in the Cloud | AWS re:Invent 2014
(APP310) Scheduling Using Apache Mesos in the Cloud | AWS re:Invent 2014(APP310) Scheduling Using Apache Mesos in the Cloud | AWS re:Invent 2014
(APP310) Scheduling Using Apache Mesos in the Cloud | AWS re:Invent 2014
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
Altitude SF 2017: Stories from TED
Altitude SF 2017: Stories from TEDAltitude SF 2017: Stories from TED
Altitude SF 2017: Stories from TED
 
PowerShell User Group Hamburg - PowerCLI
PowerShell User Group Hamburg - PowerCLIPowerShell User Group Hamburg - PowerCLI
PowerShell User Group Hamburg - PowerCLI
 
Kraken Front-Trends
Kraken Front-TrendsKraken Front-Trends
Kraken Front-Trends
 
AnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and TricksAnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and Tricks
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 

En vedette

100 blue mix days technical training
100 blue mix days technical training100 blue mix days technical training
100 blue mix days technical training
Ajit Yohannan
 
General physicians and the adf Heddle
General physicians and the adf HeddleGeneral physicians and the adf Heddle
General physicians and the adf Heddle
Leishman Associates
 
Info qiy foundation digital me - dappre-eng-aug17
Info qiy foundation   digital me - dappre-eng-aug17Info qiy foundation   digital me - dappre-eng-aug17
Info qiy foundation digital me - dappre-eng-aug17
BigDataExpo
 
Sfeldman bbworld 07_going_enterprise (1)
Sfeldman bbworld 07_going_enterprise (1)Sfeldman bbworld 07_going_enterprise (1)
Sfeldman bbworld 07_going_enterprise (1)
Steve Feldman
 
The Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
The Loss of HMAS SYDNEY 2: Medical Aspects- WestphalenThe Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
The Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
Leishman Associates
 

En vedette (20)

Big Data Expo 2015 - Data Science Center Eindhove
Big Data Expo 2015 - Data Science Center EindhoveBig Data Expo 2015 - Data Science Center Eindhove
Big Data Expo 2015 - Data Science Center Eindhove
 
100 blue mix days technical training
100 blue mix days technical training100 blue mix days technical training
100 blue mix days technical training
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
 
Greach 2014 Sesamestreet Grails2 Workshop
Greach 2014 Sesamestreet Grails2 Workshop Greach 2014 Sesamestreet Grails2 Workshop
Greach 2014 Sesamestreet Grails2 Workshop
 
VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)VMs All the Way Down (BSides Delaware 2016)
VMs All the Way Down (BSides Delaware 2016)
 
Microsoft Big Data Expo
Microsoft Big Data ExpoMicrosoft Big Data Expo
Microsoft Big Data Expo
 
General physicians and the adf Heddle
General physicians and the adf HeddleGeneral physicians and the adf Heddle
General physicians and the adf Heddle
 
Trends at JavaOne 2016: Microservices, Docker and Cloud-Native Middleware
Trends at JavaOne 2016: Microservices, Docker and Cloud-Native MiddlewareTrends at JavaOne 2016: Microservices, Docker and Cloud-Native Middleware
Trends at JavaOne 2016: Microservices, Docker and Cloud-Native Middleware
 
Info qiy foundation digital me - dappre-eng-aug17
Info qiy foundation   digital me - dappre-eng-aug17Info qiy foundation   digital me - dappre-eng-aug17
Info qiy foundation digital me - dappre-eng-aug17
 
Bol.com
Bol.comBol.com
Bol.com
 
Sfeldman bbworld 07_going_enterprise (1)
Sfeldman bbworld 07_going_enterprise (1)Sfeldman bbworld 07_going_enterprise (1)
Sfeldman bbworld 07_going_enterprise (1)
 
Big Data Expo 2015 - Trillium software Big Data and the Data Quality
Big Data Expo 2015 - Trillium software Big Data and the Data QualityBig Data Expo 2015 - Trillium software Big Data and the Data Quality
Big Data Expo 2015 - Trillium software Big Data and the Data Quality
 
The Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
The Loss of HMAS SYDNEY 2: Medical Aspects- WestphalenThe Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
The Loss of HMAS SYDNEY 2: Medical Aspects- Westphalen
 
How to Crunch Petabytes with Hadoop and Big Data Using InfoSphere BigInsights...
How to Crunch Petabytes with Hadoop and Big Data Using InfoSphere BigInsights...How to Crunch Petabytes with Hadoop and Big Data Using InfoSphere BigInsights...
How to Crunch Petabytes with Hadoop and Big Data Using InfoSphere BigInsights...
 
Challenges and outlook with Big Data
Challenges and outlook with Big Data Challenges and outlook with Big Data
Challenges and outlook with Big Data
 
Gastles PXL Hogeschool 2017
Gastles PXL Hogeschool 2017Gastles PXL Hogeschool 2017
Gastles PXL Hogeschool 2017
 
I1 - Securing Office 365 and Microsoft Azure like a rockstar (or like a group...
I1 - Securing Office 365 and Microsoft Azure like a rockstar (or like a group...I1 - Securing Office 365 and Microsoft Azure like a rockstar (or like a group...
I1 - Securing Office 365 and Microsoft Azure like a rockstar (or like a group...
 
KD2017_System Center in the "cloud first" era
KD2017_System Center in the "cloud first" eraKD2017_System Center in the "cloud first" era
KD2017_System Center in the "cloud first" era
 
NTT SIC marketplace slide deck at Tokyo Summit
NTT SIC marketplace slide deck at Tokyo SummitNTT SIC marketplace slide deck at Tokyo Summit
NTT SIC marketplace slide deck at Tokyo Summit
 
Philips Big Data Expo
Philips Big Data ExpoPhilips Big Data Expo
Philips Big Data Expo
 

Similaire à Rapid Infrastructure Provisioning

fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
Wesley Beary
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the Things
Nathan Handler
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as CodePuppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet
 

Similaire à Rapid Infrastructure Provisioning (20)

Scaling with Automation
Scaling with AutomationScaling with Automation
Scaling with Automation
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Beyond AEM Curl Commands
Beyond AEM Curl CommandsBeyond AEM Curl Commands
Beyond AEM Curl Commands
 
Cloud patterns applied
Cloud patterns appliedCloud patterns applied
Cloud patterns applied
 
Cloud Security @ Netflix
Cloud Security @ NetflixCloud Security @ Netflix
Cloud Security @ Netflix
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalk
 
Monkey man
Monkey manMonkey man
Monkey man
 
Load testing with Blitz
Load testing with BlitzLoad testing with Blitz
Load testing with Blitz
 
Streamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache AmbariStreamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache Ambari
 
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
Dive into DevOps | March, Building with Terraform, Volodymyr TsapDive into DevOps | March, Building with Terraform, Volodymyr Tsap
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
 
php & performance
 php & performance php & performance
php & performance
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the Things
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as CodePuppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
 
Testing in Laravel Framework
Testing in Laravel FrameworkTesting in Laravel Framework
Testing in Laravel Framework
 

Plus de Uchit Vyas ☁

Simple Db &amp; Dynamo Db
Simple Db &amp; Dynamo DbSimple Db &amp; Dynamo Db
Simple Db &amp; Dynamo Db
Uchit Vyas ☁
 

Plus de Uchit Vyas ☁ (8)

Service api design validation & collaboration
Service api design validation & collaborationService api design validation & collaboration
Service api design validation & collaboration
 
API Design Collaboration
API Design CollaborationAPI Design Collaboration
API Design Collaboration
 
Defining DevSecOps
Defining DevSecOpsDefining DevSecOps
Defining DevSecOps
 
Let’s Democratize Deployments
Let’s Democratize DeploymentsLet’s Democratize Deployments
Let’s Democratize Deployments
 
Hashicorp Products Overview
Hashicorp Products OverviewHashicorp Products Overview
Hashicorp Products Overview
 
Deployment using aws
Deployment using awsDeployment using aws
Deployment using aws
 
Simple Db &amp; Dynamo Db
Simple Db &amp; Dynamo DbSimple Db &amp; Dynamo Db
Simple Db &amp; Dynamo Db
 
Cloud
CloudCloud
Cloud
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Rapid Infrastructure Provisioning

  • 1. VCs on line 1 Scaling under pressure with Chef, Packer and Terraform
  • 2. Opex Founders Sanju Burkule & Gunanand Nagarkar 15-20 years Global Experience (US, Europe, India) Monitoring & infrastructure domain R&D background
  • 3. Who are we: Uchit Vyas 6 years of exciting experience Infrastructure automation domain Leading Cloud Infrastructure automation in Opex Software
  • 4. Introduction Single metric we measure: Speed with correctness Mission: Automate IT. Create Time Focus: SAAS applications
  • 5. SAAS Startup Dream Scaling with SPEED How to make this happen, technically? Images: 4actionmarketing.net, dreamstime.com, thenextweb.com
  • 6. Pressure from investors How to make this happen, technically? Images: startupinitiative.com
  • 7. SAAS is value: Step 1 of 3 Clear value is delivered
  • 8. SAAS is value: Step 2 of 3 Clear value is delivered Onboarding new customers rapidly
  • 9. SAAS is value: Step 3 of 3 Clear value is delivered Onboarding new customers rapidly Upgrade fast, maintain lead, make value irresistible
  • 12. Execution Problems All good Harden the OS skill not available immediately Automate app deploy/cfg after thought Automate Testing fully after thought
  • 13. Execution Problems All good Harden the OS skill not available immediately Automate app deployment after thought Automate app configuration after thought Microservices independently upgradable? Lead starting to lose speed, competition! Images: avopress.com, animationmagazine.net, thenextweb.com
  • 14. 1412/05/15 DevOps + Strong Ops Dev Test Ops
  • 16. Strong Ops to scale Helpdesk Monitoring Configuration Management Auto-Self healing Synthetic Monitoring Log analytics
  • 18. OS Hardening: Why is it imp? protecting IP unfair competition cybersecurity private data direct or indirect attacks via cloud President Barack Obama delivers remarks at the Business Roundtable offices in Washington September 16, 2015.
  • 19. OS Hardening Use Chef templates and Terraform Include following in server configuration definition Security Rules, Password policies, Secure SSH, Compliance policy Important agents (AV, monitoring) Use “Chef-Vault” for storing secrets
  • 20. Sample code: login definition template '/etc/login.defs' do source 'login.defs.erb' mode '0444' owner 'root' group 'root' variables( additional_user_paths: node['env’] … ) end
  • 21. Sample code: erb file 'sample.erb' <% if @port != 80 -%> Listen <%= @port %> <% end -%> Two simple, but powerful concepts a) Expression evaluation b) Variable value replacement
  • 22. Sample code: login definition variables( password_max_age: node['auth']['pw_max_age'], password_min_age: node['auth']['pw_min_age'], login_retries: node['auth']['retries'], login_timeout: node['auth']['timeout'], chfn_restrict: '', # "rwh" allow_login_without_home: node['auth'] ['allow_homeless'], … )
  • 24. High speed lab creation Terraform is parallelized Auto-sequencing based on graphs Terraform can integrate with any layer of the stack Lab setup on pre-existing servers, provisioning servers from scratch - both are supported
  • 25. Speed of provisioning Why we chose terraform for high-speed scaling Number of Machines Chef-metal Terraform 10 2.7 minutes 1.20 minutes 30 3.9 minutes 3.08 minutes 40 5.6 minutes 3.36 minutes 60 9.4 minutes 7.08 minutes 100 15.2 minutes 7.41 minutes
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Distributing load elegantly Next few slides explain the code. Key highlighted portions are in a red rectangle Use cases 1: Synthetic monitoring Use case 2: Load balancing across all regions in a cloud How to scale across AZs? How to scale across clouds?
  • 32. .tf Provisioning (AWS multi AZs) provider "aws" { region = "us-west-2" access_key = "XXXXXXX" secret_key = "XXXXXXXXX" }ia
  • 33. variable "region" { default = "us-west-2" } variable "region_az" { default = { "us-east-1" = "us-east-1a,us-east-1c,us-east-1d,us-east-1e" "us-west-1" = "us-west-1a,us-west-1b,us-west-1c" "us-west-2" = "us-west-2a,us-west-2b,us-west-2c" "eu-west-1" = "eu-west-1a,eu-west-1b,eu-west-1c" "eu-central-1" = "eu-central-1a,eu-central-1b" "ap-southeast-1" = "ap-southeast-1a,ap-southeast-1b" "ap-northeast-1" = "ap-northeast-1a,ap-northeast-1b,ap-northeast-1c" "ap-southeast-2" = "ap-southeast-2a,ap-southeast-2b" "sa-east-1" = "sa-east-1a,sa-east-1b,sa-east-1c" } } Variables for AZs and AMIs Lets use this region to start
  • 34. Region based AZ map variable "region_az" { default = { "us-east-1" = "us-east-1a,us-east-1c,us-east-1d,us-east-1e" "us-west-1" = "us-west-1a,us-west-1b,us-west-1c" "us-west-2" = "us-west-2a,us-west-2b,us-west-2c" "eu-west-1" = "eu-west-1a,eu-west-1b,eu-west-1c" "eu-central-1" = "eu-central-1a,eu-central-1b" "ap-southeast-1" = "ap-southeast-1a,ap-southeast-1b" "ap-northeast-1" = "ap-northeast-1a,ap-northeast-1b,ap-northeast-1c" "ap-southeast-2" = "ap-southeast-2a,ap-southeast-2b" "sa-east-1" = "sa-east-1a,sa-east-1b,sa-east-1c" } } variable "ami" { default = ... used in lookup
  • 35. variable "ami" { default = { "description" = "Ubuntu server 14.04 ami id" "us-west-1" = "ami-df6a8b9b" "us-west-2" = "ami-5189a661" "us-east-1" = "ami-d05e75b8" "eu-west-1" = "ami-47a23a30" "eu-central-1" = "ami-accff2b1" "ap-northeast-1" = "ami-936d9d93" "ap-southeast-1" = "ami-96f1c1c4" "ap-southeast-2" = "ami-69631053" "sa-east-1" = "ami-4d883350" } } Region based Ubuntu AMI map
  • 36. resource "aws_instance" "web" { ami = "${lookup(var.ami, var.region)}" instance_type = "${var.instance_type}" count = "${var.servers}" availability_zone = "${element(split(",",lookup(var.region_az, var.region)), count.index%length (split(",",lookup(var.region_az, var. region)) ))}" Resource declaration
  • 37. resource "aws_instance" "web" { ami = "${lookup(var.ami, var.region)}" instance_type = "${var.instance_type}" count = "${var.servers}" availability_zone = "${element(split(",",lookup(var.region_az, var.region)), count.index%length (split(",",lookup(var.region_az, var. region)) ))}" Scaling and iterating Math library added from terraform v0.4 Simulating iteration Scaling to 100s of servers
  • 38. Multi-cloud distribution Step 1 Creating an image for each cloud Step 2 Using that image in the code that we just saw
  • 39. Creating image using Packer "provisioners": [{ "type": "shell", "inline": [ "sleep 30", "sudo apt-get update", "sudo apt-get install -y redis- server" ] }] Provisioning Redis server
  • 40. Strong Ops - Chef provisioner "provisioners": [{ "type": "chef-client", "server_url”: “https://mychefserver.com/” }] Cookbooks and Recipes: Helpdesk, monitoring server, monitoring clients, antivirus agents, auto-healing servers, analytics data couriers... Using Chef client-server
  • 42. Creating image using Packer "builders": [{ "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "us-east-1", "source_ami": "ami-de0d9eb7", "instance_type": "t1.micro", "ssh_username": "ubuntu", "ami_name": "packer-example {{timestamp}}" }, Build in Amazon Cloud
  • 43. Same code for multi-cloud "builders": [{ "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "us-east-1", "source_ami": "ami-de0d9eb7", "instance_type": "t1.micro", "ssh_username": "ubuntu", "ami_name": "packer-example {{timestamp}}" }, { "type": "digitalocean", "api_token": "{{user `do_api_token`}}", "image": "ubuntu-14-04-x64", "region": "nyc3", "size": "512mb" }], Build in Amazon Cloud Build in Digital Ocean Cloud
  • 44. Beautiful multi-color output amazon-ebs output will be in this color. digitalocean output will be in this color. ==> digitalocean: Creating temporary ssh key for droplet... ==> amazon-ebs: Prevalidating AMI Name... ==> amazon-ebs: Inspecting the source AMI... ==> amazon-ebs: Creating temporary keypair: packer 55f6c5e5-2b50-c8c3-5e37-7d246b6f0bca ==> amazon-ebs: Creating temporary security group for this instance... ==> amazon-ebs: Authorizing access to port 22 the temporary security group... ==> amazon-ebs: Launching a source AWS instance... ==> digitalocean: Creating droplet... ==> digitalocean: Waiting for droplet to become active...
  • 45. Pilot of great idea - clear value delivered - all good Onboarding new customers rapidly without sacrificing quality Harden the OS - chef-templates, packer, Terraform Automate app deployment - Terraform + Chef Automate app configuration - Terraform + Chef + Data bags Pivot fast, maintain the lead, make value irresistible DevOps for building new features fast - Adopt DevOps early Upgrade customers DevOps pipeline + Roles + Environments Hope this helps!
  • 46. The 4th question in daily agile scrums that was never asked 4th question: Are you blocking Ops? Meaning: a) Are there any new binaries created/deleted? b) Are there any configuration files that changed? c) Are there any configuration attributes that changed? Why DevOps projects fail
  • 47. Recap, takeaway Easy to code infrastructure Easy to replicate infrastructure Easy to distribute infrastructure across AZs Easy to balance infrastructure across regions Easy to balance infrastructure across clouds,countries Easy to integrate with other apps The 4th scrum question
  • 48. Opex forecast: Next few years Cheaper, stable, scalable, elastic infra needed by millions of businesses to win & Opex is poised to provide innovative solutions
  • 49. Opex Software Thanks You AUTOMATE IT. CREATE TIME