SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
Immutable Infrastructure
Rethinking Configuration in the Age of Easy Redeployment
RackN, Inc
February, 2018
Note: Graphics mainly from http://pexels.com
<<< Shift Left <<<
2
@zehicle #immutable
Involved in Open Ops Software:
Digital Rebar Project
Kubernetes ClusterOps SIG
OpenStack Board
Your Humble Presenter
I’m all about automating infrastructure.
Rob Hirschfeld (aka @zehicle)
Co-Founder of RackN
rob@rackn.com
3
@zehicle #immutable
Storytime! “Self-Bootstrapping Kubernetes”
Kubecon in Nov 2017 we created this demo
Simple “immutable” Idea:
1) In Memory Boot Machines
2) Install Docker
3) Elect Leader
4) Run Kubeadm on Leader
5) Run Kubeadm on Remainder
But….it’s shockingly hard to maintain.
Dependencies breaks the installation
And they are constantly changing.
4
@zehicle #immutable
Storytime! “Self-Bootstrapping Kubernetes”
So, while it’s pretty cool,
it’s not “real” immutability
Presentation & Demo
https://youtu.be/OowxF6GqK4I
sa !
Why is configuration fragile?
Why is configuration fragile?
mu on
V
7
@zehicle #immutable
But… I Infrastructure as Code?!
Sorry. Mutability adds complexity
Traditional “build-in place” approaches
● Have hidden dependency graphs
● Create variation between environments
● Are harder to “lock down” due to config
AND OMG… updates and patches are even harder
● Idempotent operations are difficult
● Roll backward is next to impossible!
● Creating indeterminate state
8
@zehicle #immutable
Traditional “build-in place” approaches
● Have hidden dependency graphs
● Create variation between environments
● Are harder to “lock down” due to config
AND OMG… updates and patches are even harder
● Idempotent operations are difficult
● Roll backward is impossible
● Creating indeterminate state
But… I Infrastructure as code?!
Sorry. Mutability adds complexity
Let’s o k w !
What is Immutable Infrastructure?
What is Immutable Infrastructure?Pre-de y fi d
V
11
@zehicle #immutable
Traditional Deploy and Configure
System is configured in situ from
a least common denominator
baseline.
This can be “immutable-like”
under the right conditions.
We’ll come back to that...
Delivery Pipeline
Deployment
Code
Build
Integrate
Run
Configure
12
@zehicle #immutable
Shifting Configuration BEFORE Deployment
In our ideal delivery pipeline,
configuration is before
deployment.
Running systems are delivered as
a complete runnable unit for
deployment.
Delivery Pipeline
Deployment
Code
Build
Integrate
Run
Configure
13
@zehicle #immutable
Shifting Configuration BEFORE Deployment
In reality, it’s very hard to create a
distinct artifact for every running
instance; instead, we create
incremental versions.
So we do some initialization of the
reusable versioned instance.
Cloud init is the most commonly
known pattern for this.
Delivery Pipeline
Deployment
Code
Build
Integrate
Run
Configure
Ini iz !
V
Cloud Native
Infrastructure
CNIbook.info
Justin Garrison & Kris Nova
“Infrastructure as software”
15
@zehicle #immutable
Which Enables… Delegating Operations
If you can make your artifacts
immutable then you can delegate
management of them to a
platform like Kubernetes.
Kubernetes does not configure
infrastructure. It maintains state
based on a manifest.
StateManager
(e.g.Kubernetes)
Code
Build
Integrate
Run
Configure
Delivery Pipeline
16
@zehicle #immutable
Which Enables… Delegating Operations
If you can make your artifacts
immutable then you can delegate
management of them to a
platform like Kubernetes.
Kubernetes does not configure
infrastructure. It maintains state
based on a manifest.
StateManager
(e.g.Kubernetes)
Code
Build
Integrate
Run
Configure
Delivery Pipeline
Kub te ? W !
Is ut > K8s?
Immutable is a DevOps Pattern
<<< Shift Left & Create/Delete
18
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
package
server
image
provision
server
initial
config
19
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
patch 1
package
server
image
provision
server
initial
config
20
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
patch 1 patch 2
package
server
image
provision
server
initial
config
21
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
patch 1 patch 2
t e d s o n't
s o t c 2!
package
server
image
provision
server
initial
config
22
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
patch 1 patch 2
t e d s o n't
s o t c 2!
What Madness?
● We have to maintain root access
● Patches assume system state
● Patches create dependency graphs
● Coordination? Should we halt work?
● Drift is inevitable!
package
server
image
provision
server
initial
config
23
@zehicle #immutable
The Problem
Immutability <<< Shifting Left
patch 1 patch 2
SA !!package
server
image
provision
server
initial
config
24
@zehicle #immutable
Apply cloud and container lessons to our Bare Metal …
Immutability <<< Shifting Left
package
server
image
provision
server
initial
config
destroy!!
25
@zehicle #immutable
Apply cloud and container lessons to our Bare Metal …
Immutability <<< Shifting Left
destroy!!
destroy!!patch 1
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
26
@zehicle #immutable
Apply cloud and container lessons to our Bare Metal …
Immutability <<< Shifting Left
destroy!!
destroy!!patch 1
depatch 2
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
27
@zehicle #immutable
Apply cloud and container lessons to our Bare Metal …
Immutability <<< Shifting Left
destroy!!
destroy!!patch 1
patch N
depatch 2
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
package
server
image
provision
server
initial
config
Cloud like behavior …
29
Immutable Provisioning systems
treat infrastructure as a black box
Cloud-like Integration and Staged Workflow
Provisioning
System
Requested
State
Returned
State
REST
API
Event
Hook
30
Cloud-like Integration and Staged Workflow
Immutable Provisioning systems
treat infrastructure as a black box
Provision requests are for a system state
with optional parameters.
The intermediate changes to achieve the
state are not exposed to the requester.
Provisioning
System
Reset Join
Install
Config
Test
Requested
State
Returned
State
REST
API
Event
Hook
31
Cloud-like Integration and Staged Workflow
Immutable Provisioning systems
treat infrastructure as a black box
Provision requests are for a system state
with optional parameters.
The intermediate changes to achieve the
state are not exposed to the requester.
REMEMBER: Operators of the
provisioning system require high
transparency, stages and control.
Provisioning
System
Reset Join
Install
Config
Test
Requested
State
Returned
State
REST
API
Event
Hook
No h n
op i n !
Immutable Patterns
1) Baseline + Configuration
2) Live Boot + Configuration
3) Image Deploy
33
Provision
1: Baseline + Configuration
Benefit: Easiest to achieve with current tools, Safer than Patching
Challenge: Lots of Post-Configuration, Not Really “Immutable”, Slow
Instead of relying on patches, rely on starting from a pristine image
ResetBaseline Configure Run
Additional Reference https://thenewstack.io/immutable-hardware-ops-hygiene-security-efficiency/
34
Benefit: Fast reset times, forces good behavior
Challenge: Provisioning becomes critical path, still have dependency graph
Like #1 but clean-up is simply a reboot. Favors smaller footprint O/S.
2: Live Boot + Configuration
Provision RebootBaseline Configure Run
35
3: Image Deploy
Benefit: Shorter time to ready, highly controlled (“shift left”), rollback
Challenge: Harder to create and deploy images
Image is deployed from source instead of Baseline + Configure
Provision
Deploy
Image
Run Provision
Deploy
Image
Run
36
3: Image Deploy
Benefit: Shorter time to ready, highly controlled (“shift left”), rollback
Challenge: Harder to create and deploy images
Image is deployed from source instead of Baseline + Configure
Provision
Deploy
Image
Run Provision
Deploy
Image
Run
Ini iz !
V
Ini iz !
V
37
So… Let’s talk Image Creation
Ideally in an automation build process.
You DO THE CONFIGURATION on a
live system (so you still need
configuration tools) and then capture
the image into a portable format.
Tools like Hashicorp Packer, Image
Builder, WBIC or raw images are used
to create source files (e.g. AMI, OVS).
38
So… Let’s talk Image Creation
Ideally in an automation build process.
You DO THE CONFIGURATION on a
live system (so you still need
configuration tools) and then capture
the image into a portable format.
Tools like Hasicorp Packer, Image
Builder, WBIC or raw images are used
to create source files (e.g. AMI, OVS).
Tha n li ot
of k & re y ow!
Yes, But…
It’s faster, safer & more scalable.
40
Build Pipeline
Immutable Demo
Prep: Image is pre-created from reference system.
Reference
System
Image
Read
41
Build Pipeline Deploy
Immutable Demo
Prep: Image is pre-created from reference system.
Stage: Boot RAM image and write image to disk(s)
Reference
System
Image
Target System
RAM BOOT
WriteRead
42
Build Pipeline Deploy
Immutable Demo
Prep: Image is pre-created from reference system.
Stage: Boot RAM image and write image to disk(s)
Deploy: Reboot and run
Reference
System
Image
Target System
RAM BOOT
Target System
RUNNING
Reboot
Write RunRead
Thank you!
Questions?
Interested in IMMUTABLE METAL?
It’s complicated, but we can get you there.
Start at http://portal.rackn.io
• Quickstart takes about 30 minutes
• Use your own hardware, VirtualBox or Packet.net
account
– use “RACKN100” on Packet.net for credit

Contenu connexe

Tendances

Deploying your application on open stack using bosh presentation
Deploying your application on open stack using bosh presentationDeploying your application on open stack using bosh presentation
Deploying your application on open stack using bosh presentation
capouch
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloud
martinlippert
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deployment
Devananda Van Der Veen
 
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
Simplilearn
 

Tendances (20)

Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Webcast - Making kubernetes production ready
Webcast - Making kubernetes production readyWebcast - Making kubernetes production ready
Webcast - Making kubernetes production ready
 
Deploying your application on open stack using bosh presentation
Deploying your application on open stack using bosh presentationDeploying your application on open stack using bosh presentation
Deploying your application on open stack using bosh presentation
 
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Zero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and TerraformZero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and Terraform
 
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloud
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsContinuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub Actions
 
Ansible day 4
Ansible day 4Ansible day 4
Ansible day 4
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deployment
 
Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2
 
Deploying and running Grails in the cloud
Deploying and running Grails in the cloudDeploying and running Grails in the cloud
Deploying and running Grails in the cloud
 
AWS Developer Fundamentals
AWS Developer FundamentalsAWS Developer Fundamentals
AWS Developer Fundamentals
 
DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with Ansible
 
Learn you some Ansible for great good!
Learn you some Ansible for great good!Learn you some Ansible for great good!
Learn you some Ansible for great good!
 
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 

Similaire à SRECon 18 Immutable Infrastructure

How Percolate uses CFEngine to Manage AWS Stateless Infrastructure
How Percolate uses CFEngine to Manage AWS Stateless InfrastructureHow Percolate uses CFEngine to Manage AWS Stateless Infrastructure
How Percolate uses CFEngine to Manage AWS Stateless Infrastructure
Percolate
 

Similaire à SRECon 18 Immutable Infrastructure (20)

Immutable Infrastructure & Rethinking Configuration - Interop 2019
Immutable Infrastructure & Rethinking Configuration - Interop 2019Immutable Infrastructure & Rethinking Configuration - Interop 2019
Immutable Infrastructure & Rethinking Configuration - Interop 2019
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
 
KubeCon 2017 Zero Touch Provision
KubeCon 2017 Zero Touch ProvisionKubeCon 2017 Zero Touch Provision
KubeCon 2017 Zero Touch Provision
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch KubernetesKubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On Demand
 
DevOps Summit 2016 - The immutable Journey
DevOps Summit 2016 - The immutable JourneyDevOps Summit 2016 - The immutable Journey
DevOps Summit 2016 - The immutable Journey
 
How Percolate uses CFEngine to Manage AWS Stateless Infrastructure
How Percolate uses CFEngine to Manage AWS Stateless InfrastructureHow Percolate uses CFEngine to Manage AWS Stateless Infrastructure
How Percolate uses CFEngine to Manage AWS Stateless Infrastructure
 
DevOps @ Proteus Operations
DevOps @ Proteus OperationsDevOps @ Proteus Operations
DevOps @ Proteus Operations
 
Immutable infrastructure tsap_v2
Immutable infrastructure tsap_v2Immutable infrastructure tsap_v2
Immutable infrastructure tsap_v2
 
Immutable Kubernetes with Digital Rebar Provision
Immutable Kubernetes with Digital Rebar ProvisionImmutable Kubernetes with Digital Rebar Provision
Immutable Kubernetes with Digital Rebar Provision
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
 
Composable Infrastructure Talk at Interop ITX 2018
Composable Infrastructure Talk at Interop ITX 2018Composable Infrastructure Talk at Interop ITX 2018
Composable Infrastructure Talk at Interop ITX 2018
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019
 
Immutable infrastructure & Rethinking Configuration PREVIEW
Immutable infrastructure & Rethinking Configuration PREVIEWImmutable infrastructure & Rethinking Configuration PREVIEW
Immutable infrastructure & Rethinking Configuration PREVIEW
 
Immutable infrastructure & Rethinking Configuration
Immutable infrastructure & Rethinking ConfigurationImmutable infrastructure & Rethinking Configuration
Immutable infrastructure & Rethinking Configuration
 
Immutable infrastructure & Rethinking Configuration
Immutable infrastructure & Rethinking ConfigurationImmutable infrastructure & Rethinking Configuration
Immutable infrastructure & Rethinking Configuration
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
Choosing the Right Framework for Running Docker Containers in Prod
Choosing the Right Framework for Running Docker Containers in ProdChoosing the Right Framework for Running Docker Containers in Prod
Choosing the Right Framework for Running Docker Containers in Prod
 
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-nativeKubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
 

Plus de RackN

Plus de RackN (6)

Digital Rebar Community Welcome Guide
Digital Rebar Community Welcome GuideDigital Rebar Community Welcome Guide
Digital Rebar Community Welcome Guide
 
Immutable Deployment Hands-On Lab Interop ITX
Immutable Deployment Hands-On Lab Interop ITXImmutable Deployment Hands-On Lab Interop ITX
Immutable Deployment Hands-On Lab Interop ITX
 
RackN Company Overview
RackN Company OverviewRackN Company Overview
RackN Company Overview
 
Operational Improvement Issues, Impacts and Solution from RackN
Operational Improvement Issues, Impacts and Solution from RackNOperational Improvement Issues, Impacts and Solution from RackN
Operational Improvement Issues, Impacts and Solution from RackN
 
Data Center’s Last Mile: Zero Touch Metal Automation
Data Center’s Last Mile: Zero Touch Metal AutomationData Center’s Last Mile: Zero Touch Metal Automation
Data Center’s Last Mile: Zero Touch Metal Automation
 
DevOps vs SRE vs Cloud Native
DevOps vs SRE vs Cloud NativeDevOps vs SRE vs Cloud Native
DevOps vs SRE vs Cloud Native
 

Dernier

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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...
 
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)
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 

SRECon 18 Immutable Infrastructure

  • 1. Immutable Infrastructure Rethinking Configuration in the Age of Easy Redeployment RackN, Inc February, 2018 Note: Graphics mainly from http://pexels.com <<< Shift Left <<<
  • 2. 2 @zehicle #immutable Involved in Open Ops Software: Digital Rebar Project Kubernetes ClusterOps SIG OpenStack Board Your Humble Presenter I’m all about automating infrastructure. Rob Hirschfeld (aka @zehicle) Co-Founder of RackN rob@rackn.com
  • 3. 3 @zehicle #immutable Storytime! “Self-Bootstrapping Kubernetes” Kubecon in Nov 2017 we created this demo Simple “immutable” Idea: 1) In Memory Boot Machines 2) Install Docker 3) Elect Leader 4) Run Kubeadm on Leader 5) Run Kubeadm on Remainder But….it’s shockingly hard to maintain. Dependencies breaks the installation And they are constantly changing.
  • 4. 4 @zehicle #immutable Storytime! “Self-Bootstrapping Kubernetes” So, while it’s pretty cool, it’s not “real” immutability Presentation & Demo https://youtu.be/OowxF6GqK4I sa !
  • 6. Why is configuration fragile? mu on V
  • 7. 7 @zehicle #immutable But… I Infrastructure as Code?! Sorry. Mutability adds complexity Traditional “build-in place” approaches ● Have hidden dependency graphs ● Create variation between environments ● Are harder to “lock down” due to config AND OMG… updates and patches are even harder ● Idempotent operations are difficult ● Roll backward is next to impossible! ● Creating indeterminate state
  • 8. 8 @zehicle #immutable Traditional “build-in place” approaches ● Have hidden dependency graphs ● Create variation between environments ● Are harder to “lock down” due to config AND OMG… updates and patches are even harder ● Idempotent operations are difficult ● Roll backward is impossible ● Creating indeterminate state But… I Infrastructure as code?! Sorry. Mutability adds complexity Let’s o k w !
  • 9. What is Immutable Infrastructure?
  • 10. What is Immutable Infrastructure?Pre-de y fi d V
  • 11. 11 @zehicle #immutable Traditional Deploy and Configure System is configured in situ from a least common denominator baseline. This can be “immutable-like” under the right conditions. We’ll come back to that... Delivery Pipeline Deployment Code Build Integrate Run Configure
  • 12. 12 @zehicle #immutable Shifting Configuration BEFORE Deployment In our ideal delivery pipeline, configuration is before deployment. Running systems are delivered as a complete runnable unit for deployment. Delivery Pipeline Deployment Code Build Integrate Run Configure
  • 13. 13 @zehicle #immutable Shifting Configuration BEFORE Deployment In reality, it’s very hard to create a distinct artifact for every running instance; instead, we create incremental versions. So we do some initialization of the reusable versioned instance. Cloud init is the most commonly known pattern for this. Delivery Pipeline Deployment Code Build Integrate Run Configure Ini iz ! V
  • 14. Cloud Native Infrastructure CNIbook.info Justin Garrison & Kris Nova “Infrastructure as software”
  • 15. 15 @zehicle #immutable Which Enables… Delegating Operations If you can make your artifacts immutable then you can delegate management of them to a platform like Kubernetes. Kubernetes does not configure infrastructure. It maintains state based on a manifest. StateManager (e.g.Kubernetes) Code Build Integrate Run Configure Delivery Pipeline
  • 16. 16 @zehicle #immutable Which Enables… Delegating Operations If you can make your artifacts immutable then you can delegate management of them to a platform like Kubernetes. Kubernetes does not configure infrastructure. It maintains state based on a manifest. StateManager (e.g.Kubernetes) Code Build Integrate Run Configure Delivery Pipeline Kub te ? W ! Is ut > K8s?
  • 17. Immutable is a DevOps Pattern <<< Shift Left & Create/Delete
  • 18. 18 @zehicle #immutable The Problem Immutability <<< Shifting Left package server image provision server initial config
  • 19. 19 @zehicle #immutable The Problem Immutability <<< Shifting Left patch 1 package server image provision server initial config
  • 20. 20 @zehicle #immutable The Problem Immutability <<< Shifting Left patch 1 patch 2 package server image provision server initial config
  • 21. 21 @zehicle #immutable The Problem Immutability <<< Shifting Left patch 1 patch 2 t e d s o n't s o t c 2! package server image provision server initial config
  • 22. 22 @zehicle #immutable The Problem Immutability <<< Shifting Left patch 1 patch 2 t e d s o n't s o t c 2! What Madness? ● We have to maintain root access ● Patches assume system state ● Patches create dependency graphs ● Coordination? Should we halt work? ● Drift is inevitable! package server image provision server initial config
  • 23. 23 @zehicle #immutable The Problem Immutability <<< Shifting Left patch 1 patch 2 SA !!package server image provision server initial config
  • 24. 24 @zehicle #immutable Apply cloud and container lessons to our Bare Metal … Immutability <<< Shifting Left package server image provision server initial config destroy!!
  • 25. 25 @zehicle #immutable Apply cloud and container lessons to our Bare Metal … Immutability <<< Shifting Left destroy!! destroy!!patch 1 package server image provision server initial config package server image provision server initial config
  • 26. 26 @zehicle #immutable Apply cloud and container lessons to our Bare Metal … Immutability <<< Shifting Left destroy!! destroy!!patch 1 depatch 2 package server image provision server initial config package server image provision server initial config package server image provision server initial config
  • 27. 27 @zehicle #immutable Apply cloud and container lessons to our Bare Metal … Immutability <<< Shifting Left destroy!! destroy!!patch 1 patch N depatch 2 package server image provision server initial config package server image provision server initial config package server image provision server initial config package server image provision server initial config
  • 29. 29 Immutable Provisioning systems treat infrastructure as a black box Cloud-like Integration and Staged Workflow Provisioning System Requested State Returned State REST API Event Hook
  • 30. 30 Cloud-like Integration and Staged Workflow Immutable Provisioning systems treat infrastructure as a black box Provision requests are for a system state with optional parameters. The intermediate changes to achieve the state are not exposed to the requester. Provisioning System Reset Join Install Config Test Requested State Returned State REST API Event Hook
  • 31. 31 Cloud-like Integration and Staged Workflow Immutable Provisioning systems treat infrastructure as a black box Provision requests are for a system state with optional parameters. The intermediate changes to achieve the state are not exposed to the requester. REMEMBER: Operators of the provisioning system require high transparency, stages and control. Provisioning System Reset Join Install Config Test Requested State Returned State REST API Event Hook No h n op i n !
  • 32. Immutable Patterns 1) Baseline + Configuration 2) Live Boot + Configuration 3) Image Deploy
  • 33. 33 Provision 1: Baseline + Configuration Benefit: Easiest to achieve with current tools, Safer than Patching Challenge: Lots of Post-Configuration, Not Really “Immutable”, Slow Instead of relying on patches, rely on starting from a pristine image ResetBaseline Configure Run Additional Reference https://thenewstack.io/immutable-hardware-ops-hygiene-security-efficiency/
  • 34. 34 Benefit: Fast reset times, forces good behavior Challenge: Provisioning becomes critical path, still have dependency graph Like #1 but clean-up is simply a reboot. Favors smaller footprint O/S. 2: Live Boot + Configuration Provision RebootBaseline Configure Run
  • 35. 35 3: Image Deploy Benefit: Shorter time to ready, highly controlled (“shift left”), rollback Challenge: Harder to create and deploy images Image is deployed from source instead of Baseline + Configure Provision Deploy Image Run Provision Deploy Image Run
  • 36. 36 3: Image Deploy Benefit: Shorter time to ready, highly controlled (“shift left”), rollback Challenge: Harder to create and deploy images Image is deployed from source instead of Baseline + Configure Provision Deploy Image Run Provision Deploy Image Run Ini iz ! V Ini iz ! V
  • 37. 37 So… Let’s talk Image Creation Ideally in an automation build process. You DO THE CONFIGURATION on a live system (so you still need configuration tools) and then capture the image into a portable format. Tools like Hashicorp Packer, Image Builder, WBIC or raw images are used to create source files (e.g. AMI, OVS).
  • 38. 38 So… Let’s talk Image Creation Ideally in an automation build process. You DO THE CONFIGURATION on a live system (so you still need configuration tools) and then capture the image into a portable format. Tools like Hasicorp Packer, Image Builder, WBIC or raw images are used to create source files (e.g. AMI, OVS). Tha n li ot of k & re y ow!
  • 39. Yes, But… It’s faster, safer & more scalable.
  • 40. 40 Build Pipeline Immutable Demo Prep: Image is pre-created from reference system. Reference System Image Read
  • 41. 41 Build Pipeline Deploy Immutable Demo Prep: Image is pre-created from reference system. Stage: Boot RAM image and write image to disk(s) Reference System Image Target System RAM BOOT WriteRead
  • 42. 42 Build Pipeline Deploy Immutable Demo Prep: Image is pre-created from reference system. Stage: Boot RAM image and write image to disk(s) Deploy: Reboot and run Reference System Image Target System RAM BOOT Target System RUNNING Reboot Write RunRead
  • 43. Thank you! Questions? Interested in IMMUTABLE METAL? It’s complicated, but we can get you there. Start at http://portal.rackn.io • Quickstart takes about 30 minutes • Use your own hardware, VirtualBox or Packet.net account – use “RACKN100” on Packet.net for credit