Docker との比較で知る
Quiz! Singularity
Singularity Meet-up Japan #1 May 16, 2018
Ryo NAKAMARU, SUPINF Inc. / Rescale, Inc.
Slide 2
Slide 2 text
中丸 良 @pottava
• AWS Certified Solutions Architect, DevOps Engineer - Professional
• Google Certified Professional - Cloud Architect
• CTO at SUPINF Inc. / Solutions Architect at Rescale, Inc.
• クラサバ ERP → Web アプリ → クラウド → 機械学習 / HPC
My profile
!2
Slide 3
Slide 3 text
コンテナ、みなさん使ってますか?
!3
Slide 4
Slide 4 text
Fortune 100
!4
29%
71%
Yes No
http://redmonk.com/fryan/2017/09/10/cloud-native-technologies-in-the-fortune-100/
Slide 5
Slide 5 text
とはいえ、この “コンテナ” はほとんど Docker のこと..
!5
Slide 6
Slide 6 text
(比較のために)Docker .
• 思想:Build, Ship, and Run any app, Anywhere
• 主に名前空間を使いアプリケーションの実行コンテキストを他から分離
• ユーザも利害関係者も増え、標準化が進み本番利用も活発
‣ https://www.opencontainers.org/
!6
Slide 7
Slide 7 text
!7
Solomon Hykes
“ɹɹɹɹɹɹɹɹɹ ”
To program, you need tools. If these tools are not designed to be
accessible and useful to programmers of all levels of expertise
and specialization, then as an industry we failed.
“”
Slide 8
Slide 8 text
VirtualMachines
!8
ハイパーバイザ
ホスト OS ホスト OS
dockerd
containerd
application A
…
Docker
ゲスト OS Y ゲスト OS Z
VM と Docker コンテナ
application B
application C
runc application A
runc application B
runc application C
Slide 9
Slide 9 text
VirtualMachines
!9
ハイパーバイザ
ホスト OS ホスト OS
dockerd
containerd
application A
…
Containers
ゲスト OS Y ゲスト OS Z
VM と Docker コンテナ
application B
application C
runc application A
runc application B
runc application C
リソースの分離が VM ほど厳密ではない
• Docker コンテナは ホストのカーネルで 走る
• ユーザが何も考えないと root ユーザで動く
• ホストのリソースをほぼ 直接利用 する
⇨ 各種設定で縛っていく必要あり、あうー・・
Slide 10
Slide 10 text
VirtualMachines
!10
ハイパーバイザ
ホスト OS ホスト OS
dockerd
containerd
application A
…
Docker
ゲスト OS Y ゲスト OS Z
VM と Docker コンテナ
application B
application C
runc application A
runc application B
runc application C
しかもこいつは
root で動く..
プロセス 2
正解:`ps ax | wc -l`+ 1 した値
自分以外のユーザのプロセスも制御端末のないプロセスも表示され
プロセス ID もホスト側のものがそのまま見えます。
Docker の場合はプロセスも隔離されるのでこうなります。
!29
$ docker run alpine:3.7 ps
PID USER TIME COMMAND
1 root 0:00 ps
Slide 30
Slide 30 text
Containerize your app!
!30
• クラウド / コンテナ を強みにした受託開発運用、コンサルティング
• 2015 年から Docker の本番運用を開始・豊富な CI / CD 事例
• スピンフ、と読みます・・
We’re hiring!!!
Slide 31
Slide 31 text
ご静聴ありがとうございました
参考文献:
• Containers for Science, Reproducibility and Mobility SINGULARITY P2
https://www.intel.com/content/dam/www/public/us/en/documents/presentation/hpc-
containers-singularity-advanced.pdf
• Singularity - Google Groups
https://groups.google.com/a/lbl.gov/forum/#!forum/singularity