SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Scaling DevOps
Jeffrey Hulten
Whitepages, Inc.
Wednesday, December 4, 13
Who Am I?
Jeffrey Hulten - @jhulten
Software Engineer, Architecture Improvement at
WhitePages, Inc.
Organizer of Seattle DevOps MeetUp
Too Ops for Dev, Too Dev for Ops

Wednesday, December 4, 13
Scaling DevOps

Your Tools Aren’t Enough
Your First 100 Machines
Watching the Horizon

Wednesday, December 4, 13
Your Tools Aren’t Enough
Culture
Deploy a Package
Manage the Metal
Minimize the Surface Area
Growing Pains

Wednesday, December 4, 13
Culture
Not Just for Bacteria Anymore
Starts with one person
Infect your friends
Try changing things
Mutation must allow for
failure
Requirement for survival

Wednesday, December 4, 13
Deploy a Package
TGZ
OS Package (.deb / .rpm)
Machine Image (AMI)
LXC Image (Docker)

Wednesday, December 4, 13
OS Packages Made Easier

FPM
Package Config Separately
Package Repository

Wednesday, December 4, 13
FPM: Effing Package
Management
https://github.com/jordansissel/fpm
$ gem install fpm
Make RPM, DEB, and Solaris packages and Puppet
module
Create from directories, RPM, DEB, Gem, PyPi, Tarball
and more

Wednesday, December 4, 13
Example: Jenkins
NAME=jenkins
VERSION=1.396
.PHONY: package
package:
rm -f jenkins.war
wget http://ftp.osuosl.org/pub/hudson/war/$(VERSION)/jenkins.war
fpm -s dir -t deb -n $(NAME) -v $(VERSION) 
--prefix /opt/jenkins jenkins.war

Wednesday, December 4, 13
Machine Images &
Containers
Machine Image
Entire OS
All Services Enabled
Containers
Minimal OS Image
Run One Process (Replace `init`)

Wednesday, December 4, 13
Manage the Metal
Application as Inventory...

Wednesday, December 4, 13
Minimize the Surface Area
What is Surface Area?
Libraries?
Versions?
Components?
Data Stores?

Wednesday, December 4, 13
Minimize the Surface Area
What is Surface Area?
Libraries?
Versions?
Components?
Data Stores?
Deployables...

Wednesday, December 4, 13
Growing Pains
Don’t bottle knowledge
There are no
specialists
Think about the
smallest solution
Delay your decisions

Wednesday, December 4, 13
Your First 20 Machines
DEMO TIME!
Source at:

https://github.com/whitepages/scaledemo-20-machines

AWS CloudFormation, cloud-init...

Wednesday, December 4, 13
Application: Random
Numbers as a Service

Wednesday, December 4, 13
CloudFormation

Deploy Stacks
Templates in JSON
Parameters for Reuse

Wednesday, December 4, 13
Template: Parameters
"Parameters": {
"OperatorEmail": {
"Type": "String",
"Description": "Email address to notify if there are any scaling operations"
},
"InstanceType": {
"Description": "WebServer EC2 instance type",
"Type": "String",
"AllowedValues": [ "t1.micro", "m1.small", ...],
"Default": "m1.small",
"ConstraintDescription": "must be a valid EC2 instance type."
},
...
"SSHLocation": {
"Default": "0.0.0.0/0",
"Type": "String",
"MaxLength": "18",
"MinLength": "9",
"AllowedPattern": "(d{1,3}).(d{1,3}).(d{1,3}).(d{1,3})/(d{1,2})",
"Description": "The IP address range that can be used to SSH to the EC2 instances",
"ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x."
}
},

Wednesday, December 4, 13
Template: Parameters
"SSHLocation": {
"Default": "0.0.0.0/0",
"Type": "String",
"MaxLength": "18",
"MinLength": "9",
"AllowedPattern": "(d{1,3}).(d{1,3}).../(d{1,2})",
"Description": "...",
"ConstraintDescription": "..."
}

Wednesday, December 4, 13
Template: Mappings
"Mappings": {
"AWSRegionArch2AMI": {
"us-east-1": {
"64": "ami-955b79fc"
},
"us-west-1": {
"64": "ami-6ca89929"
},
"us-west-2": {
"64": "ami-a8395c98"
}
},
...
},

Wednesday, December 4, 13
Template: Resources
"Resources": {
"NotificationTopic": {
"Type": "AWS::SNS::Topic",
"Properties": {
"Subscription": [
{
"Protocol": "email",
"Endpoint": {
"Ref": "OperatorEmail"
}
}
]
}
},
...
}

Wednesday, December 4, 13
AutoScaling Group
"RandServerGroup": {
"Type": "AWS::AutoScaling::AutoScalingGroup",
"Properties": {
"AvailabilityZones": { "Fn::GetAZs": "" },
"NotificationConfiguration": {
"NotificationTypes": [
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR"
],
"TopicARN": { "Ref": "NotificationTopic" }
},
"MinSize": "1",
"MaxSize": "100",
"LaunchConfigurationName": { "Ref": “..." }
}}
Wednesday, December 4, 13
Launch Config
"RandLaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"SecurityGroups": [{ "Ref": InstanceSecurityGroup" }],
"InstanceType": { "Ref": "InstanceType" },
"KeyName": { "Ref": "KeyName" },
"UserData": {
"Fn::Base64": { "Fn::Join" : ["",[
"#includen",
"https://.../cloud-config.txtn"
]]}},
"ImageId": {"Fn::FindInMap": [...] }
}
},

Wednesday, December 4, 13
Cloud Init
#cloud-config
packages:
- ruby1.9.3
- git
- build-essential
runcmd:
- /usr/bin/gem install bundler
- /usr/bin/git clone "https://github.com/whitepages/
scaledemo-20-machines.git" /opt/rand
- cd /opt/rand && /usr/local/bin/bundle install
- cd /opt/rand &&/usr/local/bin/bundle exec randserver &

Wednesday, December 4, 13
Watching the Horizon
Docker / LXC
SmartStack
Akka Cluster / Riak
Core

Wednesday, December 4, 13
Questions?
jhulten@whitepages.com
Twitter: @jhulten
Github: jhulten
whitepages
whitepages.com/careers

Wednesday, December 4, 13

Contenu connexe

Tendances

Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
Scott Hernandez
 
MongoDB Shell Tips & Tricks
MongoDB Shell Tips & TricksMongoDB Shell Tips & Tricks
MongoDB Shell Tips & Tricks
MongoDB
 
Integration with hdfs using WebDFS and NFS
Integration with hdfs using WebDFS and NFSIntegration with hdfs using WebDFS and NFS
Integration with hdfs using WebDFS and NFS
Christophe Marchal
 
Shell Tips and Tricks
Shell Tips and TricksShell Tips and Tricks
Shell Tips and Tricks
MongoDB
 
Drush and drupal. администрирование волчек михаил
Drush and drupal. администрирование  волчек михаилDrush and drupal. администрирование  волчек михаил
Drush and drupal. администрирование волчек михаил
drupalconf
 

Tendances (20)

Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
DRb and Rinda
DRb and RindaDRb and Rinda
DRb and Rinda
 
OSDC 2016 - DNS for Developers by Jan-Piet Mens
OSDC 2016 - DNS for Developers by Jan-Piet MensOSDC 2016 - DNS for Developers by Jan-Piet Mens
OSDC 2016 - DNS for Developers by Jan-Piet Mens
 
MongoDB Shell Tips & Tricks
MongoDB Shell Tips & TricksMongoDB Shell Tips & Tricks
MongoDB Shell Tips & Tricks
 
Bento lunch talk
Bento   lunch talkBento   lunch talk
Bento lunch talk
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
 
Integration with hdfs using WebDFS and NFS
Integration with hdfs using WebDFS and NFSIntegration with hdfs using WebDFS and NFS
Integration with hdfs using WebDFS and NFS
 
Native or External?
Native or External?Native or External?
Native or External?
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
 
Mysqlnd uh
Mysqlnd uhMysqlnd uh
Mysqlnd uh
 
Voyage Reloaded - New features and backends in the document-database
Voyage Reloaded - New features and backends in the document-databaseVoyage Reloaded - New features and backends in the document-database
Voyage Reloaded - New features and backends in the document-database
 
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
 
WebHDFS at King - May 2014 Hadoop MeetUp
WebHDFS at King - May 2014 Hadoop MeetUpWebHDFS at King - May 2014 Hadoop MeetUp
WebHDFS at King - May 2014 Hadoop MeetUp
 
What bringing Drupal to cloud really meant. - DrupalCon Seattle 2019
What bringing Drupal to cloud really meant. -  DrupalCon Seattle 2019What bringing Drupal to cloud really meant. -  DrupalCon Seattle 2019
What bringing Drupal to cloud really meant. - DrupalCon Seattle 2019
 
Day 2-some fun coding
Day 2-some fun codingDay 2-some fun coding
Day 2-some fun coding
 
Shell Tips and Tricks
Shell Tips and TricksShell Tips and Tricks
Shell Tips and Tricks
 
Drush and drupal. администрирование волчек михаил
Drush and drupal. администрирование  волчек михаилDrush and drupal. администрирование  волчек михаил
Drush and drupal. администрирование волчек михаил
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 

Similaire à Scaling DevOps

Easy deployment & management of cloud apps
Easy deployment & management of cloud appsEasy deployment & management of cloud apps
Easy deployment & management of cloud apps
David Cunningham
 
node.js, javascript and the future
node.js, javascript and the futurenode.js, javascript and the future
node.js, javascript and the future
Jeff Miccolis
 
Rupy2012 ArangoDB Workshop Part1
Rupy2012 ArangoDB Workshop Part1Rupy2012 ArangoDB Workshop Part1
Rupy2012 ArangoDB Workshop Part1
ArangoDB Database
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
Lars Albertsson
 

Similaire à Scaling DevOps (20)

Easy deployment & management of cloud apps
Easy deployment & management of cloud appsEasy deployment & management of cloud apps
Easy deployment & management of cloud apps
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
Apache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos LinardosApache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos Linardos
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
 
Drupal Devministration
Drupal DevministrationDrupal Devministration
Drupal Devministration
 
Presentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStackPresentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStack
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
Xml And JSON Java
Xml And JSON JavaXml And JSON Java
Xml And JSON Java
 
node.js, javascript and the future
node.js, javascript and the futurenode.js, javascript and the future
node.js, javascript and the future
 
Containers for Science and High-Performance Computing
Containers for Science and High-Performance ComputingContainers for Science and High-Performance Computing
Containers for Science and High-Performance Computing
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
Puppet Camp Chicago 2014: Smoothing Troubles With Custom Types and Providers ...
Puppet Camp Chicago 2014: Smoothing Troubles With Custom Types and Providers ...Puppet Camp Chicago 2014: Smoothing Troubles With Custom Types and Providers ...
Puppet Camp Chicago 2014: Smoothing Troubles With Custom Types and Providers ...
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
Python mongo db-training-europython-2011
Python mongo db-training-europython-2011Python mongo db-training-europython-2011
Python mongo db-training-europython-2011
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
Rupy2012 ArangoDB Workshop Part1
Rupy2012 ArangoDB Workshop Part1Rupy2012 ArangoDB Workshop Part1
Rupy2012 ArangoDB Workshop Part1
 
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps dayAprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Scaling DevOps

  • 1. Scaling DevOps Jeffrey Hulten Whitepages, Inc. Wednesday, December 4, 13
  • 2. Who Am I? Jeffrey Hulten - @jhulten Software Engineer, Architecture Improvement at WhitePages, Inc. Organizer of Seattle DevOps MeetUp Too Ops for Dev, Too Dev for Ops Wednesday, December 4, 13
  • 3. Scaling DevOps Your Tools Aren’t Enough Your First 100 Machines Watching the Horizon Wednesday, December 4, 13
  • 4. Your Tools Aren’t Enough Culture Deploy a Package Manage the Metal Minimize the Surface Area Growing Pains Wednesday, December 4, 13
  • 5. Culture Not Just for Bacteria Anymore Starts with one person Infect your friends Try changing things Mutation must allow for failure Requirement for survival Wednesday, December 4, 13
  • 6. Deploy a Package TGZ OS Package (.deb / .rpm) Machine Image (AMI) LXC Image (Docker) Wednesday, December 4, 13
  • 7. OS Packages Made Easier FPM Package Config Separately Package Repository Wednesday, December 4, 13
  • 8. FPM: Effing Package Management https://github.com/jordansissel/fpm $ gem install fpm Make RPM, DEB, and Solaris packages and Puppet module Create from directories, RPM, DEB, Gem, PyPi, Tarball and more Wednesday, December 4, 13
  • 9. Example: Jenkins NAME=jenkins VERSION=1.396 .PHONY: package package: rm -f jenkins.war wget http://ftp.osuosl.org/pub/hudson/war/$(VERSION)/jenkins.war fpm -s dir -t deb -n $(NAME) -v $(VERSION) --prefix /opt/jenkins jenkins.war Wednesday, December 4, 13
  • 10. Machine Images & Containers Machine Image Entire OS All Services Enabled Containers Minimal OS Image Run One Process (Replace `init`) Wednesday, December 4, 13
  • 11. Manage the Metal Application as Inventory... Wednesday, December 4, 13
  • 12. Minimize the Surface Area What is Surface Area? Libraries? Versions? Components? Data Stores? Wednesday, December 4, 13
  • 13. Minimize the Surface Area What is Surface Area? Libraries? Versions? Components? Data Stores? Deployables... Wednesday, December 4, 13
  • 14. Growing Pains Don’t bottle knowledge There are no specialists Think about the smallest solution Delay your decisions Wednesday, December 4, 13
  • 15. Your First 20 Machines DEMO TIME! Source at: https://github.com/whitepages/scaledemo-20-machines AWS CloudFormation, cloud-init... Wednesday, December 4, 13
  • 16. Application: Random Numbers as a Service Wednesday, December 4, 13
  • 17. CloudFormation Deploy Stacks Templates in JSON Parameters for Reuse Wednesday, December 4, 13
  • 18. Template: Parameters "Parameters": { "OperatorEmail": { "Type": "String", "Description": "Email address to notify if there are any scaling operations" }, "InstanceType": { "Description": "WebServer EC2 instance type", "Type": "String", "AllowedValues": [ "t1.micro", "m1.small", ...], "Default": "m1.small", "ConstraintDescription": "must be a valid EC2 instance type." }, ... "SSHLocation": { "Default": "0.0.0.0/0", "Type": "String", "MaxLength": "18", "MinLength": "9", "AllowedPattern": "(d{1,3}).(d{1,3}).(d{1,3}).(d{1,3})/(d{1,2})", "Description": "The IP address range that can be used to SSH to the EC2 instances", "ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x." } }, Wednesday, December 4, 13
  • 19. Template: Parameters "SSHLocation": { "Default": "0.0.0.0/0", "Type": "String", "MaxLength": "18", "MinLength": "9", "AllowedPattern": "(d{1,3}).(d{1,3}).../(d{1,2})", "Description": "...", "ConstraintDescription": "..." } Wednesday, December 4, 13
  • 20. Template: Mappings "Mappings": { "AWSRegionArch2AMI": { "us-east-1": { "64": "ami-955b79fc" }, "us-west-1": { "64": "ami-6ca89929" }, "us-west-2": { "64": "ami-a8395c98" } }, ... }, Wednesday, December 4, 13
  • 21. Template: Resources "Resources": { "NotificationTopic": { "Type": "AWS::SNS::Topic", "Properties": { "Subscription": [ { "Protocol": "email", "Endpoint": { "Ref": "OperatorEmail" } } ] } }, ... } Wednesday, December 4, 13
  • 22. AutoScaling Group "RandServerGroup": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { "AvailabilityZones": { "Fn::GetAZs": "" }, "NotificationConfiguration": { "NotificationTypes": [ "autoscaling:EC2_INSTANCE_LAUNCH", "autoscaling:EC2_INSTANCE_LAUNCH_ERROR", "autoscaling:EC2_INSTANCE_TERMINATE", "autoscaling:EC2_INSTANCE_TERMINATE_ERROR" ], "TopicARN": { "Ref": "NotificationTopic" } }, "MinSize": "1", "MaxSize": "100", "LaunchConfigurationName": { "Ref": “..." } }} Wednesday, December 4, 13
  • 23. Launch Config "RandLaunchConfig": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Properties": { "SecurityGroups": [{ "Ref": InstanceSecurityGroup" }], "InstanceType": { "Ref": "InstanceType" }, "KeyName": { "Ref": "KeyName" }, "UserData": { "Fn::Base64": { "Fn::Join" : ["",[ "#includen", "https://.../cloud-config.txtn" ]]}}, "ImageId": {"Fn::FindInMap": [...] } } }, Wednesday, December 4, 13
  • 24. Cloud Init #cloud-config packages: - ruby1.9.3 - git - build-essential runcmd: - /usr/bin/gem install bundler - /usr/bin/git clone "https://github.com/whitepages/ scaledemo-20-machines.git" /opt/rand - cd /opt/rand && /usr/local/bin/bundle install - cd /opt/rand &&/usr/local/bin/bundle exec randserver & Wednesday, December 4, 13
  • 25. Watching the Horizon Docker / LXC SmartStack Akka Cluster / Riak Core Wednesday, December 4, 13