SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Docker
@tianweidut
2016.7.9
•
• DAE-Docker
•
Agenda
Docker
• DAE App
• App docker image
• DAE Python2.7, Python3, Golang
• online/qaci/sandbox/prelease/dev
• container
• Docker
• 2014 Q4: DAE Docker App
• 2015 Q1: App
• 2015 Q2: App Docker
• 2015 Q4: QACI/Prelease Docker
• 2016.06 - : Mesos + Marathon
(1)
• (400+ APP)
• web, service(pidl/thrift)
• DAE App cron, daemon, mq worker, remoteshell, app-admin
• QACI container docker image
• Prelease/Sandbox container docker image
• Docker pidlproxy, dpark, scribe-sink, syslog-ng, thrift-router, dnasmasq ...
(2)
•
• 100 200-400 docker image build
• container 370
• 400+
• 7500 +
• Prelease/Sandbox 200+
Douban App Engine For Docker
• container web service container
container
• container
• Image DAE
• Dev QACI Prelease Sandbox Online
DAE
• PaaS Python Golang 400+ App
• Web, PIDL Service, Thrift Service, Cron, Daemon, MQ, Runscript, Admin, Dpark, QACI, Prelease, Sandbox...
App
MySQL, Beansdb, Memcahce, MQ, MFS, CDN, Redis...
Proj
A
Proj
B
Proj
C
$ dae create
$ dae serve
$ dae test
$ dae deploy
App Auto Scale Load Balancer
Node Balance Elastic Pool
Prelease Sandbox Profile
DAE-Docker
Cron
MQ Worker
DaemonDaemonDaemon
DaemonMQ Worker
M
S
S zookeeper
Mesos Marathon+
MQ: Beanstalkd
New!
Gunicorn:
web._admin
websocket- runscript
- remoteshell
- dbshell
online
offline
http(s)
LVS
Nginx(lb)
Nginx
Gateway
douban
service
thrift
dae_thrift_
router
pidl
pidlproxy-
client
pidlproxy-
server
Router
Layer
unix domain socket
Node
Gate
Docker Container
Gunicorn- sync/async
- multi-instances
- master-worker
puppet:conf
mfs:permdir
volume
monitor/sa
agent
bridge/host
App
Node
DAE API (python/golang)
Auto Scale Distributed Trace Orchestration
waylifebeansdb/mysql/mc/mq/redis/graphite...
Bridge/Deploy Logs
Resource
Layer
dev
Vagrant
Container
DAE-SDK
Docker Compose
Container
App-Test
Jenkins
mysql
redis mc
scribe beansdb
Prelease
Sandbox
Golang
Gevent daes
DAE CI/CD
Github/Code
pull request
merged
review
test + pylint
prelease/sandbox
Make Archive Image Build Image Push
App Node1
App Node2
App NodeN
docker pull
Build Static
Jenkins:QACI
app.yaml chk
hook trigger
deploy
Auto Stage0 Stage Deploy Deploy
Rolling Update cfg update container restart selftest
Image Cached
Rollback
No
Yes
update conf irc/slack/email notify end
Regi
stry
Docker
1. : CentOS 6.5 vs Gentoo
• Centos 6.5 (2014.9)
• Docker ( Gentoo)
• Docker 1.2 Ubuntu/Centos
• CentOS6.5 Gentoo
• CentOS 6.5, Linux 2.6 -> Docker Daemon crash, Kernal Panic
• DAE / -> Gentoo binpkg CentOS RPM
• CentOS 2.6 Python 2.6 -> Python2.7 hack link
• Gentoo
• Gentoo Linux kernel 3.18.10(overlayfs merged)
2. Docker (1)
• Docker 1.2.0 / 1.3.2 : ->
• Docker 1.4.1: production ready
• zombie container (container 1 docker daemon container
docker run container name DAE container
)
• zombie container -> kill docker run process -> rename linkgraphdb ->
cleanup container files
2. Docker (2)
• Docker 1.5.0 DAE
• : push/pull Docker Registry V1
• image pre-build pre-pull (
)
• Docker 1.7.0: Docker
• : docker daemon docker daemon 7-8G container
• + docker daemon
2. Docker (3)
• Docker 1.8.1 6
• 1 : container /etc/hosts net=host container /etc/hosts
/etc/hosts container
• container /etc/hosts container hosts /var/
lib/container/${cid}/hosts `mount --bind` container namespace
net=host :
• volume /var/run/nscd lookup cache
• /var/lib/docker/${cid}/hosts inode
container
2. Docker (4)
• Docker 1.8.1 6
• 2 : volume-from data container data container volume
container app
• data container ready
• 3: docker registry v2 push image buffering disk,
image partent image id
• Docker 1.10.1
• : `Removal In Progress` container container name
• docker rename
• Docker 1.10.3 + docker registry v2 (2016.2 )
push/pull
3. Docker Registry v2
• distribution: docker >1.10 push/pull
•
• docker.douban : build push
• dev.docker.douban :
• distribution api, DAE app
Image
• nginx upstream round robin push
image `digest invalid: provided digest did not
match uploaded content` mfs
layer size
• nginx ip_hash
• distribution sentry
load balancer
distribution distribution distribution
mossefs: Imageredis:cache
4. Docker (1): dm vs overlay
• DeviceMapper
• 2014.09 ~ 2015.06
•
• build image 400+ App 100 build 200-400
build
•
• 1. docker daemon : ` --storage-opt dm.blkdiscard=false --storage-opt
dm.mountopt=nodiscard` --> kernel crash rm image pool
• 2. /var/lib/docker/devicemapper/data `direct-lvm` -> image
build 180s -> 120s
4. Docker (2): dm vs overlay
• ref: http://developerblog.redhat.com/2014/09/30/overview-storage-scalability-docker/
4. Docker (3): dm vs overlay
• Overlay
• 2015.06 - overlay2
•
• 1. AUFS Linux upstream AUFS
• 2. Overlay AUFS Linux 3.18 COW
docker image
•
• /var/lib/docker/overlay lvm Ext4
• build 180s -> 120s -> 100s
4. Docker (4): dm vs overlay
• Overlay
• inode ; build image , `too many links` --> docker 1.12
+ kernel 4.0 + overlay2
•
• 1. base image hard link kernal links
• 2. linux ext4: `#define EXT4_LINK_MAX 65000`
• docker overlay
overlay container
- low-id: image id
- uppper: container
- work: overlay
- merged: container , mount-bind
image
overlay image
- image
- Linux 7 copy
regular file hard link.
5. DAE-Docker Image (1)
5. DAE-Docker Image (2)
• DAE-Python App
• sys-req.txt: gentoo binpkg
• pip-req.txt : python pip requirements
sys-req.txt
pip-req.txt
6. Docker Build (1)
• 400+ App 100 build image 200-400 build
•
• 1. App Image 4GB+, app 180s , `maintainers:
xxx@douban.com` 40s
• 2. Dockerfile layer, merge RUN: 180s -> 40s
• 3. Dockerfile Docker container run + commit : 40s -> 8s
6. Docker Build (2)
• 95% layer diff
layer diff docker build
Gentoo Image portage + runtime
portage
emerge binpkg, python app
run-build Dockerfile volume Docker run + volume + commit Image
: 40s -> 8s Image : 4.0GB -> 1.7GB
6. Docker Build (3)
•
• 1. gentoo_with_portage portage docker
container
• 2. dockerfile docker run + commit docker build docker run volume
gentoo_with_portage container container portage emerge
binpkg
•
• 1. Image
• 2. gentoo_with_portage container
• 3. Dockerfile
• 4. volume-from container `mount --bind` container
gentoo_with_portage volume list
- /usr/portage/
- /etc/portage/
- /var/lib/layman/
- /var/cache/edb/
- /usr/libexec/gcc/
- /usr/share/include/
- /usr/x86_64-pc-linux-gnu/
- /lib64/modules/
- /lib64/firmware/
- /usr/lib64/gcc/x86_64-pc-linux-gnu/
7.
• :
•
• 1. puppet
• 2. ossetup app image /var/dae/app/xxx/
• 3. volume container
• - volume inode container
8. moosefs fuse (1)
• : DAE app permdir mfs( fuse )
mfs volume container mfs-
mount ( mfs master ) container mfs
`Transport endpoint is not connected` container
•
• 1. docker volume mfs inode 1
mfsmount mfs /proc/self/mountinfo
container /etc/self/mountinfo
8. moosefs fuse (2)
•
• 2. docker volume linux `mount --bind `
• 3. Linux shared subtrees mount namespace mount umount
•
• 1. /fuse mount point : `mount --bind /fuse
/fuse`
• 2. /fuse mount mode shared mount `mount --make-shared /fuse`
• 3. mfs mount /fuse/mfs
• 4. container `-v /fuse:/fuse:shared` , shared /fuse mount
namespace container mount namespace mount/umount , mfsmount
container
9. container
• : cadvisor(
) -> dae-monitor-agent
•
• 1. docker ps/inspect/exec container
docker dameon
docker daemon
• 2. docker api
• cgroups: cpu/mem/network/blkio
• docker container
• /var/lib/docker/container/${cid}/hostconfig.json
• /var/run/docker/*/${cid}/state.json
daemon-agent container-agent oom-agent
monitor data upload
redis mc
graphite
DAE Monitor Aggregator
API Icinga2
sentry
email
- version/info
- daemon process
- image storage
- dm cpu/mem
- mem/cpu/blkio
- network
- image version
- fuse mount
dae-monitor-agent
10. container log
• DAE Python:
• monkey patch: logger handler stdout/stderr -> ScribeHandler , container log-
driver=none
• , DAE-go
• container syslog-driver + syslog-ng + scribe/mfs
app-container
--log-driver=syslog
--log-opt syslog-address=tcp://127.0.0.1:9614
--log-opt tag=‘scribe@dae_applog/container’
--log-opt tag='/fuse/dfs/permdirs/daegrade/test.log'
syslog-ng-container
- 9614 syslog-ng
- tag `scribe@` python
scribe mod for syslog-ng, log
scribe-buffer
- tag `/fuse` log mfs
mfs
scribe-buffer
scribe-sink
11. maintainance
• image container(exited/stopped/dead)
• image docker rmi -v -v volume-from
• docker daemon `-H 0.0.0.0:4243` tls
• Docker Daemon daemontools supervisor docker daemon
• docker daemon
Docker在豆瓣的实践 刘天伟-20160709

Weitere ähnliche Inhalte

Was ist angesagt?

파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionPatrick Chanezon
 
On demand-block-storage-for-docker
On demand-block-storage-for-dockerOn demand-block-storage-for-docker
On demand-block-storage-for-dockerJangseon Ryu
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
NAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for ContainerNAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for ContainerJangseon Ryu
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Patrick Chanezon
 
cephfs with openstack manila based on bluestore and erasure code
cephfs with openstack manila based on bluestore and erasure codecephfs with openstack manila based on bluestore and erasure code
cephfs with openstack manila based on bluestore and erasure codeJangseon Ryu
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Docker, Inc.
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersBen Hall
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackBoden Russell
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on DockerBen Hall
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesSujay Pillai
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureJérôme Petazzoni
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystempsconnolly
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Introduction to docker security
Introduction to docker securityIntroduction to docker security
Introduction to docker securityWalid Ashraf
 

Was ist angesagt? (20)

파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to Production
 
On demand-block-storage-for-docker
On demand-block-storage-for-dockerOn demand-block-storage-for-docker
On demand-block-storage-for-docker
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
 
NAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for ContainerNAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for Container
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
cephfs with openstack manila based on bluestore and erasure code
cephfs with openstack manila based on bluestore and erasure codecephfs with openstack manila based on bluestore and erasure code
cephfs with openstack manila based on bluestore and erasure code
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content Services
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Introduction to docker security
Introduction to docker securityIntroduction to docker security
Introduction to docker security
 

Andere mochten auch

Презентация
ПрезентацияПрезентация
Презентацияdyingskull
 
Mr&ueh数据库方面
Mr&ueh数据库方面Mr&ueh数据库方面
Mr&ueh数据库方面Tianwei Liu
 
4 高阳 淘宝主站cgroup资源控制实践
4 高阳 淘宝主站cgroup资源控制实践4 高阳 淘宝主站cgroup资源控制实践
4 高阳 淘宝主站cgroup资源控制实践drewz lin
 
Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearydrewz lin
 
SXSW 2016 takeaways
SXSW 2016 takeawaysSXSW 2016 takeaways
SXSW 2016 takeawaysHavas
 

Andere mochten auch (6)

Презентация
ПрезентацияПрезентация
Презентация
 
Mr&ueh数据库方面
Mr&ueh数据库方面Mr&ueh数据库方面
Mr&ueh数据库方面
 
4 高阳 淘宝主站cgroup资源控制实践
4 高阳 淘宝主站cgroup资源控制实践4 高阳 淘宝主站cgroup资源控制实践
4 高阳 淘宝主站cgroup资源控制实践
 
Mr
MrMr
Mr
 
Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-keary
 
SXSW 2016 takeaways
SXSW 2016 takeawaysSXSW 2016 takeaways
SXSW 2016 takeaways
 

Ähnlich wie Docker在豆瓣的实践 刘天伟-20160709

Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Patrick Chanezon
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介Takehiko Amano
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and DockerDavid Currie
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on dockerWatcharin Yang-Ngam
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM France Lab
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introductionJason Hu
 
Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmMario IC
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPivotalOpenSourceHub
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Bo-Yi Wu
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Dockernklmish
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 

Ähnlich wie Docker在豆瓣的实践 刘天伟-20160709 (20)

Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Dockerを使おう
Dockerを使おうDockerを使おう
Dockerを使おう
 
もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on docker
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
 
Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker Swarm
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh Shah
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 

Mehr von Tianwei Liu

2021 ee大会-旷视ai产品背后的研发效能工具建设
2021 ee大会-旷视ai产品背后的研发效能工具建设2021 ee大会-旷视ai产品背后的研发效能工具建设
2021 ee大会-旷视ai产品背后的研发效能工具建设Tianwei Liu
 
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟Tianwei Liu
 
豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017Tianwei Liu
 
DAE 新变化介绍
DAE 新变化介绍DAE 新变化介绍
DAE 新变化介绍Tianwei Liu
 
Kmeans in-hadoop
Kmeans in-hadoopKmeans in-hadoop
Kmeans in-hadoopTianwei Liu
 
Hadoop introduction 2
Hadoop introduction 2Hadoop introduction 2
Hadoop introduction 2Tianwei Liu
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionTianwei Liu
 

Mehr von Tianwei Liu (8)

2021 ee大会-旷视ai产品背后的研发效能工具建设
2021 ee大会-旷视ai产品背后的研发效能工具建设2021 ee大会-旷视ai产品背后的研发效能工具建设
2021 ee大会-旷视ai产品背后的研发效能工具建设
 
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟
 
豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017
 
DAE 新变化介绍
DAE 新变化介绍DAE 新变化介绍
DAE 新变化介绍
 
Kmeans in-hadoop
Kmeans in-hadoopKmeans in-hadoop
Kmeans in-hadoop
 
Hadoop introduction 2
Hadoop introduction 2Hadoop introduction 2
Hadoop introduction 2
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
Ueh
UehUeh
Ueh
 

Kürzlich hochgeladen

UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

Docker在豆瓣的实践 刘天伟-20160709

  • 3. Docker • DAE App • App docker image • DAE Python2.7, Python3, Golang • online/qaci/sandbox/prelease/dev • container • Docker
  • 4. • 2014 Q4: DAE Docker App • 2015 Q1: App • 2015 Q2: App Docker • 2015 Q4: QACI/Prelease Docker • 2016.06 - : Mesos + Marathon
  • 5. (1) • (400+ APP) • web, service(pidl/thrift) • DAE App cron, daemon, mq worker, remoteshell, app-admin • QACI container docker image • Prelease/Sandbox container docker image • Docker pidlproxy, dpark, scribe-sink, syslog-ng, thrift-router, dnasmasq ...
  • 6. (2) • • 100 200-400 docker image build • container 370 • 400+ • 7500 + • Prelease/Sandbox 200+
  • 7. Douban App Engine For Docker
  • 8. • container web service container container • container • Image DAE • Dev QACI Prelease Sandbox Online
  • 9. DAE • PaaS Python Golang 400+ App • Web, PIDL Service, Thrift Service, Cron, Daemon, MQ, Runscript, Admin, Dpark, QACI, Prelease, Sandbox... App MySQL, Beansdb, Memcahce, MQ, MFS, CDN, Redis... Proj A Proj B Proj C $ dae create $ dae serve $ dae test $ dae deploy App Auto Scale Load Balancer Node Balance Elastic Pool Prelease Sandbox Profile
  • 10. DAE-Docker Cron MQ Worker DaemonDaemonDaemon DaemonMQ Worker M S S zookeeper Mesos Marathon+ MQ: Beanstalkd New! Gunicorn: web._admin websocket- runscript - remoteshell - dbshell online offline http(s) LVS Nginx(lb) Nginx Gateway douban service thrift dae_thrift_ router pidl pidlproxy- client pidlproxy- server Router Layer unix domain socket Node Gate Docker Container Gunicorn- sync/async - multi-instances - master-worker puppet:conf mfs:permdir volume monitor/sa agent bridge/host App Node DAE API (python/golang) Auto Scale Distributed Trace Orchestration waylifebeansdb/mysql/mc/mq/redis/graphite... Bridge/Deploy Logs Resource Layer dev Vagrant Container DAE-SDK Docker Compose Container App-Test Jenkins mysql redis mc scribe beansdb Prelease Sandbox Golang Gevent daes
  • 11. DAE CI/CD Github/Code pull request merged review test + pylint prelease/sandbox Make Archive Image Build Image Push App Node1 App Node2 App NodeN docker pull Build Static Jenkins:QACI app.yaml chk hook trigger deploy Auto Stage0 Stage Deploy Deploy Rolling Update cfg update container restart selftest Image Cached Rollback No Yes update conf irc/slack/email notify end Regi stry
  • 13. 1. : CentOS 6.5 vs Gentoo • Centos 6.5 (2014.9) • Docker ( Gentoo) • Docker 1.2 Ubuntu/Centos • CentOS6.5 Gentoo • CentOS 6.5, Linux 2.6 -> Docker Daemon crash, Kernal Panic • DAE / -> Gentoo binpkg CentOS RPM • CentOS 2.6 Python 2.6 -> Python2.7 hack link • Gentoo • Gentoo Linux kernel 3.18.10(overlayfs merged)
  • 14. 2. Docker (1) • Docker 1.2.0 / 1.3.2 : -> • Docker 1.4.1: production ready • zombie container (container 1 docker daemon container docker run container name DAE container ) • zombie container -> kill docker run process -> rename linkgraphdb -> cleanup container files
  • 15. 2. Docker (2) • Docker 1.5.0 DAE • : push/pull Docker Registry V1 • image pre-build pre-pull ( ) • Docker 1.7.0: Docker • : docker daemon docker daemon 7-8G container • + docker daemon
  • 16. 2. Docker (3) • Docker 1.8.1 6 • 1 : container /etc/hosts net=host container /etc/hosts /etc/hosts container • container /etc/hosts container hosts /var/ lib/container/${cid}/hosts `mount --bind` container namespace net=host : • volume /var/run/nscd lookup cache • /var/lib/docker/${cid}/hosts inode container
  • 17. 2. Docker (4) • Docker 1.8.1 6 • 2 : volume-from data container data container volume container app • data container ready • 3: docker registry v2 push image buffering disk, image partent image id • Docker 1.10.1 • : `Removal In Progress` container container name • docker rename • Docker 1.10.3 + docker registry v2 (2016.2 ) push/pull
  • 18. 3. Docker Registry v2 • distribution: docker >1.10 push/pull • • docker.douban : build push • dev.docker.douban : • distribution api, DAE app Image • nginx upstream round robin push image `digest invalid: provided digest did not match uploaded content` mfs layer size • nginx ip_hash • distribution sentry load balancer distribution distribution distribution mossefs: Imageredis:cache
  • 19. 4. Docker (1): dm vs overlay • DeviceMapper • 2014.09 ~ 2015.06 • • build image 400+ App 100 build 200-400 build • • 1. docker daemon : ` --storage-opt dm.blkdiscard=false --storage-opt dm.mountopt=nodiscard` --> kernel crash rm image pool • 2. /var/lib/docker/devicemapper/data `direct-lvm` -> image build 180s -> 120s
  • 20. 4. Docker (2): dm vs overlay • ref: http://developerblog.redhat.com/2014/09/30/overview-storage-scalability-docker/
  • 21. 4. Docker (3): dm vs overlay • Overlay • 2015.06 - overlay2 • • 1. AUFS Linux upstream AUFS • 2. Overlay AUFS Linux 3.18 COW docker image • • /var/lib/docker/overlay lvm Ext4 • build 180s -> 120s -> 100s
  • 22. 4. Docker (4): dm vs overlay • Overlay • inode ; build image , `too many links` --> docker 1.12 + kernel 4.0 + overlay2 • • 1. base image hard link kernal links • 2. linux ext4: `#define EXT4_LINK_MAX 65000` • docker overlay overlay container - low-id: image id - uppper: container - work: overlay - merged: container , mount-bind image overlay image - image - Linux 7 copy regular file hard link.
  • 24. 5. DAE-Docker Image (2) • DAE-Python App • sys-req.txt: gentoo binpkg • pip-req.txt : python pip requirements sys-req.txt pip-req.txt
  • 25. 6. Docker Build (1) • 400+ App 100 build image 200-400 build • • 1. App Image 4GB+, app 180s , `maintainers: xxx@douban.com` 40s • 2. Dockerfile layer, merge RUN: 180s -> 40s • 3. Dockerfile Docker container run + commit : 40s -> 8s
  • 26. 6. Docker Build (2) • 95% layer diff layer diff docker build Gentoo Image portage + runtime portage emerge binpkg, python app run-build Dockerfile volume Docker run + volume + commit Image : 40s -> 8s Image : 4.0GB -> 1.7GB
  • 27. 6. Docker Build (3) • • 1. gentoo_with_portage portage docker container • 2. dockerfile docker run + commit docker build docker run volume gentoo_with_portage container container portage emerge binpkg • • 1. Image • 2. gentoo_with_portage container • 3. Dockerfile • 4. volume-from container `mount --bind` container gentoo_with_portage volume list - /usr/portage/ - /etc/portage/ - /var/lib/layman/ - /var/cache/edb/ - /usr/libexec/gcc/ - /usr/share/include/ - /usr/x86_64-pc-linux-gnu/ - /lib64/modules/ - /lib64/firmware/ - /usr/lib64/gcc/x86_64-pc-linux-gnu/
  • 28. 7. • : • • 1. puppet • 2. ossetup app image /var/dae/app/xxx/ • 3. volume container • - volume inode container
  • 29. 8. moosefs fuse (1) • : DAE app permdir mfs( fuse ) mfs volume container mfs- mount ( mfs master ) container mfs `Transport endpoint is not connected` container • • 1. docker volume mfs inode 1 mfsmount mfs /proc/self/mountinfo container /etc/self/mountinfo
  • 30. 8. moosefs fuse (2) • • 2. docker volume linux `mount --bind ` • 3. Linux shared subtrees mount namespace mount umount • • 1. /fuse mount point : `mount --bind /fuse /fuse` • 2. /fuse mount mode shared mount `mount --make-shared /fuse` • 3. mfs mount /fuse/mfs • 4. container `-v /fuse:/fuse:shared` , shared /fuse mount namespace container mount namespace mount/umount , mfsmount container
  • 31. 9. container • : cadvisor( ) -> dae-monitor-agent • • 1. docker ps/inspect/exec container docker dameon docker daemon • 2. docker api • cgroups: cpu/mem/network/blkio • docker container • /var/lib/docker/container/${cid}/hostconfig.json • /var/run/docker/*/${cid}/state.json daemon-agent container-agent oom-agent monitor data upload redis mc graphite DAE Monitor Aggregator API Icinga2 sentry email - version/info - daemon process - image storage - dm cpu/mem - mem/cpu/blkio - network - image version - fuse mount dae-monitor-agent
  • 32. 10. container log • DAE Python: • monkey patch: logger handler stdout/stderr -> ScribeHandler , container log- driver=none • , DAE-go • container syslog-driver + syslog-ng + scribe/mfs app-container --log-driver=syslog --log-opt syslog-address=tcp://127.0.0.1:9614 --log-opt tag=‘scribe@dae_applog/container’ --log-opt tag='/fuse/dfs/permdirs/daegrade/test.log' syslog-ng-container - 9614 syslog-ng - tag `scribe@` python scribe mod for syslog-ng, log scribe-buffer - tag `/fuse` log mfs mfs scribe-buffer scribe-sink
  • 33. 11. maintainance • image container(exited/stopped/dead) • image docker rmi -v -v volume-from • docker daemon `-H 0.0.0.0:4243` tls • Docker Daemon daemontools supervisor docker daemon • docker daemon