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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nobuto Murata
December 08, 2015
Technology
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ubuntuとコンテナ技術 What is LXD? and Why? 2015-12-08
Ubuntuで使えるコンテナ技術としてLXDを紹介します。
Nobuto Murata
December 08, 2015
More Decks by Nobuto Murata
See All by Nobuto Murata
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
230
Untitled Presentation―プレゼンのためのプレゼンテーション
nobutomurata
0
210
助けて! XからWaylandに移行しないと新しいGNOMEが使えなくなっちゃう 2025-07-12
nobutomurata
2
550
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
2.3k
おうちクラウドの夢よ再び―OpenStackが今熱い― 2024-06-01
nobutomurata
0
990
19.10をUnityっぽくして使う
nobutomurata
0
75
Canonical Livepatchサービスのご紹介 2017-11-01
nobutomurata
0
84
Nova-LXDとLivepatch, GREE Mini Tech Talk 2017-06-21
nobutomurata
0
57
Ubuntu PhoneとConvergence振り返り会 2017-05-13
nobutomurata
0
100
Other Decks in Technology
See All in Technology
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
1k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.3k
KAEN Company Deck
kaen
PRO
0
140
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
260
みてねにおけるAI-DLC導入活動とAIドリブン開発の現在地/JAWS-UG AI-DLC #2
isaoshimizu
2
320
現場の暗黙知を継承するAIエージェント — 対話から生まれる長期記憶と Skills
atsukish
0
200
EMの役割で 変わったこと・変わらなかったこと
sansantech
PRO
1
220
bet_ai_day_2026_session02
agenticsec
0
200
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
25k
「ミスを許さない手順書」を作ってみた 〜 個人的にはこれ以上できることはあまりなさそう/20260827-ssmjp-operation-procedure-update
opelab
17
17k
AI駆動開発を組織で促すために
lycorptech_jp
PRO
7
9.1k
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
210
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
4 Signs Your Business is Dying
shpigford
187
23k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
520
Producing Creativity
orderedlist
PRO
348
41k
Speed Design
sergeychernyshev
33
2.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
800
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
400
Making Projects Easy
brettharned
120
6.7k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Exploring anti-patterns in Rails
aemeredith
3
480
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
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