New IT culture: Docker & DevOps
Docker 和 Devops 所帶來的新 IT 文化
Terry Chen 陳彥村
Engineer @ QNAP
Google Trends
Docker Container DevOps
Google Trends
Docker Container DevOps
Who am I?
https://tw.linkedin.com/in/seterrychen
https://github.com/seterrychen
https://twitter.com/seterrychen
● Backend Engineer : Java, Python, Linux
● QNAP Container Station/Linux Station
● TrueTel Telecom Value-added services
QNAP( 威聯通 ) NAS
From:http://www.slideshare.net/QNAP_Inc/general-tech-trainingstorageabcqnap20140302compressed-copy
Network
QNAP( 威聯通 ) NAS
QNAP App Center
● Customize your QNAP NAS with Apps
What is Container?
● Operating-system-level virtualization
Hardware
Operating system
Container Container Container
What is Container?
Hardware
Linux
Container Container Container
Cgroups
Namespaces
● Operating-system-level virtualization
What is Container?
● Operating-system-level virtualization
● Cgroups
Initial release : 2007
kernel version : 2.6.24
● Namespaces
Initial release : 2002
kernel version : 2.4.19
What is Container?
● Operating-system-level virtualization
Hardware
Linux
Container Container Container
Docker/LXD
Docker
● Docker allows you to package an application
with all of its dependencies into a standardized
unit for software development.
Others
App
image
immutable
Container-1
Image
read only
Container-2
Container-3
Images center - Docker Hub
The power of Docker
From:https://yq.aliyun.com/articles/32071
Docker ecosystem
From:http://www.slideshare.net/GoAtlassian/getting-started-with-docker-nick-stinemates
Docker ecosystem
From:http://wikibon.com/docker-is-the-least-interesting-part-of-docker/
VM vs Container
From : https://www.docker.com/what-docker
Container OS
Infrastructure
Hypervisor
Docker
OS
Docker
OS
Docker
OS
Docker
OS
Docker & Unikernel
From:https://blog.docker.com/2016/01/unikernel/
Unikernel
From:http://www.slideshare.net/Proto204/prsentation-dunikernel
Unikernel
Hardware
OS kernel
Runtime & Libraries
Application binary
Application configuration
Hardware
Unikernel App
Hypervisor Hypervisor
Agile
From : https://techmvp.net/2014/07/04/agile-pe/
Dev VS Ops
From:http://dev2ops.org/2010/02/what-is-devops/
Dev VS Ops
From:https://dzone.com/articles/role-developers-devops-culture
DevOps
From : 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
http://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr
DevOps
From : 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
http://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr
Create Dev/Prod Environment
From:http://qtmoko.org/2015/12/26/everything-you-need-to-know-about-bare-metal-servers/
Docs: about how to
setup the environment
How to recreate the environment?
Docs: about how to
setup the environment
From:http://www.tayloreason.com/corkscrew/archives/finding-your-perfect-match-online-wine-clubs-retailers-and-winery-websites/attachment/typing-on-computer/
From:https://commons.wikimedia.org/wiki/File:Gorilla-server.svg
How to recreate the environment?
In DevOps
● Configuration management: describe infrastructure
as code
From:https://www.getfilecloud.com/blog/2014/08/top-8-configuration-management-tools-for-sys-admins/#.VzM7bqNcSko
How to recreate the environment?
In DevOps
● Configuration management: describe infrastructure
as code
- hosts: dev_host
tasks:
- name: Install packages which are absent
apt: name={{ item }} state=present update_cache=yes
with_items:
- vim
- curl
- git
- docker-engine
become: yes
How to recreate the environment?
In DevOps
● Configuration management: describe infrastructure
as code
- hosts: dev_host
tasks:
- name: Install packages which are absent
apt: name={{ item }} state=present update_cache=yes
with_items:
- vim
- curl
- git
- docker-engine
become: yes
How to recreate the environment?
In DevOps with Docker
● Just install Docker and pull image to create the
environment
- hosts: dev_host
tasks:
- name: Install packages which are absent
apt: name=docker-engine state=present update_cache=yes
become: yes
- name: Pull Docker image
docker:
name: myapplication
image: someuser/appimage
state: reloaded
pull: always
How to upgrade/patch the environment?
Openssl Heartbleed
How to upgrade/patch the environment?
ssh
How to upgrade/patch the environment?
In DevOps
$ ansible -i hosts all -u root -m apt -a 
“name=openssl state=latest update_cache=yes”
How to upgrade/patch the environment?
In DevOps with Docker
● Using new image to create the new environment
image
Container
New image
Container
Continuous Integration(CI)
Developers
Commit & push Version control
systems
CI tools
Trigger
Checkout
Compile
Test
Archive
Continuous Integration(CI)
Developers
Commit & push Version control
systems
CI tools
Trigger
Checkout
Compile
Test
Archive
Continuous Integration(CI)
Continuous Integration(CI)
Compile with Docker
C++ toolchain
Container
Python 2.7
Package & Lib
Container
Python 3.5
Package & Lib
Container
Go 1.5.4
Go dependency
Container
Go 1.6.2
Go dependency
Container
Ruby 2.3.1
Ruby Gem
Container
Continuous Integration(CI)
Testing with Docker
From:http://www.seleniumhq.org/projects/remote-control/
IM Robot
Container Station Environment
- hosts: dev_host
tasks:
- name: Install packages which are absent
apt: name={{ item }} state=present update_cache=yes
with_items:
- vim
- curl
- git
- docker-engine
become: yes
Infrastructure change
GitLab
Commit & push
Jenkins
Polling
Build
Output
Vagrant box
Container Station Environment
Developers
$ vagrant init url/container-station
$ vagrant up
$ vagrant ssh
DevOps Cycle
From:http://www.slideshare.net/warfan/devops-53161280
Conclusion
Conclusion
Docker and DevOps --- new IT culture

Docker and DevOps --- new IT culture