SlideShare a Scribd company logo
#JCConf


William Yeh
Immutable infrastructure:觀念與實作 (建議)
#JCConf


William Yeh
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)
immutable
infrastructure”
immutable
infrastructure”
#JCConf


William Yeh
#JCConf


William Yeh
http://send.wtf/jcconf2015
#JCConf
Immutable infrastructure:觀念與實作 (建議)
im‧mutable
im‧mutable
#JCConf
Entropy
Entropy
#JCConf
#JCConf
Q:
7%
A:
lysosomes
#JCConf
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)


Immutable infrastructure:觀念與實作 (建議)
#JCConf
#JCConf
DNA
#JCConf
DNA
#JCConf
DNA

lysosomes
#JCConf
DNA

lysosomes
#JCConf
How about computers?
Entropy
?
#JCConf
“HAProxy has been installed on Linux 2.4
systems serving millions of pages every
day, and which have only known one
reboot in 3 years for a complete OS
upgrade.”
Reliability - keeping high-traffic sites online since 2002
“HAProxy has been installed on Linux 2.4
systems serving millions of pages every
day, and which have only known one
reboot in 3 years for a complete OS
upgrade.”
Reliability - keeping high-traffic sites online since 2002
im‧mutable
im‧mutable
im‧mutable
im‧mutable
In OOP and FP, an immutable object is
an object whose state cannot be
modified after it is created.
immutable objects
JCConf 2015

Universal Scala

by Walter Chang
In OOP and FP, an immutable object is
an object whose state cannot be
modified after it is created.
String s = "ABC";
s.toLowerCase();
immutable objects
String s = "ABC";
s.toLowerCase();
Why immutable objects?

• simpler to understand

• inherently thread-safe

• offer higher security than mutable objects.
immutable objects
“How to sort in-place using the merge sort algorithm?”
immutable objects algorithms
• Too complex to be reduced to practical
program.

• Knuth left this as an exercise (Vol 3, 5.2.5).
There do exists in-place merge sort. It
must be implemented carefully.
http://stackoverflow.com/q/2571049/714426
CTAS: Create Table As Select
immutable objects algorithms
• Faster than ALTER TABLE.

• … with some constraints… Google it!
http://stackoverflow.com/q/2571049/714426
databases
DHH (David Heinemeier Hansson)

Creator of Rails.
immutable objects algorithms databases applications
immutable objects algorithms
http://smalltalk.xdite.net/posts/302780-bos-rewrite-from-dhh
databases applications
immutable objects algorithms
http://smalltalk.xdite.net/posts/302780-bos-rewrite-from-dhh
databases applications
immutable
infrastructure
immutable objects algorithms databases applications
immutable
infrastructure
immutable objects algorithms databases applications
Let’s talk about
immutable objects algorithms databases applications Java
hot swap? hot deploy?
immutable objects algorithms databases applications Java
hot swap since JDK 1.4
immutable objects algorithms databases applications Java
hot swap in JRebel
immutable objects algorithms databases applications Java
hot swap in OSGi
immutable objects algorithms databases applications Java
Christian Posta

Principal Middleware Specialist/Architect
at Red Hat, open-source enthusiast,
committer on Apache ActiveMQ, Apache
Camel, Fabric8, HawtIO, blogging,
Family, India Pale Ale.
http://blog.christianposta.com/immutable/immutable-infrastructure-and-the-jvm-part-i/
immutable objects algorithms databases applications Java
• Don’t hotdeploy/redeploy/migrate your
Java services in production at runtime.
Christian Posta

Principal Middleware Specialist/Architect
at Red Hat, open-source enthusiast,
committer on Apache ActiveMQ, Apache
Camel, Fabric8, HawtIO, blogging,
Family, India Pale Ale.
http://blog.christianposta.com/immutable/immutable-infrastructure-and-the-jvm-part-i/
immutable objects algorithms databases applications Java
• Don’t hotdeploy/redeploy/migrate your
Java services in production at runtime.
• Do have a very strong focus on your
delivery pipeline/automation/testing
to quickly make changes to your
system.
Christian Posta

Principal Middleware Specialist/Architect
at Red Hat, open-source enthusiast,
committer on Apache ActiveMQ, Apache
Camel, Fabric8, HawtIO, blogging,
Family, India Pale Ale.
http://blog.christianposta.com/immutable/immutable-infrastructure-and-the-jvm-part-i/
Infra
Infra
immutable
infrastructure”
immutable
infrastructure
definition
http://www.slideshare.net/jpetazzo/containerization-new-virtualization-
docker-separation-operational-concerns
Jérôme Petazzoni
definition
http://www.slideshare.net/jpetazzo/containerization-new-virtualization-
docker-separation-operational-concerns
Jérôme Petazzoni
definition
http://www.slideshare.net/jpetazzo/containerization-new-virtualization-
docker-separation-operational-concerns
Jérôme Petazzoni
definition
http://www.slideshare.net/jpetazzo/containerization-new-virtualization-
docker-separation-operational-concerns
Jérôme Petazzoni
definition
WHY immutable infra?
WHY immutable infra?
• Simplify change management

• hard to keep or restore “desired state” in-place
WHY immutable infra?
• Simplify change management

• hard to keep or restore “desired state” in-place
• Enforce dev/prod parity

• configure & test infra before deployed to
production environment
WHY immutable infra?
• Simplify change management

• hard to keep or restore “desired state” in-place
• Enforce dev/prod parity

• configure & test infra before deployed to
production environment
• Reason about apps at a higher level 

• … than just the deployable packages containing
the code (JAR/WAR/zip/MSI/whatever)
WHY NOT immutable infra?
WHY NOT immutable infra?
• Cost of “out of place” may be too high

• vs
WHY NOT immutable infra?
• Cost of “out of place” may be too high

• vs 

• DevOps maturity level

• Orchestration and

resource allocation

primitives

are required
Immutable infrastructure:觀念與實作 (建議)
#JCConf
#JCConf
#JCConf
#JCConf
Immutable infrastructure:觀念與實作 (建議)
Golden image

Phenix server
VM image
Golden image

Phenix server
VM image
Container image
Golden image

Phenix server
VM image
Container image
Unikernel image
Golden image

Phenix server
VM image
Container image

Unikernel image
• VM/IaaS provider specific

• VM/IaaS provider agnostic

• Ansible: https://github.com/ansible/ansible
• Packer: https://www.packer.io/

• Otto: https://ottoproject.io/
VM image

Container image
Unikernel image
• Docker ecosystem

• docker cli

• Docker Hub

• CI: Jenkins, Travis CI, CircleCI…

• Pre-Docker tools

• Packer: https://www.packer.io/
VM image

Container image

Unikernel image
VM
VM Docker
Docker
Container per VMDocker
Hyper: https://hyper.sh/
Container per VM
Hyper: https://hyper.sh/
Container per VM
Hyper: https://hyper.sh/
Unikernel
Boxfuse: https://boxfuse.com
Container per VM
Hyper: https://hyper.sh/
Unikernel
Boxfuse: https://boxfuse.com
Unikernels are constructed by
using “library operating
systems,” from which the
developer selects only the
minimal set of services
required for an application to
run.

These sealed, fixed-purpose
images run directly on a
hypervisor without an intervening
guest OS such as Linux.
Unikernel
Boxfuse: https://boxfuse.com
Container per VM
#JCConf
VM image

Container image

Unikernel image
new unikernel approach
VM image

Container image

Unikernel image
new unikernel approach
#JCConf
VM image

Container image

Unikernel image
VM image

Container image

Unikernel image
#JCConf
deployment
deployment
deployment
• Rolling upgrade

• Blue/green deployment

• Canary deployment
deployment
https://www.safaribooksonline.com/
library/view/continuous-delivery/
9780134389363/
deployment
• Cluster management

• Service discovery

• Orchestration
deployment
• Pets vs cattle
• Docker ecosystem is easier…

• Kubernetes

• Mesos

• …
#JCConf
DevOps
deployment
DevOps
deployment
VM image

Container image

Unikernel image
deployment
VM image

Container image

Unikernel image
DevOps
IT workflow automation
deployment
VM image

Container image

Unikernel image
DevOps
JCConf 2015,
Abola Lee
IT workflow automation
deployment
VM image

Container image

Unikernel image
DevOps
JCConf 2015,
Abola Lee
IT workflow automation
• Platform-specific tools

• AWS CodeDeploy

• Google Cloud Deployment Manager

• IBM BlueMix
deployment
VM image

Container image

Unikernel image
DevOps
JCConf 2015,
Abola Lee
IT workflow automation
• Platform-specific tools

• AWS CodeDeploy

• Google Cloud Deployment Manager

• IBM BlueMix
• Ansible
deployment
VM image

Container image

Unikernel image
DevOps
JCConf 2015,
Abola Lee
IT workflow automation
• Platform-specific tools

• AWS CodeDeploy

• Google Cloud Deployment Manager

• IBM BlueMix
• Ansible
• CI SaaS

• Travis CI, CircleCI, etc.
deployment
VM image

Container image

Unikernel image
DevOps
JCConf 2015,
Abola Lee
IT workflow automation
• Platform-specific tools

• AWS CodeDeploy

• Google Cloud Deployment Manager

• IBM BlueMix
• Ansible
• CI SaaS

• Travis CI, CircleCI, etc.
• Atlas (and others from HashiCorp)
Immutable infrastructure:觀念與實作 (建議)
Entropy
#JCConf
#JCConf
DNA
#JCConf
DNA
#JCConf
DNA

lysosomes
#JCConf
DNA

lysosomes
#JCConf
VM image

Container image

Unikernel image
#JCConf
VM image

Container image

Unikernel image
#JCConf
deployment
VM image

Container image

Unikernel image
#JCConf
deployment
VM image

Container image

Unikernel image
#JCConf
#JCConf


William Yeh
http://send.wtf/jcconf2015

More Related Content

PDF
JCConf 2015 Java Embedded and Raspberry Pi
PDF
Implementing your own Google App Engine
PDF
When Web meet Native App
PDF
Improve your Java Environment with Docker
PDF
手把手教你如何串接 Log 到各種網路服務
PDF
Apache Lucene for Java EE Developers
PPTX
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
PPTX
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
JCConf 2015 Java Embedded and Raspberry Pi
Implementing your own Google App Engine
When Web meet Native App
Improve your Java Environment with Docker
手把手教你如何串接 Log 到各種網路服務
Apache Lucene for Java EE Developers
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Seven Habits of Highly Effective Jenkins Users (2014 edition!)

What's hot (20)

PDF
Spring Boot 1.3 News #渋谷Java
PDF
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
PDF
Code Reviews vs. Pull Requests
PDF
Rise of the Machines - Automate your Development
PDF
At Your Service: Using Jenkins in Operations
PPTX
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
PPTX
How Docker simplifies CI/CD
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
PDF
Game of Codes: the Battle for CI
PDF
JUC Europe 2015: Scaling Your Jenkins Master with Docker
PDF
Automated acceptance test
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
PDF
Dockercon2015 bamboo
PDF
Let’s start Continuous Integration with jenkins
PDF
Master Continuous Delivery with CloudBees Jenkins Platform
PDF
Unleashing Docker with Pipelines in Bitbucket Cloud
ODP
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
PDF
今すぐ始めるCloud Foundry #hackt #hackt_k
PDF
Apache DeltaSpike the CDI toolbox
PDF
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
Spring Boot 1.3 News #渋谷Java
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Code Reviews vs. Pull Requests
Rise of the Machines - Automate your Development
At Your Service: Using Jenkins in Operations
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
How Docker simplifies CI/CD
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Game of Codes: the Battle for CI
JUC Europe 2015: Scaling Your Jenkins Master with Docker
Automated acceptance test
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Dockercon2015 bamboo
Let’s start Continuous Integration with jenkins
Master Continuous Delivery with CloudBees Jenkins Platform
Unleashing Docker with Pipelines in Bitbucket Cloud
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
今すぐ始めるCloud Foundry #hackt #hackt_k
Apache DeltaSpike the CDI toolbox
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
Ad

Viewers also liked (20)

PDF
Ansible 實戰:top down 觀點
PDF
瓶頸處理九大原則 (精簡版)
PDF
Docker 對傳統 DevOps 工具鏈的衝擊 (Docker's Impact on traditional DevOps toolchain)
PDF
Immutable infrastructure with Docker and containers (GlueCon 2015)
PDF
12 Factor App from Docker's Point of View
PDF
Ansible for Drupal infrastructure and deployments
PPTX
Knowledge from Noise
PDF
Monitoring 改造計畫:流程觀點
PDF
Introduction to Hivemall
PDF
有了 Agile,為什麼還要有 DevOps?
PDF
DevOps for Humans - Ansible for Drupal Deployment Victory!
PDF
Ansible Overview - System Administration and Maintenance
PPTX
Capacity Management and BigData/Hadoop - Hitchhiker's guide for the Capacity ...
PDF
Docker 導入:障礙與對策
PDF
從限制理論看 DevOps
PDF
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
PPTX
Streaming in the Wild with Apache Flink
PDF
Ansible loves Python, Python Philadelphia meetup
PDF
Fluentd - Flexible, Stable, Scalable
PDF
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Ansible 實戰:top down 觀點
瓶頸處理九大原則 (精簡版)
Docker 對傳統 DevOps 工具鏈的衝擊 (Docker's Impact on traditional DevOps toolchain)
Immutable infrastructure with Docker and containers (GlueCon 2015)
12 Factor App from Docker's Point of View
Ansible for Drupal infrastructure and deployments
Knowledge from Noise
Monitoring 改造計畫:流程觀點
Introduction to Hivemall
有了 Agile,為什麼還要有 DevOps?
DevOps for Humans - Ansible for Drupal Deployment Victory!
Ansible Overview - System Administration and Maintenance
Capacity Management and BigData/Hadoop - Hitchhiker's guide for the Capacity ...
Docker 導入:障礙與對策
從限制理論看 DevOps
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Streaming in the Wild with Apache Flink
Ansible loves Python, Python Philadelphia meetup
Fluentd - Flexible, Stable, Scalable
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Ad

Similar to Immutable infrastructure:觀念與實作 (建議) (20)

PPTX
Immutable infrastructure tsap_v2
PDF
Immutable Infrastructure & Rethinking Configuration - Interop 2019
PDF
SFScon19 - Marco Bizzantino - GitOps and Immutable Infrastructure
PDF
#SREcon Immutable Infrastructure: rethinking configuration mgmt
PDF
SRECon 18 Immutable Infrastructure
PPTX
Understand immutable infrastructure, what? Why? how? - devops d day Marseill...
PDF
Immutable Infrastructure: Rise of the Machine Images
PDF
Datacenter Computing with Apache Mesos - BigData DC
PPTX
Software Architectures, Week 5 - Advanced Architectures
PPTX
Immutability: from code to infrastructure, the way to scalability - Breizhca...
PDF
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
PPTX
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
PDF
Distributed Data processing in a Cloud
PPT
20120524 cern data centre evolution v2
PDF
Mesos at OpenTable
PPTX
Sanger, upcoming Openstack for Bio-informaticians
PPTX
Flexible compute
PPTX
2015 09 emc lsug
PDF
Austin agile conf 2012 infrastructure automation-gmiranda
PPT
Computing Outside The Box
Immutable infrastructure tsap_v2
Immutable Infrastructure & Rethinking Configuration - Interop 2019
SFScon19 - Marco Bizzantino - GitOps and Immutable Infrastructure
#SREcon Immutable Infrastructure: rethinking configuration mgmt
SRECon 18 Immutable Infrastructure
Understand immutable infrastructure, what? Why? how? - devops d day Marseill...
Immutable Infrastructure: Rise of the Machine Images
Datacenter Computing with Apache Mesos - BigData DC
Software Architectures, Week 5 - Advanced Architectures
Immutability: from code to infrastructure, the way to scalability - Breizhca...
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
Distributed Data processing in a Cloud
20120524 cern data centre evolution v2
Mesos at OpenTable
Sanger, upcoming Openstack for Bio-informaticians
Flexible compute
2015 09 emc lsug
Austin agile conf 2012 infrastructure automation-gmiranda
Computing Outside The Box

More from William Yeh (18)

PDF
敏捷轉型:目標管理工作坊
PDF
gRPC:更高效的微服務介面
PDF
給 RD 的 Kubernetes 初體驗 (EKS version)
PDF
賣 K8s 的人不敢告訴你的事 (Secrets that K8s vendors won't tell you)
PDF
給 RD 的 Kubernetes 初體驗 (GDG Cloud KH 2019-08 version)
PDF
Next ’19 的 Istio 場次 重點摘要
PDF
給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)
PDF
給 RD 的 Kubernetes 初體驗
PDF
當 .NET 遇到 Kubernetes (When .NET meets Kubernetes)
PDF
為了精準估算,你必須付出什麼代價?
PDF
從限制理論角度談敏捷導入階段 (Agile transition: a TOC perspective)
PDF
從系統思考看 DevOps:以 microservices 為例 (DevOps: a system dynamics perspective)
PDF
DevOps to Agile 敏捷轉型經驗  (From DevOps to Agile: Transformation Experience of G...
PDF
軟體雲端化的要素 (Elements of Cloud-Native Apps)
PDF
Whoscall 的 Realtime Monitoring 經驗分享
PDF
A gentle introduction to Ansible
PPT
On MongoDB backup
PPT
State machine 應用簡介(兼談 UML 2)
敏捷轉型:目標管理工作坊
gRPC:更高效的微服務介面
給 RD 的 Kubernetes 初體驗 (EKS version)
賣 K8s 的人不敢告訴你的事 (Secrets that K8s vendors won't tell you)
給 RD 的 Kubernetes 初體驗 (GDG Cloud KH 2019-08 version)
Next ’19 的 Istio 場次 重點摘要
給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)
給 RD 的 Kubernetes 初體驗
當 .NET 遇到 Kubernetes (When .NET meets Kubernetes)
為了精準估算,你必須付出什麼代價?
從限制理論角度談敏捷導入階段 (Agile transition: a TOC perspective)
從系統思考看 DevOps:以 microservices 為例 (DevOps: a system dynamics perspective)
DevOps to Agile 敏捷轉型經驗  (From DevOps to Agile: Transformation Experience of G...
軟體雲端化的要素 (Elements of Cloud-Native Apps)
Whoscall 的 Realtime Monitoring 經驗分享
A gentle introduction to Ansible
On MongoDB backup
State machine 應用簡介(兼談 UML 2)

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administration Chapter 2
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Digital Strategies for Manufacturing Companies
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Nekopoi APK 2025 free lastest update
PPTX
Introduction to Artificial Intelligence
PDF
Understanding Forklifts - TECH EHS Solution
L1 - Introduction to python Backend.pptx
CHAPTER 2 - PM Management and IT Context
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Wondershare Filmora 15 Crack With Activation Key [2025
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Digital Strategies for Manufacturing Companies
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Operating system designcfffgfgggggggvggggggggg
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Nekopoi APK 2025 free lastest update
Introduction to Artificial Intelligence
Understanding Forklifts - TECH EHS Solution

Immutable infrastructure:觀念與實作 (建議)