SlideShare a Scribd company logo
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

More Related Content

What's hot

파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
raccoony
 
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
Patrick Chanezon
 
On demand-block-storage-for-docker
On demand-block-storage-for-dockerOn demand-block-storage-for-docker
On demand-block-storage-for-docker
Jangseon 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 Azure
Patrick 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 Container
Jangseon 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 code
Jangseon 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 2016
Ben 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 Containers
Ben Hall
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
Runcy 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 Application
Ben 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 OpenStack
Boden Russell
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
Ben Hall
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content Services
Sujay 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 Azure
Jérôme Petazzoni
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
psconnolly
 
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
Ben Hall
 
Introduction to docker security
Introduction to docker securityIntroduction to docker security
Introduction to docker security
Walid Ashraf
 

What's hot (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
 

Viewers also liked

Презентация
ПрезентацияПрезентация
Презентация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-keary
drewz lin
 
SXSW 2016 takeaways
SXSW 2016 takeawaysSXSW 2016 takeaways
SXSW 2016 takeaways
Havas
 

Viewers also liked (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
 

Similar to 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 Azure
Patrick 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 tools
Ramit 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
 
Dockerを使おう
Dockerを使おうDockerを使おう
Dockerを使おう
Naohiro Kurihara
 
もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介
Takehiko Amano
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
David 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 docker
Watcharin Yang-Ngam
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Dongwon 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 World
damovsky
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
Jason 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 Swarm
Mario IC
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh Shah
PivotalOpenSourceHub
 
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 Docker
nklmish
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Nissan Dookeran
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
Liang Bo
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
Jignesh Shah
 

Similar to 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
 

More from 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 - 2017
Tianwei 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 2
Tianwei Liu
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionTianwei Liu
 
Ueh
UehUeh

More from 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
 

Recently uploaded

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 

Recently uploaded (20)

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 

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