Rio is a user-oriented end-to-end container solution with a focus on keeping containers simple and combating the current trend of complexity.
It's kept fun and simple though it's familiar and opinionated user experience.
Additionally, Rio is a "Cloud Native Container Distribution" meaning it includes built-in Cloud Native technologies such as Kubernetes, Istio, Containerd, etc.
so that the user need not be an expert in installing, using, and maintaining these systems.
yassan@rio01:~$ sudo rio server
INFO[0000] Starting Rio v0.0.3
INFO[0006] Creating CRD gateways.networking.istio.io
INFO[0006] Creating CRD virtualservices.networking.istio.io
INFO[0006] Waiting for CRD virtualservices.networking.istio.io to become available
INFO[0007] Done waiting for CRD virtualservices.networking.istio.io to become available
INFO[0007] Waiting for CRD gateways.networking.istio.io to become available
INFO[0007] Done waiting for CRD gateways.networking.istio.io to become available
INFO[0007] Creating CRD listenconfigs.space.cattle.io
INFO[0007] Creating CRD services.rio.cattle.io
INFO[0007] Creating CRD configs.rio.cattle.io
INFO[0007] Waiting for CRD listenconfigs.space.cattle.io to become available
INFO[0007] Creating CRD routesets.rio.cattle.io
INFO[0007] Creating CRD volumes.rio.cattle.io
INFO[0007] Creating CRD stacks.rio.cattle.io
INFO[0008] Done waiting for CRD listenconfigs.space.cattle.io to become available
INFO[0008] Listening on :7443
INFO[0008] Listening on :7080
INFO[0008] Client token is available at /var/lib/rancher/rio/server/client-token
INFO[0008] Node token is available at /var/lib/rancher/rio/server/node-token
INFO[0008] To use CLI: rio login -s https://XXXX:7443 -t XXXX::admin:XXXX
INFO[0008] To join node to cluster: rio agent -s https://XXXX:7443 -t XXXX::node:XXXX
INFO[0009] Agent starting, logging to /var/lib/rancher/rio/agent/agent.log
これで起動。
起動ログに http: TLS handshake error from 127.0.0.1:44334: remote error: tls: bad certificate なんて出てますが、そっ閉じ。。。
:
INFO[0008] Node token is available at /var/lib/rancher/rio/server/node-token
INFO[0008] To use CLI: rio login -s https://XXXX:7443 -t XXXX::admin:XXXX ←←←← ※コレ!
INFO[0008] To join node to cluster: rio agent -s https://XXXX:7443 -t XXXX::node:XXXX
:
rio login -s https://XXXX:7443 -t XXXX::admin:XXXX の部分を使います。
別のターミナルを開いて以下を実行。
$ rio login -s https://XXXX:7443 -t XXXX::admin:XXXX
INFO[0000] Log in successful
:
yassan@rio01:~$ rio run -p 80/http --name test/svc --scale=3 ibuildthecloud/demo:v1
test-124a4837:svc
状態の確認
yassan@rio01:~$ rio ps
NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL
test/svc ibuildthecloud/demo:v1 8 seconds ago (3/0/0)/3 pending http://svc.test.g50yg5.lb.rancher.cloud
と直後ではなっていますが、しばらくすると以下のようになります。
yassan@rio01:~$ rio ps
NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL
test/svc ibuildthecloud/demo:v1 About a minute ago 3 active http://svc.test.g50yg5.lb.rancher.cloud
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World
次にv3でデプロイしてみます。
yassan@rio01:~$ rio stage --image=ibuildthecloud/demo:v3 test/svc:v3
test-124a4837:svc
# Serviceの状態を確認(v1とv3の両方が存在しています)
yassan@rio01:~$ rio ps
NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL
test/svc ibuildthecloud/demo:v1 2 minutes ago 3 active http://svc.test.g50yg5.lb.rancher.cloud
test/svc:v3 ibuildthecloud/demo:v3 2 minutes ago 3 active http://svc-v3.test.g50yg5.lb.rancher.cloud
# Serviceの設定を確認
yassan@rio01:~$ rio export test
services:svc:image: ibuildthecloud/demo:v1
ports:- 80/http
revisions:v3:image: ibuildthecloud/demo:v3
scale:3scale:3
# v3を確認
yassan@rio01:~$ curl http://svc-v3.test.g50yg5.lb.rancher.cloud
Hello World v3
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World v3
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World
yassan@rio01:~$ curl http://svc.test.g50yg5.lb.rancher.cloud
Hello World v3
まぁおおよそ、半々出てますね!
では、v3を完全に反映させます。
yassan@rio01:~$ rio promote test/svc:v3
test-124a4837:svc
# Serviceの状態の確認(v3のENDPOINTがv1のときのものに変わってますね)
yassan@rio01:~$ rio ps
NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL
test/svc ibuildthecloud/demo:v3 5 minutes ago 3 active http://svc.test.g50yg5.lb.rancher.cloud