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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nobuto Murata
December 08, 2015
Technology
60
0
Share
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
Untitled Presentation―プレゼンのためのプレゼンテーション
nobutomurata
0
140
助けて! XからWaylandに移行しないと新しいGNOMEが使えなくなっちゃう 2025-07-12
nobutomurata
2
450
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
2k
おうちクラウドの夢よ再び―OpenStackが今熱い― 2024-06-01
nobutomurata
0
950
19.10をUnityっぽくして使う
nobutomurata
0
62
Canonical Livepatchサービスのご紹介 2017-11-01
nobutomurata
0
70
Nova-LXDとLivepatch, GREE Mini Tech Talk 2017-06-21
nobutomurata
0
43
Ubuntu PhoneとConvergence振り返り会 2017-05-13
nobutomurata
0
84
オレのUbuntuノートPCセットアップ 2016-12-17
nobutomurata
0
62
Other Decks in Technology
See All in Technology
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
140
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
130
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
170
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
480
遊びで始めたNew Relic MCP、気づいたらChatOpsなオブザーバビリティボットができてました/From New Relic MCP to a ChatOps Observability Bot
aeonpeople
1
130
CloudFrontのHost Header転送設定でパケットの中身はどう変わるのか?
nagisa53
1
230
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
170
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
3
460
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
130
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
kaomi_wombat
0
280
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
4
1.3k
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
270
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
120
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
97
Raft: Consensus for Rubyists
vanstee
141
7.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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