Rancher GUI Basic and CLI Ops
Rancher Meetup Tokyo #4
Go Chiba @go_chiba
About me
 Go Chiba
– Work
System Integrator
– Role
Public/Private Cloud
Container Orchestrator
– Contact
Twitter: @go_chiba
What is Rancher?
Rancher Catalog
AD/LDAP
Leverage
existing tools:
- CI/CD
- Code
Repository
- Monitoring
Environment 1 Environment N
…
Network Services Storage Services
Container Orchestration and Scheduling
User Mgmt Ops Mgmt
Environment 2
Environment
 論理的なグループ(Production/Staging/ServiceA)
 Environment毎にオーケストレーターを指定可能
– Cattle(Rancher独自), Kubernetes, Mesos, Swarm
– 追加 Stack を含めてテンプレート化することも可能
e.g.) DNS, Network, Storage...
Infrastructure
 コンテナ環境を利用するためのインフラの管理
Infrastructure
Catalog
 カタログ
– ライブラリ
Rancher Labs 提供のカタログ
– コミュニティ
コミュニティサポートのカタログ
– プライベートカタログ
自作のカタログ
Stack
 稼働中のスタックを確認
– ユーザー
ユーザーが作成したスタック
– インフラストラクチャ
Rancher で利用しているシステムスタック
Stack
コンテナ間リンクの確認 docker-compose.yml の確認
GUIなんて軟弱なインターフェース使えるか!
シェルだろシェル!!
Rancher Compose
 docker-compose の Rancher 版
Commands:
create Create all services but do not start
up Bring all services up
start Start services
logs Get service logs
restart Restart services
stop, down Stop services
scale Scale services
rm Delete services
pull Pulls images for services
upgrade Perform rolling upgrade between services
help Shows a list of commands or help for one command
Rancher Compose
 しかし、痒いところに手が届かなかったり...
– # rancher-compose rm するとスタックは残る
– GUI の全てのオペレーションは不可能
• 環境/ホストの追加
• カタログの利用
• 管理ホストへのログイン ...etc
Rancher CLI
 Rancher 管理者向け(?) の CLI
Commands:
catalog Operations with catalogs
config Setup client configuration
docker Run docker CLI on a host
environment, env Interact with environments
events, event Displays resource change events
exec Run a command on a container
export Export configuration yml for a stack as a tar
archive or to local files
hosts, host Operations on hosts
logs Fetch the logs of a container
ps Show services/containers
restart Restart service, container
Rancher CLI
rm Delete service, container, stack, host, volume
run Run services
scale Set number of containers to run for a service
ssh SSH into host
stacks, stack Operations on stacks
start, activate Start or activate service, container, host, stack
stop, deactivate Stop or deactivate service, container, host,
stack
up Bring all services up
volumes, volume Operations on volumes
inspect View details for service, container, host,
environment, stack, volume
wait Wait for resources service, container, host,
stack, machine, projectTemplate
サンプル
Question?
Thank you!
参考
 さくらとコンテナの夕べ(第2回) Rancher/Kubernetes入門ハンズ
オン資料 by @zembutsu
http://qiita.com/zembutsu/items/007617cbb00a0d554c8c
 Rancher の用語を調べてみました by @ryota_hnk
http://qiita.com/ryota_hnk/items/8b54fd56ee8b699d50ed
 Rancher CLIについて by @zembutsu
http://www.slideshare.net/zembutsu/rancher-command-line-
interface

GUI&基本操作、CLI編