SlideShare a Scribd company logo
1 of 18
Download to read offline
Puppet @ Spreadshirt
Hendrik Seffler <hse@spreadshirt.net>
Puppet @ Spreadshirt

The Spreadshirt e-commerce platform lets anyone
create, sell and buy ideas on things consumers love
to wear, use and carry.
Puppet @ Spreadshirt

●

B2B & B2C points-of-sale

●

Choose from over 140 quality products

●

Each item made print-on-demand

●

Minimum order = 1 item

●

Localized services for 17 countries

●

Delivered within 3 to 7 days
Puppet @ Spreadshirt
Puppet @ Spreadshirt

How is Spreadshirt using Puppet?
● Currently different environments at
○ OPS (Opennebula)
○ QA (EC2)
○ DEV (Vagrant)
● Transitions between those environments cause
confusion and errors
● Own installer hard to maintain, very Java-specific
Puppet @ Spreadshirt

Our tools
● Puppet
●

“Puppet is IT automation software that helps system administrators
manage infrastructure throughout its lifecycle ”

●

http://www.puppetlabs.com
Puppet @ Spreadshirt

Puppet
●

Puppet provides a declarative language to describe a
systems configuration

● The most atomic element is the type which descibes
a basic configuration item
● Rules are organized in manifests
● Manifests include classes from modules
● Puppet supports variables, facts and templates
Puppet @ Spreadshirt

Our tools
● r10k
●

“R10K is a hybrid solution for deploying Puppet code...deploying
Puppet environments based on Git branches... provides an
implementation of the Puppetfile format...R10K can provide your
modules for you.”

●

https://github.com/adrienthebo/r10k

●

http://somethingsinistral.net/blog/rethinking-puppet-deployment/
Puppet @ Spreadshirt

R10K
●

R10K helps us manage our
modules

●

Allows us to store our modules
along with the software it
deploys

●

This enables re-use of
modules in different contexts

●

DEV, OPS and QA can use the same module to deploy an artifact
without copy-and-paste-ing the code all over the place

●

Much like puppet-librarian, but also creates puppet-environments
based on GIT-branches
Puppet @ Spreadshirt

R10K
●

Puppetfile is a file which contains
references to modules we want on
out module-path

●

R10K checkout out those modules when it runs

●

OK, an example:
mod ‘jetty’,
:git => "git@git.spreadomat.net:puppet/jetty.git"
mod 'content-service',
:git => "git@git.spreadomat.net:puppet/content-service.git",
:ref => "1.0.0"

●

Modulename, GIT-Source, optional git-branch
Puppet @ Spreadshirt

Our tools
● hiera
●

“Hiera is a key/value lookup tool for configuration data. It makes
Puppet better by keeping site-specific data out of your manifests. ”

●

http://docs.puppetlabs.com/hiera/1/
Puppet @ Spreadshirt

Hiera
● Configuration differs from context to context
● Configuration should not be hardcoded in manifests
● E.g. we may have:
$memory=”-Xmx8192M”
● But actually we want:
$memory=”-Xmx512M” (DEV)
$memory=”-Xmx1024M” (QA)
$memory=”-Xmx8192M” (OPS)
Puppet @ Spreadshirt

Hiera
● Hiera seperates deployment description from
configuration
$memory=hiera(“memory”)
● Hiera looks up the actual value based on a hierachy
we define
● Various backends to retrieve values
Puppet @ Spreadshirt

Hiera
● Storage of data in module by using the backend
yaml_data_in_modules
● Our own backend, open-source
https://github.com/mythsunwind/yaml_data_in_modules
Puppet @ Spreadshirt

Hiera
● Our hierachy
- %{context}-%{datacenter}-%{platform}-%{cluster}-%{hostname}
- %{context}-%{datacenter}-%{platform}-%{cluster}
- %{context}-%{datacenter}-%{platform}
- %{context}-%{datacenter}
- %{context}
- common-%{platform}
- common
Puppet @ Spreadshirt

Hiera
● Lets look at a typical lookup path:
common.yaml
app_name: content-service
port:4747
qa.yaml
port: 2318

● So for a EU system in QA:
app_name: content-service
port: 2318
lang=de_DE, en_GB

qa-eu.yaml
lang=de_DE, en_GB
qa-na.yaml
lang=en_US
Puppet @ Spreadshirt

Conclusions
● Spreadshirt uses Puppet to deploy more and more of
its infrastructure
● To enable continuous deployment we aim to have a
uniform development, test und live-infrastrucuture
● Puppet in combination with R10K and
hiera brings are the perfect tools for this
Puppet @ Spreadshirt

Thank you!
Hendrik Seffler <hse@spreadshirt.net>

More Related Content

Viewers also liked (10)

AP Vita Tronic_Eng
AP Vita Tronic_EngAP Vita Tronic_Eng
AP Vita Tronic_Eng
 
AP Kalkmagnet_Eng
AP Kalkmagnet_EngAP Kalkmagnet_Eng
AP Kalkmagnet_Eng
 
AP Kalkmagnet RUS
AP Kalkmagnet RUSAP Kalkmagnet RUS
AP Kalkmagnet RUS
 
Actividad 3 corte
Actividad 3 corteActividad 3 corte
Actividad 3 corte
 
L imperattiv
L imperattivL imperattiv
L imperattiv
 
Meet drupal
Meet drupalMeet drupal
Meet drupal
 
Multijosa topaketa_ 13
Multijosa topaketa_ 13Multijosa topaketa_ 13
Multijosa topaketa_ 13
 
AP Joint RUS
AP Joint RUSAP Joint RUS
AP Joint RUS
 
Saski eguna_ 15
Saski eguna_ 15Saski eguna_ 15
Saski eguna_ 15
 
Manajemen Pemasaran Barang dan Jasa dalam Bisnis
Manajemen Pemasaran Barang dan Jasa dalam BisnisManajemen Pemasaran Barang dan Jasa dalam Bisnis
Manajemen Pemasaran Barang dan Jasa dalam Bisnis
 

Similar to Puppet @ Spreadshirt

Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your OrganizationRobert Nelson
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Nicolas Brousse
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Nuwan Bandara
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetNicolas Brousse
 
Introduction to Puppet - SpringPeople
Introduction to Puppet - SpringPeopleIntroduction to Puppet - SpringPeople
Introduction to Puppet - SpringPeopleSpringPeople
 
Puppet - Configuration Management Tool
Puppet - Configuration Management ToolPuppet - Configuration Management Tool
Puppet - Configuration Management ToolAswin Barath
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
Python in Industry
Python in IndustryPython in Industry
Python in IndustryDharmit Shah
 
Github for Serious Business Professional
Github for Serious Business ProfessionalGithub for Serious Business Professional
Github for Serious Business Professionalzwheller
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016Dan Lynn
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016Dan Lynn
 
#TOA13 - Tech Opoen Air Recommender Hackathon
#TOA13 - Tech Opoen Air Recommender Hackathon#TOA13 - Tech Opoen Air Recommender Hackathon
#TOA13 - Tech Opoen Air Recommender HackathonTorben Brodt
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Maarten Balliauw
 

Similar to Puppet @ Spreadshirt (20)

Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Shindig Apachecon Asia 09
Shindig Apachecon Asia 09
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with Puppet
 
Introduction to Puppet - SpringPeople
Introduction to Puppet - SpringPeopleIntroduction to Puppet - SpringPeople
Introduction to Puppet - SpringPeople
 
Puppet - Configuration Management Tool
Puppet - Configuration Management ToolPuppet - Configuration Management Tool
Puppet - Configuration Management Tool
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
Python in Industry
Python in IndustryPython in Industry
Python in Industry
 
Github for Serious Business Professional
Github for Serious Business ProfessionalGithub for Serious Business Professional
Github for Serious Business Professional
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
 
Pentester++
Pentester++Pentester++
Pentester++
 
Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016
 
#TOA13 - Tech Opoen Air Recommender Hackathon
#TOA13 - Tech Opoen Air Recommender Hackathon#TOA13 - Tech Opoen Air Recommender Hackathon
#TOA13 - Tech Opoen Air Recommender Hackathon
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

Puppet @ Spreadshirt

  • 1. Puppet @ Spreadshirt Hendrik Seffler <hse@spreadshirt.net>
  • 2. Puppet @ Spreadshirt The Spreadshirt e-commerce platform lets anyone create, sell and buy ideas on things consumers love to wear, use and carry.
  • 3. Puppet @ Spreadshirt ● B2B & B2C points-of-sale ● Choose from over 140 quality products ● Each item made print-on-demand ● Minimum order = 1 item ● Localized services for 17 countries ● Delivered within 3 to 7 days
  • 5. Puppet @ Spreadshirt How is Spreadshirt using Puppet? ● Currently different environments at ○ OPS (Opennebula) ○ QA (EC2) ○ DEV (Vagrant) ● Transitions between those environments cause confusion and errors ● Own installer hard to maintain, very Java-specific
  • 6. Puppet @ Spreadshirt Our tools ● Puppet ● “Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle ” ● http://www.puppetlabs.com
  • 7. Puppet @ Spreadshirt Puppet ● Puppet provides a declarative language to describe a systems configuration ● The most atomic element is the type which descibes a basic configuration item ● Rules are organized in manifests ● Manifests include classes from modules ● Puppet supports variables, facts and templates
  • 8. Puppet @ Spreadshirt Our tools ● r10k ● “R10K is a hybrid solution for deploying Puppet code...deploying Puppet environments based on Git branches... provides an implementation of the Puppetfile format...R10K can provide your modules for you.” ● https://github.com/adrienthebo/r10k ● http://somethingsinistral.net/blog/rethinking-puppet-deployment/
  • 9. Puppet @ Spreadshirt R10K ● R10K helps us manage our modules ● Allows us to store our modules along with the software it deploys ● This enables re-use of modules in different contexts ● DEV, OPS and QA can use the same module to deploy an artifact without copy-and-paste-ing the code all over the place ● Much like puppet-librarian, but also creates puppet-environments based on GIT-branches
  • 10. Puppet @ Spreadshirt R10K ● Puppetfile is a file which contains references to modules we want on out module-path ● R10K checkout out those modules when it runs ● OK, an example: mod ‘jetty’, :git => "git@git.spreadomat.net:puppet/jetty.git" mod 'content-service', :git => "git@git.spreadomat.net:puppet/content-service.git", :ref => "1.0.0" ● Modulename, GIT-Source, optional git-branch
  • 11. Puppet @ Spreadshirt Our tools ● hiera ● “Hiera is a key/value lookup tool for configuration data. It makes Puppet better by keeping site-specific data out of your manifests. ” ● http://docs.puppetlabs.com/hiera/1/
  • 12. Puppet @ Spreadshirt Hiera ● Configuration differs from context to context ● Configuration should not be hardcoded in manifests ● E.g. we may have: $memory=”-Xmx8192M” ● But actually we want: $memory=”-Xmx512M” (DEV) $memory=”-Xmx1024M” (QA) $memory=”-Xmx8192M” (OPS)
  • 13. Puppet @ Spreadshirt Hiera ● Hiera seperates deployment description from configuration $memory=hiera(“memory”) ● Hiera looks up the actual value based on a hierachy we define ● Various backends to retrieve values
  • 14. Puppet @ Spreadshirt Hiera ● Storage of data in module by using the backend yaml_data_in_modules ● Our own backend, open-source https://github.com/mythsunwind/yaml_data_in_modules
  • 15. Puppet @ Spreadshirt Hiera ● Our hierachy - %{context}-%{datacenter}-%{platform}-%{cluster}-%{hostname} - %{context}-%{datacenter}-%{platform}-%{cluster} - %{context}-%{datacenter}-%{platform} - %{context}-%{datacenter} - %{context} - common-%{platform} - common
  • 16. Puppet @ Spreadshirt Hiera ● Lets look at a typical lookup path: common.yaml app_name: content-service port:4747 qa.yaml port: 2318 ● So for a EU system in QA: app_name: content-service port: 2318 lang=de_DE, en_GB qa-eu.yaml lang=de_DE, en_GB qa-na.yaml lang=en_US
  • 17. Puppet @ Spreadshirt Conclusions ● Spreadshirt uses Puppet to deploy more and more of its infrastructure ● To enable continuous deployment we aim to have a uniform development, test und live-infrastrucuture ● Puppet in combination with R10K and hiera brings are the perfect tools for this
  • 18. Puppet @ Spreadshirt Thank you! Hendrik Seffler <hse@spreadshirt.net>