introduction of rancher at osc tokyo 17 spring

38
オオオオオオオオオオオオオオオオオオオオオオ "Rancher" オオオオ OSC Tokyo 2017 Spring Rancher JP Go Chiba @go_chiba

Upload: go-chiba

Post on 12-Apr-2017

288 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Introduction of Rancher at OSC Tokyo 17 Spring

オープンソースのコンテナ管理プラットフォーム "Rancher" のご紹介

OSC Tokyo 2017 SpringRancher JP

Go Chiba @go_chiba

Page 2: Introduction of Rancher at OSC Tokyo 17 Spring

About me Go Chiba

– WorkAWS/Azure...OpenStack/CloudStack...Docker, Orchestrator, Monitoring...

– RoleRancher JP 運営メンバーGUI i18n サポート国内クラウド サポート

– ContactTwitter: @go_chiba

Page 3: Introduction of Rancher at OSC Tokyo 17 Spring

コンテナとは ...?

Page 4: Introduction of Rancher at OSC Tokyo 17 Spring

コンテナとは ...? 元々は Linux カーネルの開発者向けに

LXC(LinuX Container) プロジェクトがスタート

Linux カーネルの機能でリソースを分割– Namespace( 名前空間 )

プロセスをグループ化してリソースを隔離– cgroup

グループ化したプロセスに対し物理リソース(cpu/mem など ) を制限

Page 5: Introduction of Rancher at OSC Tokyo 17 Spring

コンテナとは ...?

物理サーバー

ハイパーバイザー

仮想マシンA

物理サーバー

OS

仮想マシンB

仮想マシンC

アプリ

OS

アプリ

OS

アプリ

OS

名前空間 A 名前空間 B 名前空間 C

Lib Lib Lib アプリ

アプリ

アプリ

Lib Lib Lib

ハイパーバイザー型 コンテナ

Page 6: Introduction of Rancher at OSC Tokyo 17 Spring

コンテナとは ...? 何がうれしいの ?

– 高集約– オーバーヘッドが少ない– アプリとライブラリのみのため軽量

誰がうれしいの ?– 主に開発者

環境の隔離 → 開発環境を汚さない複数環境を準備 → 異なるバージョンを同時に

Page 7: Introduction of Rancher at OSC Tokyo 17 Spring

コンテナとは ...? LXC での課題 ( 当時は )

– あくまでローカルな開発環境を想定他の人との環境共有は ?

– アプリケーションの再現性前は動いていたのに ...

?

build-A

build-B

Page 8: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

Page 9: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

様々なツールが登場

Page 10: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

Docker って ?– 元々は PaaS ベンダーである dotCloud Inc.( 現 Docker Inc.)

が開発– 2013 年 Docker を OSS 化し社名を Docker Inc. に変更

“ オレのマシンでは動く” を排除

Page 11: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭Client DockerHost Registry

Container

docker build

docker pull

docker runImage

Docker Deamon

Page 12: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

Page 13: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

なぜ Docker が注目されたか– git ライクにコンテナを制御

– DockerHub の存在

# docker run/stop/rm# docker commit# docker pull/push

Build Ship Run

Page 14: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

なぜ Docker が注目されたか– イメージのバージョン管理

docker history nginxIMAGE CREATED CREATED BY SIZE COMMENT05a60462f8ba 4 months ago /bin/sh -c #(nop) CMD ["nginx" "-g" "daem... 0 B<missing> 4 months ago /bin/sh -c #(nop) EXPOSE 443/tcp 80/tcp 0 B<missing> 4 months ago /bin/sh -c ln -sf /dev/stdout /var/log/ngi... 22 B<missing> 4 months ago /bin/sh -c apt-key adv --keyserver hkp://p... 58.5 MB<missing> 4 months ago /bin/sh -c #(nop) ENV NGINX_VERSION=1.11.... 0 B<missing> 4 months ago /bin/sh -c #(nop) MAINTAINER NGINX Docker... 0 B<missing> 4 months ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B<missing> 4 months ago /bin/sh -c #(nop) ADD file:41ea5187c501168... 123 MB

Page 15: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

なぜ Docker が利用されているか

Design Dev Test Deploy

Design Dev Test Deplo

yDesig

n Dev Test Deploy

bug fix feature test bug fix feature test

Design Dev Test Deplo

ybug fix feature test

Laptop

Staging

Production

...

Page 16: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

Docker を利用する上での課題– CUI がメイン

最近は Docker DC/Docker Cloud といったツール / サービスも

– Cattle vs Pet( 運用方法の違い )仮想化 : 落ちないための工夫 (High Availability)コンテナ : 落ちても大丈夫な工夫 (High Resiliency)

– コンテナ向けのインフラとは ?

Page 17: Introduction of Rancher at OSC Tokyo 17 Spring

Docker の台頭

ホスト管理

コンテナ管理

Host OS Host OS

# docker swarm join

...

...

Host OS Host OS

HA ...ScaleOut Upgrade

Create/Remove Host

Add Host to Cluster

...

Page 18: Introduction of Rancher at OSC Tokyo 17 Spring
Page 19: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher とは

Page 20: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

グラフィカルな Web UI インフラ管理

– コンテナ用ホストの作成 / 削除 オーケストレーション管理

– Cattle( 独自 ), Kubernetes, Mesos, Swarm アプリケーションの管理

– 作成 / 削除– スケールアウト / スケールイン / アップグレード

オープンソースのコンテナ管理プラットフォーム

Page 21: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとはアプリケーション

オーケストレーター

インフラストラクチャ

Page 22: Introduction of Rancher at OSC Tokyo 17 Spring

RancherとはRancher カタログ

AD/LDAP

既存ツールの利用 :- CI/CD- Code

Repository- Monitoring

開発環境 商用環境…ネットワークサービス ストレージサービス

コンテナオーケストレーション / スケジューラーユーザー

管理運用管理

テスト環境

Page 23: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

インストールが簡単

GUI からオペレーションが可能

# docker run -d --restart=unless-stopped -p 8080:8080 \ --name rancher-server rancher/server

コンテナ間リンク リソースモニタリング

シェル実行

Page 24: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

インフラ~アプリまで広くカバーコミュニティカタログ ( アプリ ) サポートクラウド

Page 25: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

Host OS Host OS Host OS

server

# docker run -d --restart=unless-stopped -p 8080:8080 --name rancher-server rancher/server

管理用ホスト クラスタ用ホスト クラスタ用ホスト

Page 26: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

Host OS Host OS Host OS

agent agent

# docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.1 http://<rancher_server>/v1/scripts/<token>server

管理用ホスト クラスタ用ホスト クラスタ用ホスト

Page 27: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

Host OS Host OS Host OS

agent agentserver

インフラストラクチャ

インフラストラクチャ

ホスト間トンネリング死活監視スケジューラーメタデータ

管理用ホスト クラスタ用ホスト クラスタ用ホスト

Page 28: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

Host OS Host OS Host OS

agent agentserver

web dblink

GUIデプロ

イ lb

管理用ホスト クラスタ用ホスト クラスタ用ホスト

Page 29: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

Host OS Host OS Host OS

agent agentserver

管理用ホスト クラスタ用ホスト クラスタ用ホスト

ScaleOutUpgrade

Page 30: Introduction of Rancher at OSC Tokyo 17 Spring

Rancherとは

誰がうれしいか ?– 開発者だけでなく運用者– DevOps の足掛かり

テスト環境 本番環境

Dev Ops

テスト環境

DevOps

???

Past

Future

Page 31: Introduction of Rancher at OSC Tokyo 17 Spring

Demo

Page 32: Introduction of Rancher at OSC Tokyo 17 Spring

まとめ

Rancher はコンテナの管理プラットフォーム– コマンド一発の簡単インストール– わかりやすい GUI でコンテナを管理– 様々なクラウドオーケストレーションツールをサポート

Page 33: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher JP のご紹介

Page 34: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher JP のご紹介

Page 35: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher JP のご紹介

Rancher Meetup Tokyo #5時期 : 3/15(Wed) 内容 : Windows Container とか場所 : 日本マイクロソフト 品川オフィス

Rancher もくもく勉強会 #4時期 : 3/28(Tue)内容 : TBD場所 : 株式会社ソフォス

Page 36: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher JP のご紹介

@Rancher_JPhttps://www.facebook.com/rancherjp

http://slack.rancher.jp

Page 37: Introduction of Rancher at OSC Tokyo 17 Spring

Rancher JP のご紹介

Page 38: Introduction of Rancher at OSC Tokyo 17 Spring

Thank you!!