Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ubuntuとコンテナ技術 What is LXD? and Why? 2015-12-08
Search
Nobuto Murata
December 08, 2015
Technology
0
58
Ubuntuとコンテナ技術 What is LXD? and Why? 2015-12-08
Ubuntuで使えるコンテナ技術としてLXDを紹介します。
Nobuto Murata
December 08, 2015
Tweet
Share
More Decks by Nobuto Murata
See All by Nobuto Murata
Untitled Presentation―プレゼンのためのプレゼンテーション
nobutomurata
0
130
助けて! XからWaylandに移行しないと新しいGNOMEが使えなくなっちゃう 2025-07-12
nobutomurata
2
430
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
2k
おうちクラウドの夢よ再び―OpenStackが今熱い― 2024-06-01
nobutomurata
0
930
19.10をUnityっぽくして使う
nobutomurata
0
57
Canonical Livepatchサービスのご紹介 2017-11-01
nobutomurata
0
66
Nova-LXDとLivepatch, GREE Mini Tech Talk 2017-06-21
nobutomurata
0
42
Ubuntu PhoneとConvergence振り返り会 2017-05-13
nobutomurata
0
78
オレのUbuntuノートPCセットアップ 2016-12-17
nobutomurata
0
58
Other Decks in Technology
See All in Technology
Ultra Ethernet (UEC) v1.0 仕様概説
markunet
3
220
Datadog の RBAC のすべて
nulabinc
PRO
3
310
Kaggleの経験が実務にどう活きているか / kaggle_findy
sansan_randd
6
1.1k
タスク管理も1on1も、もう「管理」じゃない ― KiroとBedrock AgentCoreで変わった"判断の仕事"
yusukeshimizu
4
1.6k
事例に見るスマートファクトリーへの道筋〜工場データをAI Readyにする実践ステップ〜
hamadakoji
0
180
聲の形にみるアクセシビリティ
tomokusaba
0
140
Windows ネットワークを再確認する
murachiakira
PRO
0
300
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
楽しく学ぼう!ネットワーク入門
shotashiratori
0
270
【SLO】"多様な期待値" と向き合ってみた
z63d
2
310
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.1k
Claude Codeが爆速進化してプラグイン追従がつらいので半自動化した話 ver.2
rfdnxbro
0
420
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
500
Utilizing Notion as your number one productivity tool
mfonobong
4
250
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Navigating Team Friction
lara
192
16k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
290
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Transcript
Ubuntuとコンテナ技術 What is LXD? and Why? Nobuto Murata <
[email protected]
> 2015-12-08
We are the company behind Ubuntu.
EMPLOYEES London Boston Shanghai Taipei 600+ COUNTRIES 30+ FOUNDATION 2004
Beijing
LXD The Linux container hypervisor
1 2 3 LXD (“lex-dee”) Secure by design(セキュア) 非特権コンテナ、リソースの制限、などなど Scalable(スケーラブル)
ノートPC上での検証から数千台規模の物理マシンクラスタまで Intuitive(直感的) シンプルかつ明快なAPI、 コマンド ubuntu.com/lxd linuxcontainers.org/lxd github.com/lxc/lxd 高速、高集積かつセキュアなコンテナマネジメントシステム
• “Docker is an amazing application delivery mechanism, which may
change the world of devops forever” • “LXD and Docker share some underlying kernel capabilities” And Docker? 安心してください、どちらも使えます
あたかも物理マシンみたいに使うコンテナ “システムコンテナ”がLXDの特徴 アプリケーションコンテナとは目的や使われ方が異なる
1 2 3 LXD is not... LXDは完全仮想化を 提供するものではあ りません あくまでコンテナなの
で物理マシンと同等 のパフォーマンスが 出ます。 LXDはLXCを置き換 えるプロジェクトでは ありません LXDはLXCを補完す るもので、LXDはコン テナを作成/管理する ためにliblxcを使って います。 LXDはアプリケーション コンテナ管理ツールでは ありません LXDはコンテナの中で動 いているものには関知 せず、システムコンテナ 自体を管理します。 勘違いしないために、「LXDが何ではないのか」の正しい理解を
ちなみに、よくある質問: 「コンテナは商用環境で使えるのか?」 LXC自体は何年も前から商用サービスのワークロードを支えています。 例えば…
OpenStackはたくさんのサービスから成る “1サービス : 1物理マシン” にすると結構物理マシンが必要、かと いって単純に集約してしまうと後でスケールアウトするときに大変
そこで、LXCを使って 物理マシンの集約と柔軟性の両立
システムコンテナの応用例: Nova LXD OpenStack Novaでシステムコンテナ
Nova LXD github.com/lxc/nova-lxd
LXDのインストール
LXDのインストール方法 ## "lxd"パッケージのインストール ## Ubuntu 15.10のクラウドイメージではデフォルトインストール済み $ sudo apt-get install
lxd $ newgrp lxd ## イメージダウンロードサーバーを登録 $ lxc remote add images images.linuxcontainers.org ## 最新のLXDを使いたい場合は ## $ sudo apt-add-repository ppa:ubuntu-lxc/lxd-stable Ubuntuの場合
LXDのデモ
はじめてのコンテナ ## リモートイメージサーバーの情報 $ lxc remote list ## 使用できるイメージの一覧 $
lxc image list images: | less -S ## Ubuntu 14.04 LTS コンテナの起動 $ lxc launch images:ubuntu/trusty/amd64 demo1
コンテナ情報 ## コンテナ一覧 $ lxc list ## デバッグを見てみると… $ lxc
list --debug $ jq . ## コンテナ情報 $ lxc info demo1 $ pgrep -af /sbin/init $ ps fax | less -S $ lxc config show demo1
コンテナ内へ ## コンテナでbashを起動 $ lxc exec demo1 -- bash #
exit ## コンテナ内でコマンドを実行 $ lxc exec demo1 -- touch foo $ lxc exec demo1 -- ls -l ## ファイルのpush/pull $ lxc file push --mode=0600 /etc/hosts demo1/tmp/ $ lxc exec demo1 -- ls -l /tmp $ lxc file pull demo1/etc/hosts .
スナップショット ## スナップショットの保存 $ lxc snapshot demo1 good ## コンテナの破壊
$ lxc exec demo1 -- rm -rf /usr $ lxc exec demo1 -- ls /usr ## スナップショットから復元 $ lxc restore demo1 good $ lxc exec demo1 -- ls /usr
リソースの制限 ## CPU、メモリ情報の確認 $ lxc exec demo1 -- grep -c
processor /proc/cpuinfo $ lxc exec demo1 -- free -h ## CPU、メモリの制限を追加 $ lxc config set demo1 limits.cpus 1 $ lxc config set demo1 limits.memory 512M $ lxc restart demo1 ## 制限が反映されていることを確認 $ lxc exec demo1 -- grep -c processor /proc/cpuinfo $ lxc exec demo1 -- free -h
あとはどんどん作るだけ ## イメージにエイリアスを設定 $ lxc image list $ lxc image
alias create ubuntu 76668f72d313 ## 2コンテナ目以降を起動 $ lxc launch ubuntu demo2 $ lxc launch ubuntu demo3 ## コマンド一覧は $ lxc help
Ubuntu 16.04 LTSに向けて、LXDならびに Nova LXDは進化し続けます ひと口にコンテナと言っても、実はいろいろ。 あなたの使い方にLXDは合いますか?
canonical.com ubuntu.com Questions? canonical.com/careers