Empowering developers to deploy their own data stores

Tomas Doran
Tomas DoranI try to avoid making software. à Yelps
Empowering developers to deploy their
own data stores.
A story of Terraform, Puppet and rage
Tomas Doran
@bobtfish
• Iterate on the things you do often

• Hide complexity

• Empower others
2
Devops = Workflow
• A thing of the past (mostly)
• Need to be able to scale up and down in hours
• If not minutes

• Need to allow people to experiment
• Cloud is expensive, unless you use it!
3
Artisanal hand-crafted servers
• ‘Infra’ layer
• DNS / puppet / apt - basic services
• A(WS)?nycast - failover / HA

• ‘App’ layer
• Smartstack - Service discovery + routing
• Paasta (Mesos + Marathon) - Scheduling + Orchestration
• search24-reviews-uswest1aprod - ugh!
4
2 Layer architecture
• Remembering the . on PTR records

• For some people!
• Why make them do this?
5
The hardest thing
• Datastore PAAS
• Elasticsearch clusters are the ‘easy’ case

• No ‘master’ - all machines are equal
• Automatic sharding/replication

• ASG + ELB
• Zookeeper for discovery
6
Next logical step
• curl http://10.29.0.3:8142 (A(WS)nycast puppetmaster)

{
“habitat”: “uswest1aprod”
}

• “habitat”, “region”, “superregion”, “ecosystem”
7
Environment server
• curl http://10.29.0.3:8142 (A(WS)nycast puppetmaster)

{
“habitat”: “uswest1aprod”
}

• “habitat”, “region”, “superregion”, “ecosystem”
8
Environment server
• Hostname: search1-reviews-uswest1aprod
• Parse out cluster name

elasticsearch_cluster { ‘reviews’: }

puppet/modules/elasticsearch_cluster/data/cluster/
reviews.yaml

• Can locate the ‘data’ directory somewhere else!
• Reuse the same YAML for service discovery + provisioning
• Commit hook validation
9
puppet data in modules
• External Node Classifer
• Puppetmaster calls a script, returns node definition
• Create node definition from EC2 tags

puppet::role::elasticsearch_cluster => cluster_name=reviews

• Stop needing individual hostnames!
• Pre-allocate names using GENERATE
10
puppet ENC
• Bad abstraction for contextual information
• Which db server is the master? Does it have ‘master’ in it’s FQDN?
• If it does, what happens when you promote another machine?

• Need key => value for cattle not pets

• Customize your monitoring system to actually tell you what’s wrong!
• ‘The master db has crashed’ vs ‘A db has crashed’
• ‘10-46-11-54 is dead’ vs ‘zookeeper::10-46-11-54 is dead`
11
Hostnames
• Got most of the pieces
• Machines auto-configure themselves after launch.
• Remaining step is actually launching machines

• Terraform is awesome…
• IF you treat it as a low level abstraction
• IF you keep things in composeable units
• IF you add enough workflow to not run with scissors
12
Terraform
13
14
15
• Terraform the most generic abstraction possible
• Map JSON (HCL) DSL => CRUD APIs
• Cannot do implicit mapping
• But puppet / ansible / whatever can???
• ‘Name’ tag => namevar
• Only works in some cases - not everything has tags!
• Implicit mapping is evil
• Duplicates will screw up your day
16
Low level
17
Implicit mapping example - puppet AWS
18
Implicit mapping example - puppet AWS
19
Implicit mapping example - puppet AWS
20
Implicit mapping example - puppet AWS
• BUG - prefetch method eats exceptions (fixed now)
21
Implicit mapping example - puppet AWS
• BUG - prefetch method eats exceptions (fixed now)
22
Implicit mapping example - puppet AWS
• Reusable abstraction (in theory)

• Don’t try to use like puppet!
• Flat hierarchy (do not nest modules)
• Use version tags
• Use other git repos

• Or just generate resources as JSON

• KISS
23
Terraform modules
• Why even is state?
• How to cope with state
• Atlas
• Workflow (locking!) is your problem
• Remote state
• Shard terraform for (team) concurrency
• S3 store
• Many read, few write
• Wrap it yourself (make, Jenkins, don’t install terraform in $PATH)
24
State
• Provides the workflow

• ‘awsadmin’ machine + IAM Role as slave

• Makefile based workflow

• Jenkins job builder to template things
25
Jenkins
• Refresh state (upload refreshed state)
• Plan + save as artifact
• Filter plan!
• Approve plan
• Apply plan, save state
26
Split up the steps
• Commit some files to git.
• Push to a branch
• Jenkins runs
• Gated approval/application process

• Abstract away the scary parts
• Enforce workflow
27
Cluster provisioning workflow
• Self service cluster provisioning
• Developers define their own clusters
• 1 click from OPs to approve

• Owning team gets accounted
• AWS metadata added as needed.
• All metadata validated.

• Clusters built around best practices
• Can abstract further in future
28
Nirvana
P.S. We’re hiring!
@bobtfish
engineeringblog.yelp.com
github.com/Yelp
github.com/bobtfish
1 sur 29

Recommandé

London devops logging par
London devops loggingLondon devops logging
London devops loggingTomas Doran
17.3K vues97 diapositives
Ruby and Distributed Storage Systems par
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
13.3K vues43 diapositives
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu... par
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Shirshanka Das
17.1K vues39 diapositives
Planet-scale Data Ingestion Pipeline: Bigdam par
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamSATOSHI TAGOMORI
6.3K vues46 diapositives
From 100s to 100s of Millions par
From 100s to 100s of MillionsFrom 100s to 100s of Millions
From 100s to 100s of MillionsErik Onnen
12.1K vues158 diapositives
Tale of ISUCON and Its Bench Tools par
Tale of ISUCON and Its Bench ToolsTale of ISUCON and Its Bench Tools
Tale of ISUCON and Its Bench ToolsSATOSHI TAGOMORI
5.7K vues28 diapositives

Contenu connexe

Tendances

Leonid Vasilyev "Building, deploying and running production code at Dropbox" par
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
526 vues48 diapositives
Technologies for Data Analytics Platform par
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics PlatformN Masahiro
9.2K vues76 diapositives
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会 par
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会Takayuki Kyowa
10.6K vues57 diapositives
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data par
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataHakka Labs
978 vues50 diapositives
How to Make Norikra Perfect par
How to Make Norikra PerfectHow to Make Norikra Perfect
How to Make Norikra PerfectSATOSHI TAGOMORI
4.7K vues29 diapositives
Lessons Learned From Running Spark On Docker par
Lessons Learned From Running Spark On DockerLessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On DockerSpark Summit
15.5K vues17 diapositives

Tendances(20)

Leonid Vasilyev "Building, deploying and running production code at Dropbox" par IT Event
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
IT Event526 vues
Technologies for Data Analytics Platform par N Masahiro
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
N Masahiro9.2K vues
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会 par Takayuki Kyowa
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会
大規模環境でRailsと4年間付き合ってきて@ クックパッド * 食べログ合同勉強会
Takayuki Kyowa10.6K vues
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data par Hakka Labs
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
Hakka Labs978 vues
Lessons Learned From Running Spark On Docker par Spark Summit
Lessons Learned From Running Spark On DockerLessons Learned From Running Spark On Docker
Lessons Learned From Running Spark On Docker
Spark Summit15.5K vues
High Concurrency Architecture and Laravel Performance Tuning par Albert Chen
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
Albert Chen20K vues
Use case for using the ElastiCache for Redis in production par 知教 本間
Use case for using the ElastiCache for Redis in productionUse case for using the ElastiCache for Redis in production
Use case for using the ElastiCache for Redis in production
知教 本間3.9K vues
12-Step Program for Scaling Web Applications on PostgreSQL par Konstantin Gredeskoul
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Cassandra: An Alien Technology That's not so Alien par Brian Hess
Cassandra: An Alien Technology That's not so AlienCassandra: An Alien Technology That's not so Alien
Cassandra: An Alien Technology That's not so Alien
Brian Hess612 vues
I can't believe it's not a queue: Kafka and Spring par Joe Kutner
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
Joe Kutner1.1K vues
Async and Non-blocking IO w/ JRuby par Joe Kutner
Async and Non-blocking IO w/ JRubyAsync and Non-blocking IO w/ JRuby
Async and Non-blocking IO w/ JRuby
Joe Kutner3.9K vues
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An... par Chris Fregly
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Chris Fregly4.7K vues
Cascading - A Java Developer’s Companion to the Hadoop World par Cascading
Cascading - A Java Developer’s Companion to the Hadoop WorldCascading - A Java Developer’s Companion to the Hadoop World
Cascading - A Java Developer’s Companion to the Hadoop World
Cascading1.7K vues
Kafka Tutorial: Advanced Producers par Jean-Paul Azar
Kafka Tutorial: Advanced ProducersKafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced Producers
Jean-Paul Azar203.3K vues
Building Distributed Systems in Scala par Alex Payne
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in Scala
Alex Payne35.5K vues
Ansible for large scale deployment par Karthik .P.R
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
Karthik .P.R3.9K vues
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All par ScyllaDB
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
ScyllaDB690 vues

En vedette

Net Promoter Score Pitfalls to Avoid par
Net Promoter Score Pitfalls to AvoidNet Promoter Score Pitfalls to Avoid
Net Promoter Score Pitfalls to AvoidAureus Analytics
44.4K vues1 diapositive
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R... par
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...Jonathan Gray
23.1K vues12 diapositives
Bridging the Gap Between Data Science & Engineer: Building High-Performance T... par
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...Bridging the Gap Between Data Science & Engineer: Building High-Performance T...
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...ryanorban
136.4K vues38 diapositives
Visualising Data with Code par
Visualising Data with CodeVisualising Data with Code
Visualising Data with CodeRi Liu
32.3K vues22 diapositives
GPU Computing for Data Science par
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science Domino Data Lab
33.5K vues34 diapositives
Pollen VC Building A Digital Lending Business par
Pollen VC Building A Digital Lending BusinessPollen VC Building A Digital Lending Business
Pollen VC Building A Digital Lending BusinessPollen VC
100.8K vues11 diapositives

En vedette(20)

Net Promoter Score Pitfalls to Avoid par Aureus Analytics
Net Promoter Score Pitfalls to AvoidNet Promoter Score Pitfalls to Avoid
Net Promoter Score Pitfalls to Avoid
Aureus Analytics44.4K vues
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R... par Jonathan Gray
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...
Ways of Seeing Data: Towards a Critical Literacy for Data Visualisations as R...
Jonathan Gray23.1K vues
Bridging the Gap Between Data Science & Engineer: Building High-Performance T... par ryanorban
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...Bridging the Gap Between Data Science & Engineer: Building High-Performance T...
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...
ryanorban136.4K vues
Visualising Data with Code par Ri Liu
Visualising Data with CodeVisualising Data with Code
Visualising Data with Code
Ri Liu32.3K vues
Pollen VC Building A Digital Lending Business par Pollen VC
Pollen VC Building A Digital Lending BusinessPollen VC Building A Digital Lending Business
Pollen VC Building A Digital Lending Business
Pollen VC100.8K vues
DAMA Webinar - Big and Little Data Quality par DATAVERSITY
DAMA Webinar - Big and Little Data QualityDAMA Webinar - Big and Little Data Quality
DAMA Webinar - Big and Little Data Quality
DATAVERSITY34K vues
Working With Big Data par Seth Familian
Working With Big DataWorking With Big Data
Working With Big Data
Seth Familian291.8K vues
Data made out of functions par kenbot
Data made out of functionsData made out of functions
Data made out of functions
kenbot29.5K vues
What to Upload to SlideShare par SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
SlideShare14.4M vues
GAME ON! Integrating Games and Simulations in the Classroom par Brian Housand
GAME ON! Integrating Games and Simulations in the Classroom GAME ON! Integrating Games and Simulations in the Classroom
GAME ON! Integrating Games and Simulations in the Classroom
Brian Housand230.4K vues
Dear NSA, let me take care of your slides. par Emiland
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.
Emiland 1.5M vues
African Americans: College Majors and Earnings par CEW Georgetown
African Americans: College Majors and Earnings African Americans: College Majors and Earnings
African Americans: College Majors and Earnings
CEW Georgetown76.1K vues
The Physical Interface par Josh Clark
The Physical InterfaceThe Physical Interface
The Physical Interface
Josh Clark366.1K vues
Creative Traction Methodology - For Early Stage Startups par Tommaso Di Bartolo
Creative Traction Methodology - For Early Stage StartupsCreative Traction Methodology - For Early Stage Startups
Creative Traction Methodology - For Early Stage Startups
Tommaso Di Bartolo310.6K vues
IT in Healthcare par NetApp
IT in HealthcareIT in Healthcare
IT in Healthcare
NetApp69.5K vues
8 Tips for Scaling Mobile Users in China by Edith Yeung par Edith Yeung
8 Tips for Scaling Mobile Users in China by Edith Yeung8 Tips for Scaling Mobile Users in China by Edith Yeung
8 Tips for Scaling Mobile Users in China by Edith Yeung
Edith Yeung143.7K vues

Similaire à Empowering developers to deploy their own data stores

London Hug 19/5 - Terraform in Production par
London Hug 19/5 - Terraform in ProductionLondon Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in ProductionLondon HashiCorp User Group
820 vues31 diapositives
Kubernetes Manchester - 6th December 2018 par
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018David Stockton
621 vues22 diapositives
John adams talk cloudy par
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
3.3K vues57 diapositives
JavaScript Event Loop par
JavaScript Event LoopJavaScript Event Loop
JavaScript Event LoopThomas Hunter II
2.2K vues14 diapositives
[262] netflix 빅데이터 플랫폼 par
[262] netflix 빅데이터 플랫폼[262] netflix 빅데이터 플랫폼
[262] netflix 빅데이터 플랫폼NAVER D2
10.5K vues47 diapositives
ITB2017 - Slaying the ORM dragons with cborm par
ITB2017 - Slaying the ORM dragons with cbormITB2017 - Slaying the ORM dragons with cborm
ITB2017 - Slaying the ORM dragons with cbormOrtus Solutions, Corp
557 vues51 diapositives

Similaire à Empowering developers to deploy their own data stores(20)

Kubernetes Manchester - 6th December 2018 par David Stockton
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018
David Stockton621 vues
John adams talk cloudy par John Adams
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
John Adams3.3K vues
[262] netflix 빅데이터 플랫폼 par NAVER D2
[262] netflix 빅데이터 플랫폼[262] netflix 빅데이터 플랫폼
[262] netflix 빅데이터 플랫폼
NAVER D210.5K vues
Can puppet help you run docker on a T2.Micro? par Neil Millard
Can puppet help you run docker on a T2.Micro?Can puppet help you run docker on a T2.Micro?
Can puppet help you run docker on a T2.Micro?
Neil Millard212 vues
Devnexus 2018 par Roy Russo
Devnexus 2018Devnexus 2018
Devnexus 2018
Roy Russo267 vues
Automated hardware testing using docker for space par Docker, Inc.
Automated hardware testing using docker for spaceAutomated hardware testing using docker for space
Automated hardware testing using docker for space
Docker, Inc.1.1K vues
Ansible: How to Get More Sleep and Require Less Coffee par Sarah Z
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
Sarah Z25.5K vues
Benchmarking Solr Performance at Scale par thelabdude
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
thelabdude18.2K vues
Hadoop - Disk Fail In Place (DFIP) par mundlapudi
Hadoop - Disk Fail In Place (DFIP)Hadoop - Disk Fail In Place (DFIP)
Hadoop - Disk Fail In Place (DFIP)
mundlapudi3.5K vues
Exploring Java Heap Dumps (Oracle Code One 2018) par Ryan Cuprak
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
Ryan Cuprak2K vues
Storm presentation par Shyam Raj
Storm presentationStorm presentation
Storm presentation
Shyam Raj660 vues
Hadoop Operations: Keeping the Elephant Running Smoothly par Michael Arnold
Hadoop Operations: Keeping the Elephant Running SmoothlyHadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running Smoothly
Michael Arnold368 vues
Dev nexus 2017 par Roy Russo
Dev nexus 2017Dev nexus 2017
Dev nexus 2017
Roy Russo1.6K vues

Plus de Tomas Doran

Dockersh and a brief intro to the docker internals par
Dockersh and a brief intro to the docker internalsDockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internalsTomas Doran
4K vues28 diapositives
Sensu and Sensibility - Puppetconf 2014 par
Sensu and Sensibility - Puppetconf 2014Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014Tomas Doran
5.2K vues58 diapositives
Steamlining your puppet development workflow par
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflowTomas Doran
4.5K vues36 diapositives
Building a smarter application stack - service discovery and wiring for Docker par
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerTomas Doran
6.2K vues42 diapositives
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins par
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
13.1K vues56 diapositives
Deploying puppet code at light speed par
Deploying puppet code at light speedDeploying puppet code at light speed
Deploying puppet code at light speedTomas Doran
2K vues13 diapositives

Plus de Tomas Doran(20)

Dockersh and a brief intro to the docker internals par Tomas Doran
Dockersh and a brief intro to the docker internalsDockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internals
Tomas Doran4K vues
Sensu and Sensibility - Puppetconf 2014 par Tomas Doran
Sensu and Sensibility - Puppetconf 2014Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014
Tomas Doran5.2K vues
Steamlining your puppet development workflow par Tomas Doran
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran4.5K vues
Building a smarter application stack - service discovery and wiring for Docker par Tomas Doran
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for Docker
Tomas Doran6.2K vues
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins par Tomas Doran
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Tomas Doran13.1K vues
Deploying puppet code at light speed par Tomas Doran
Deploying puppet code at light speedDeploying puppet code at light speed
Deploying puppet code at light speed
Tomas Doran2K vues
Thinking through puppet code layout par Tomas Doran
Thinking through puppet code layoutThinking through puppet code layout
Thinking through puppet code layout
Tomas Doran3K vues
Docker puppetcamp london 2013 par Tomas Doran
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
Tomas Doran2.9K vues
"The worst code I ever wrote" par Tomas Doran
"The worst code I ever wrote""The worst code I ever wrote"
"The worst code I ever wrote"
Tomas Doran5.7K vues
Test driven infrastructure development (2 - puppetconf 2013 edition) par Tomas Doran
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
Tomas Doran1.6K vues
Test driven infrastructure development par Tomas Doran
Test driven infrastructure developmentTest driven infrastructure development
Test driven infrastructure development
Tomas Doran1.2K vues
Message:Passing - lpw 2012 par Tomas Doran
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
Tomas Doran1.5K vues
Webapp security testing par Tomas Doran
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran1.4K vues
Webapp security testing par Tomas Doran
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran1.3K vues
Messaging, interoperability and log aggregation - a new framework par Tomas Doran
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
Tomas Doran3K vues
Cooking a rabbit pie par Tomas Doran
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
Tomas Doran1.1K vues

Dernier

Construction Accidents & Injuries par
Construction Accidents & InjuriesConstruction Accidents & Injuries
Construction Accidents & InjuriesBisnar Chase Personal Injury Attorneys
6 vues5 diapositives
Oral presentation.pdf par
Oral presentation.pdfOral presentation.pdf
Oral presentation.pdfreemalmazroui8
5 vues10 diapositives
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init... par
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...DataScienceConferenc1
5 vues18 diapositives
Games, Queries, and Argumentation Frameworks: Time for a Family Reunion par
Games, Queries, and Argumentation Frameworks: Time for a Family ReunionGames, Queries, and Argumentation Frameworks: Time for a Family Reunion
Games, Queries, and Argumentation Frameworks: Time for a Family ReunionBertram Ludäscher
9 vues37 diapositives
Lack of communication among family.pptx par
Lack of communication among family.pptxLack of communication among family.pptx
Lack of communication among family.pptxahmed164023
15 vues10 diapositives
Dr. Ousmane Badiane-2023 ReSAKSS Conference par
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceDr. Ousmane Badiane-2023 ReSAKSS Conference
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceAKADEMIYA2063
5 vues34 diapositives

Dernier(20)

[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init... par DataScienceConferenc1
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
Games, Queries, and Argumentation Frameworks: Time for a Family Reunion par Bertram Ludäscher
Games, Queries, and Argumentation Frameworks: Time for a Family ReunionGames, Queries, and Argumentation Frameworks: Time for a Family Reunion
Games, Queries, and Argumentation Frameworks: Time for a Family Reunion
Lack of communication among family.pptx par ahmed164023
Lack of communication among family.pptxLack of communication among family.pptx
Lack of communication among family.pptx
ahmed16402315 vues
Dr. Ousmane Badiane-2023 ReSAKSS Conference par AKADEMIYA2063
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceDr. Ousmane Badiane-2023 ReSAKSS Conference
Dr. Ousmane Badiane-2023 ReSAKSS Conference
AKADEMIYA20635 vues
Best Home Security Systems.pptx par mogalang
Best Home Security Systems.pptxBest Home Security Systems.pptx
Best Home Security Systems.pptx
mogalang9 vues
CRM stick or twist workshop par info828217
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshop
info82821714 vues
OPPOTUS - Malaysians on Malaysia 3Q2023.pdf par Oppotus
OPPOTUS - Malaysians on Malaysia 3Q2023.pdfOPPOTUS - Malaysians on Malaysia 3Q2023.pdf
OPPOTUS - Malaysians on Malaysia 3Q2023.pdf
Oppotus31 vues
PRIVACY AWRE PERSONAL DATA STORAGE par antony420421
PRIVACY AWRE PERSONAL DATA STORAGEPRIVACY AWRE PERSONAL DATA STORAGE
PRIVACY AWRE PERSONAL DATA STORAGE
antony4204217 vues
Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language... par patiladiti752
Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language...Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language...
Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language...
patiladiti7528 vues
Shreyas hospital statistics.pdf par samithavinal
Shreyas hospital statistics.pdfShreyas hospital statistics.pdf
Shreyas hospital statistics.pdf
samithavinal5 vues
Listed Instruments Survey 2022.pptx par secretariat4
Listed Instruments Survey  2022.pptxListed Instruments Survey  2022.pptx
Listed Instruments Survey 2022.pptx
secretariat4121 vues
Customer Data Cleansing Project.pptx par Nat O
Customer Data Cleansing Project.pptxCustomer Data Cleansing Project.pptx
Customer Data Cleansing Project.pptx
Nat O6 vues

Empowering developers to deploy their own data stores

  • 1. Empowering developers to deploy their own data stores. A story of Terraform, Puppet and rage Tomas Doran @bobtfish
  • 2. • Iterate on the things you do often
 • Hide complexity
 • Empower others 2 Devops = Workflow
  • 3. • A thing of the past (mostly) • Need to be able to scale up and down in hours • If not minutes
 • Need to allow people to experiment • Cloud is expensive, unless you use it! 3 Artisanal hand-crafted servers
  • 4. • ‘Infra’ layer • DNS / puppet / apt - basic services • A(WS)?nycast - failover / HA
 • ‘App’ layer • Smartstack - Service discovery + routing • Paasta (Mesos + Marathon) - Scheduling + Orchestration • search24-reviews-uswest1aprod - ugh! 4 2 Layer architecture
  • 5. • Remembering the . on PTR records
 • For some people! • Why make them do this? 5 The hardest thing
  • 6. • Datastore PAAS • Elasticsearch clusters are the ‘easy’ case
 • No ‘master’ - all machines are equal • Automatic sharding/replication
 • ASG + ELB • Zookeeper for discovery 6 Next logical step
  • 7. • curl http://10.29.0.3:8142 (A(WS)nycast puppetmaster)
 { “habitat”: “uswest1aprod” }
 • “habitat”, “region”, “superregion”, “ecosystem” 7 Environment server
  • 8. • curl http://10.29.0.3:8142 (A(WS)nycast puppetmaster)
 { “habitat”: “uswest1aprod” }
 • “habitat”, “region”, “superregion”, “ecosystem” 8 Environment server
  • 9. • Hostname: search1-reviews-uswest1aprod • Parse out cluster name
 elasticsearch_cluster { ‘reviews’: }
 puppet/modules/elasticsearch_cluster/data/cluster/ reviews.yaml
 • Can locate the ‘data’ directory somewhere else! • Reuse the same YAML for service discovery + provisioning • Commit hook validation 9 puppet data in modules
  • 10. • External Node Classifer • Puppetmaster calls a script, returns node definition • Create node definition from EC2 tags
 puppet::role::elasticsearch_cluster => cluster_name=reviews
 • Stop needing individual hostnames! • Pre-allocate names using GENERATE 10 puppet ENC
  • 11. • Bad abstraction for contextual information • Which db server is the master? Does it have ‘master’ in it’s FQDN? • If it does, what happens when you promote another machine?
 • Need key => value for cattle not pets
 • Customize your monitoring system to actually tell you what’s wrong! • ‘The master db has crashed’ vs ‘A db has crashed’ • ‘10-46-11-54 is dead’ vs ‘zookeeper::10-46-11-54 is dead` 11 Hostnames
  • 12. • Got most of the pieces • Machines auto-configure themselves after launch. • Remaining step is actually launching machines
 • Terraform is awesome… • IF you treat it as a low level abstraction • IF you keep things in composeable units • IF you add enough workflow to not run with scissors 12 Terraform
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. • Terraform the most generic abstraction possible • Map JSON (HCL) DSL => CRUD APIs • Cannot do implicit mapping • But puppet / ansible / whatever can??? • ‘Name’ tag => namevar • Only works in some cases - not everything has tags! • Implicit mapping is evil • Duplicates will screw up your day 16 Low level
  • 21. • BUG - prefetch method eats exceptions (fixed now) 21 Implicit mapping example - puppet AWS
  • 22. • BUG - prefetch method eats exceptions (fixed now) 22 Implicit mapping example - puppet AWS
  • 23. • Reusable abstraction (in theory)
 • Don’t try to use like puppet! • Flat hierarchy (do not nest modules) • Use version tags • Use other git repos
 • Or just generate resources as JSON
 • KISS 23 Terraform modules
  • 24. • Why even is state? • How to cope with state • Atlas • Workflow (locking!) is your problem • Remote state • Shard terraform for (team) concurrency • S3 store • Many read, few write • Wrap it yourself (make, Jenkins, don’t install terraform in $PATH) 24 State
  • 25. • Provides the workflow
 • ‘awsadmin’ machine + IAM Role as slave
 • Makefile based workflow
 • Jenkins job builder to template things 25 Jenkins
  • 26. • Refresh state (upload refreshed state) • Plan + save as artifact • Filter plan! • Approve plan • Apply plan, save state 26 Split up the steps
  • 27. • Commit some files to git. • Push to a branch • Jenkins runs • Gated approval/application process
 • Abstract away the scary parts • Enforce workflow 27 Cluster provisioning workflow
  • 28. • Self service cluster provisioning • Developers define their own clusters • 1 click from OPs to approve
 • Owning team gets accounted • AWS metadata added as needed. • All metadata validated.
 • Clusters built around best practices • Can abstract further in future 28 Nirvana