SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Packer, Terraform & Jenkins
IaC & CD for small stacks
Simon McCartney
Twitter: @simonmcc
Background:
Isn’t this a solved problem?
Background:
Don’t containers solve
everything?
Making innovation easy
What does the pipeline look like?
•Simple master/!master path
Goal 1: Traceable Images
• What was this image built from?
• Project, branch, SHA, clean, dirty
• Store it inside the image and
externally via tags
Goal 2: Testable Images
• Validate that an image is good
• Chef’s InSpec for os/infra
• App/Service specific testing
Goal 3: Self Contained POC
• Monorepo FTW, single pipeline
• Minimal Jenkins Plugins
• Sanity wrappers for Terraform & Packer
• Terraform for the app
• Terraform for the build environment
Jenkins from day 1
•Write tools & wrappers that work by default
in Jenkins, easy path for non-interactive use
•Disposable Jenkins setup – no dirty clicking
Jenkins Configuration as Code, Job DSL &
Jenkinsfile, docker container for local
experiments
https://github.com/jenkins201/jenkins-container
Packer Wrapper – build.sh
•Modeled on base & app AMI
•Expose git SHA & clean/dirty state to packer
for including in tags etc (‘cos CLI building
should still be possible!)
•Only build base/app AMI when necessary
tf-wrapper.sh
•Terraform wrapper
•Map git branch to terraform workspace
•Map git branch to tfvars
•Expose git branch & sha to aid tagging &
building unique resources (RDS Instance
etc)
tf-wrapper.sh
•Configure terraform remote state
render backend_config.tf
AWS: create s3 bucket & DynamoDB
Azure: create Resource Group & Storage Account
Demo
Tips
•Watch out for account or globally unique
resources (that’s why we expose branch &
SHA1 to packer & terraform)
•SHA1 for images in this POC is weak – it’s
of a git object that “mostly” represents the
image build source.
•Jenkins aws-credentials & docker agent is
broken :(
Links
•https://github.com/simonmcc/cfgmgmtcmp-2019-
iac-ci-cd
•https://github.com/jenkins201/jenkins-container
•Twitter: @simonmcc
•https://www.axon.com
We’re hiring!
SRE, Remote UK & EU
Packer, Terraform & Jenkins - DevOpsBelfast March 2019
Packer, Terraform & Jenkins - DevOpsBelfast March 2019
Packer, Terraform & Jenkins - DevOpsBelfast March 2019

Weitere ähnliche Inhalte

Was ist angesagt?

The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012Jan Jongboom
 
Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)Stephen Feather
 
Zero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSSZero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSSMike McGarr
 
Yeoman - Santa Barbara JavaScript Meetup
Yeoman - Santa Barbara JavaScript MeetupYeoman - Santa Barbara JavaScript Meetup
Yeoman - Santa Barbara JavaScript MeetupTim Doherty
 
Jenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itJenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itCamilo Ribeiro
 
STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)Mike Subelsky
 
Android Functional UI Testing at Amplify
Android Functional UI Testing at AmplifyAndroid Functional UI Testing at Amplify
Android Functional UI Testing at Amplifyjdlloyd1
 
SplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for DevelopersSplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for DevelopersGabrielle Knowles
 
SplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for DevelopersSplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for DevelopersGabrielle Knowles
 
2 years with Angular & Electron: Video Hub App 2
2 years with Angular & Electron: Video Hub App 22 years with Angular & Electron: Video Hub App 2
2 years with Angular & Electron: Video Hub App 2Boris Yakubchik
 

Was ist angesagt? (10)

The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
 
Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)
 
Zero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSSZero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSS
 
Yeoman - Santa Barbara JavaScript Meetup
Yeoman - Santa Barbara JavaScript MeetupYeoman - Santa Barbara JavaScript Meetup
Yeoman - Santa Barbara JavaScript Meetup
 
Jenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itJenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate it
 
STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)STAQ Development Manual (Redacted)
STAQ Development Manual (Redacted)
 
Android Functional UI Testing at Amplify
Android Functional UI Testing at AmplifyAndroid Functional UI Testing at Amplify
Android Functional UI Testing at Amplify
 
SplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for DevelopersSplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for Developers
 
SplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for DevelopersSplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for Developers
 
2 years with Angular & Electron: Video Hub App 2
2 years with Angular & Electron: Video Hub App 22 years with Angular & Electron: Video Hub App 2
2 years with Angular & Electron: Video Hub App 2
 

Ähnlich wie Packer, Terraform & Jenkins - DevOpsBelfast March 2019

How Build Infrastructure Powers the Node.js Foundation
How Build Infrastructure Powers the Node.js FoundationHow Build Infrastructure Powers the Node.js Foundation
How Build Infrastructure Powers the Node.js FoundationGibson Fahnestock
 
Jenkins-Koji plugin presentation on Python & Ruby devel group @ Brno
Jenkins-Koji plugin presentation on Python & Ruby devel group @ BrnoJenkins-Koji plugin presentation on Python & Ruby devel group @ Brno
Jenkins-Koji plugin presentation on Python & Ruby devel group @ BrnoVaclav Tunka
 
TiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsTiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsJamil Spain
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnycJamil Spain
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1Howard Greenberg
 
Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projectsAppsDojo
 
Version your build process as you version your code
Version your build process as you version your codeVersion your build process as you version your code
Version your build process as you version your codeVincent Latombe
 
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...Standing on the Shoulders of Giants: How Community Shapes Development in Elli...
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...Derek Allard
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopValeri Karpov
 
Docker for developers - The big picture
Docker for developers - The big pictureDocker for developers - The big picture
Docker for developers - The big pictureGeorge Dyrrahitis
 
Continuous integration jenkins-installation in ec2 instace linux
Continuous integration jenkins-installation in ec2 instace linuxContinuous integration jenkins-installation in ec2 instace linux
Continuous integration jenkins-installation in ec2 instace linuxMaheshnagakumar Tokala
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedVinci Rufus
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFxSignalFx
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...CloudBees
 

Ähnlich wie Packer, Terraform & Jenkins - DevOpsBelfast March 2019 (20)

How Build Infrastructure Powers the Node.js Foundation
How Build Infrastructure Powers the Node.js FoundationHow Build Infrastructure Powers the Node.js Foundation
How Build Infrastructure Powers the Node.js Foundation
 
Jenkins-Koji plugin presentation on Python & Ruby devel group @ Brno
Jenkins-Koji plugin presentation on Python & Ruby devel group @ BrnoJenkins-Koji plugin presentation on Python & Ruby devel group @ Brno
Jenkins-Koji plugin presentation on Python & Ruby devel group @ Brno
 
TiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsTiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium Applications
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnyc
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1
OpNovember Water Cooler Talk: The Mystery of Domino on Docker - Part 1
 
Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projects
 
Version your build process as you version your code
Version your build process as you version your codeVersion your build process as you version your code
Version your build process as you version your code
 
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...Standing on the Shoulders of Giants: How Community Shapes Development in Elli...
Standing on the Shoulders of Giants: How Community Shapes Development in Elli...
 
PDE builds or Maven
PDE builds or MavenPDE builds or Maven
PDE builds or Maven
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
Docker for developers - The big picture
Docker for developers - The big pictureDocker for developers - The big picture
Docker for developers - The big picture
 
Continuous integration jenkins-installation in ec2 instace linux
Continuous integration jenkins-installation in ec2 instace linuxContinuous integration jenkins-installation in ec2 instace linux
Continuous integration jenkins-installation in ec2 instace linux
 
Docker {at,with} SignalFx
Docker {at,with} SignalFxDocker {at,with} SignalFx
Docker {at,with} SignalFx
 
Intro to ionic 2
Intro to ionic 2Intro to ionic 2
Intro to ionic 2
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFx
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
 

Kürzlich hochgeladen

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...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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 organizationRadu Cotescu
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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.pdfhans926745
 
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 AutomationSafe Software
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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.pptxHampshireHUG
 
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 CVKhem
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 textsMaria Levchenko
 
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 slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 Processorsdebabhi2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

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...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 

Packer, Terraform & Jenkins - DevOpsBelfast March 2019

Hinweis der Redaktion

  1. Who are Axon – we’re a leading supplier of software & services to the blue light industry, also known as public safety, our first product was the Taser, something so good it became a verb, Taser continues to be an important product for us, but we also provide a Digital Evidence Management System that’s a key element to our body camera division, and that’s where I work, I’m an SRE at evidence.com, helping build & operate the platform that hosts our services all over the world, managing video footage and other evidential material for police forces and other blue light industries all over the world.
  2. If you google enough or have been going to infrastructure management conferences for a few years, it would be easy to think that VM image baking ios a solved problem, we’ve been talking about it for ages, there are tools that do some of the essentials, but in my opinion, there was still a lot left as an exercise for the student. I started a new job recently, and we have a infrastructure that’s state of the art for the year 2010, terraform for cloud based infrastructure, puppet & salt for long lived VMs configuration management, but this leads to pain & bad practices, like manually resizing VMs & editing the terraform to keep sync, adding VMs to cope with a demand spike is painful, removing them is even more painful, you've got puppet certs, manual DNS, discovery via hieradata, all solved problems in some way.
  3. Nope. Many of our services are moving to k8s managed containers, but not everything will, for good & bad reasons. There are also some environments & companies where they’re just not interested in the k8s & PaaS overhead, they just want somewhere better to run their LAMP stack apps that fits with their appetite for change.
  4. As my new work environment was a little cumbersome to innovate & iterate in, I decided to do a POC outside our internal constraints & came up with a model of a simple linux web app stack & concentrate on what tools I would need, what the Jenkins pipeline might look like if I wanted to build & test on a PR branch and deploy to production from master.
  5. Back to what triggered this in work, I was delighted when I found a GitHub repo in our org called ops/packer – yes I thought, somebody has already done the hard work, we had layered packer templates to build out various things, TeamCity build agents, base images for CentOS in our 2 main cloud providers. Then I looked at the AMIs & VHDs in our accounts – I had no idea where they came from, which template built them, from which branch, when? I started googling again, Netflix’s aminator has some hooks for some of that, but nothing concrete, and aminator is strictly AWS, we’re 90% Azure.
  6. The next challenge I had was proving that an image was actually good – how do I know that I haven’t just broken something or broken some security policy by tweaking something, or worse, an assumption on an installed package & that installed package changed a default, Chef’s InSpec tools allows you to do much of that, it’s also great at ensuring that you’re in compliance with security baselines, either internal or external (CIS), I’m not an InSpec expert, but I think we have a couple of Chef employees in the room who are actually paid to work on InSpec, so you should find them & poke them for more details if you’re interested.