5. Open Cloud Campus 5 Linux女子部 Dockerを支える技術 一般的なサーバ仮想化の分類 物理マシン 物理マシン ホスト OS ハイパーバイザ (カーネルモジュール) 仮想 マシン ゲスト OS VMware vSphere, Xen など Linux KVM ハードウェアによる仮想化 (物理マシンにハイパーバイザを内蔵) ソフトウェアによる仮想化 (物理マシン上にハイパーバイザを導入) ソフトウェアによる仮想化 (ホスト OS にハイパーバイザ機能を追加) 物理マシン OS 非仮想化環境 基本的には「物理マシン」と同等の「仮想マシン」を複数 作り出す技術です。 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS 仮想 マシン ゲスト OS ハイパ
はじめに みなさま、はじめまして。加藤と申します。最近注目を集めている仮想化技術の『コンテナ』に関する連載を始めることになりました。よろしくお願いいたします。 コンピュータの性能が向上し、仮想化という言葉も一般的になりました。従来はVPS等のサービスやIaaS、クラウドといったキーワードと共に語られることが多かった仮想化ですが、最近では開発者自身のPC上で仮想化を使ってテスト環境を作成し、使い終わったら消去するという使われ方が増え、仮想化技術を扱うエンジニアも、インフラエンジニアからアプリ開発者まで広くなりました。 また、従来は仮想的なマシンをコンピュータ上で実現するVMware、Hyper-V、KVMといった技術が話題になることが多かったことに対し、最近ではImmutable Infrastructureといったキーワードと共に『コンテナ』が話題になることが増えました。『コンテナ』とは
Dockerでコンテナを起動する際に、次のようにcpu-sharesとmemory-limitを指定することができます。 # docker run -c 256 -m 512m hogehogeこれは内部的にはcgroupsを使っていますが、RHEL7のDockerでは、systemdと連携してcgroupsの制御を行っています。この辺りの解説です。cgroupsそのもの説明は下記を参照下さい。 ・Control Groups (cgroups) コンテナから生成されるUnit まず、テスト用にContOS6のコンテナを起動して、中でtopコマンドでも実行しておきます。 # docker run -it -c 256 -m 512m centos /bin/bash bash-4.1# top別の端末からログインして、コンテナIDを確認します。 # docker ps CONTAINER
『第3回 コンテナ型仮想化の情報交換会@大阪』でお話した時のスライドです. 参考 URI にリンクしてますが,Speakerdeck のスライドで見てるとクリック出来ないので,PDFをダウンロードしてご覧ください.
4/12 に大阪でコンテナに関する仮想化の勉強会を開催し,『Linux コンテナ入門』というお題で発表してきました. 前日はDocker Meetup Tokyo #2で,最終の新幹線に飛び乗り,翌日午前から準備をして (前日,私がいない間に準備してくれて助かった!!),午後から勉強会ということで,アラフィフ予備軍のおっさんにはちょっと強行軍だったのですが,年間を通じて最もコンテナ分の濃い二日間になり,非常に楽しく,ためになる時間を過ごすことができました. この勉強会はは広く「コンテナに少しでもかすれば良い」という考えで開催しています.私がどちらかというとベースとなる仕組みの勉強ばかりなので,実際の応用事例とかも聞きたい,自分が使ってないコンテナ技術についても聞きたいと思っているからです.自分が聞きたい話を聞くために勉強会を開く,という考えですね.プログラムについても仕組みから徐々に応用に
Docker Meetup Tokyo #2 でお話した時のスライドです. 参考 URI はクリックすると飛べるようになっていますが,Speakerdeck のスライドでは無理なようなので PDF をダウンロードしてください.
mkdir とか touch とか chown とか chmod とか個別に実行しなくても install コマンドだけでまとめて出来るという話です。 問題例 Dockerfile の RUN などが典型的な例ですが、他でも例えば mkdir -p /home/foo/.ssh; chown foo /home/foo/.ssh; chmod 0700 /home/foo/.ssh のようなことをすることがあると思います。 特に Dockerfile の場合は RUN ごとにイメージがたまっていくこともあって、 ; や && でつなげて単独の RUN にまとめて書くことも多いと思います。 install でディレクトリを作る たとえば mkdir -p /home/foo/.ssh chown foo /home/foo/.ssh chgrp users /home/foo/.ssh ch
最近Dockerをいろいろ触ってみていて以下の様な記事を書いたりしました。 Dockerで立てたコンテナにsshで接続する - $shibayu36->blog; serfとDockerでクラスタを組んでみる - $shibayu36->blog; 本番環境のBlue-Green Deploymentの仕組みのプロトタイプを作っていた - $shibayu36->blog; Docker, Mesos, Sensu等を利用したBlue-Green Deploymentの仕組み - $shibayu36->blog; 社内用Docker Registryを立てる - $shibayu36->blog; docker commitでCMDやENVなどを指定する - $shibayu36->blog; docker inspectでDockerコンテナの情報を取得する - $shibayu36-
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く