docker and devops --- new it culture

49

Click here to load reader

Upload: terry-chen

Post on 15-Feb-2017

243 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Docker and DevOps --- new IT culture

New IT culture: Docker & DevOpsDocker和 Devops所帶來的新 IT文化

Terry Chen 陳彥村

Engineer @ QNAP

Page 2: Docker and DevOps --- new IT culture

Google Trends

Docker Container DevOps

Page 3: Docker and DevOps --- new IT culture

Google Trends

Docker Container DevOps

Page 4: Docker and DevOps --- new IT culture

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

Page 5: Docker and DevOps --- new IT culture

QNAP( 威聯通 ) NAS

From:http://www.slideshare.net/QNAP_Inc/general-tech-trainingstorageabcqnap20140302compressed-copy

Network

Page 6: Docker and DevOps --- new IT culture

QNAP( 威聯通 ) NAS

Page 7: Docker and DevOps --- new IT culture

QNAP App Center

● Customize your QNAP NAS with Apps

Page 8: Docker and DevOps --- new IT culture

What is Container?

● Operating-system-level virtualization

Hardware

Operating system

Container Container Container

Page 9: Docker and DevOps --- new IT culture

What is Container?

Hardware

Linux

Container Container Container

Cgroups

Namespaces

● Operating-system-level virtualization

Page 10: Docker and DevOps --- new IT culture

What is Container?

● Operating-system-level virtualization● Cgroups

Initial release : 2007 kernel version : 2.6.24

● NamespacesInitial release : 2002kernel version : 2.4.19

Page 11: Docker and DevOps --- new IT culture

What is Container?● Operating-system-level virtualization

Hardware

Linux

Container Container Container

Docker/LXD

Page 12: Docker and DevOps --- new IT culture

Docker

● Docker allows you to package an applicationwith all of its dependencies into a standardizedunit for software development.

OthersApp

image

Page 13: Docker and DevOps --- new IT culture

immutable

Container-1

Imageread only

Container-2

Container-3

Page 14: Docker and DevOps --- new IT culture

Images center - Docker Hub

Page 15: Docker and DevOps --- new IT culture

The power of Docker

From:https://yq.aliyun.com/articles/32071

Page 16: Docker and DevOps --- new IT culture

Docker ecosystem

From:http://www.slideshare.net/GoAtlassian/getting-started-with-docker-nick-stinemates

Page 17: Docker and DevOps --- new IT culture

Docker ecosystem

From:http://wikibon.com/docker-is-the-least-interesting-part-of-docker/

Page 18: Docker and DevOps --- new IT culture

VM vs Container

From : https://www.docker.com/what-docker

Page 19: Docker and DevOps --- new IT culture

Container OS

Infrastructure

Hypervisor

Docker

OS

Docker

OS

Docker

OS

Docker

OS

Page 20: Docker and DevOps --- new IT culture

Docker & Unikernel

From:https://blog.docker.com/2016/01/unikernel/

Page 21: Docker and DevOps --- new IT culture

Unikernel

From:http://www.slideshare.net/Proto204/prsentation-dunikernel

Page 22: Docker and DevOps --- new IT culture

Unikernel

Hardware

OS kernel

Runtime & Libraries

Application binary

Application configuration

Hardware

Unikernel App

Hypervisor Hypervisor

Page 23: Docker and DevOps --- new IT culture

Agile

From : https://techmvp.net/2014/07/04/agile-pe/

Page 24: Docker and DevOps --- new IT culture

Dev VS Ops

From:http://dev2ops.org/2010/02/what-is-devops/

Page 25: Docker and DevOps --- new IT culture

Dev VS Ops

From:https://dzone.com/articles/role-developers-devops-culture

Page 26: Docker and DevOps --- new IT culture

DevOps

From : 10+ Deploys Per Day: Dev and Ops Cooperation at Flickrhttp://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr

Page 27: Docker and DevOps --- new IT culture

DevOps

From : 10+ Deploys Per Day: Dev and Ops Cooperation at Flickrhttp://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr

Page 28: Docker and DevOps --- new IT culture

Create Dev/Prod Environment

From:http://qtmoko.org/2015/12/26/everything-you-need-to-know-about-bare-metal-servers/

Docs: about how tosetup the environment

Page 29: Docker and DevOps --- new IT culture

How to recreate the environment?

Docs: about how tosetup 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

Page 30: Docker and DevOps --- new IT culture

How to recreate the environment?In DevOps

● Configuration management: describe infrastructureas code

From:https://www.getfilecloud.com/blog/2014/08/top-8-configuration-management-tools-for-sys-admins/#.VzM7bqNcSko

Page 31: Docker and DevOps --- new IT culture

How to recreate the environment?In DevOps

● Configuration management: describe infrastructureas 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

Page 32: Docker and DevOps --- new IT culture

How to recreate the environment?In DevOps

● Configuration management: describe infrastructureas 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

Page 33: Docker and DevOps --- new IT culture

How to recreate the environment?In DevOps with Docker

● Just install Docker and pull image to create theenvironment

- 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

Page 34: Docker and DevOps --- new IT culture

How to upgrade/patch the environment?

Openssl Heartbleed

Page 35: Docker and DevOps --- new IT culture

How to upgrade/patch the environment?

ssh

Page 36: Docker and DevOps --- new IT culture

How to upgrade/patch the environment?In DevOps

$ ansible -i hosts all -u root -m apt -a \“name=openssl state=latest update_cache=yes”

Page 37: Docker and DevOps --- new IT culture

How to upgrade/patch the environment?In DevOps with Docker

● Using new image to create the new environment

image

Container

New image

Container

Page 38: Docker and DevOps --- new IT culture

Continuous Integration(CI)

Developers

Commit & push Version control systems

CI tools

Trigger

Checkout

Compile

Test

Archive

Page 39: Docker and DevOps --- new IT culture

Continuous Integration(CI)

Developers

Commit & push Version control systems

CI tools

Trigger

Checkout

Compile

Test

Archive

Page 40: Docker and DevOps --- new IT culture

Continuous Integration(CI)

Page 41: Docker and DevOps --- new IT culture

Continuous Integration(CI)Compile with Docker

C++ toolchainContainer

Python 2.7Package & Lib

Container

Python 3.5Package & Lib

Container

Go 1.5.4Go dependency

Container

Go 1.6.2Go dependency

Container

Ruby 2.3.1Ruby GemContainer

Page 42: Docker and DevOps --- new IT culture

Continuous Integration(CI)Testing with Docker

From:http://www.seleniumhq.org/projects/remote-control/

Page 43: Docker and DevOps --- new IT culture

IM Robot

Page 44: Docker and DevOps --- new IT culture

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 changeGitLab

Commit & push

Jenkins

Polling

Build

Output

Vagrant box

Page 45: Docker and DevOps --- new IT culture

Container Station Environment

Developers

$ vagrant init url/container-station$ vagrant up$ vagrant ssh

Page 46: Docker and DevOps --- new IT culture

DevOps Cycle

From:http://www.slideshare.net/warfan/devops-53161280

Page 47: Docker and DevOps --- new IT culture

Conclusion

Page 48: Docker and DevOps --- new IT culture

Conclusion

Page 49: Docker and DevOps --- new IT culture