Slide 1

Slide 1 text

Docker Meetup Tokyo #25 2018.09.03 © 2018 cyberblack28 WHAT’S RIO ?

Slide 2

Slide 2 text

Profile Twitter:cyberblack28 Hatena Blog:https://cyberblack28.hatenablog.com/ Job Infrastructure Engineer Frontend Engineer Educational Solution Architect Hobby1: Music,Live,FES !! Hobby2: Take a picture !! https://www.flickr.com/photos/cyberblack ISBN-10: 4798155373 ISBN-13: 978-4798155371 I wrote the Chapter 6 Rancher 2.0 part. Release on March 15, 2018 #rancherjp #kujiraya #deepcn

Slide 3

Slide 3 text

1.What’s Rio ? 2.Let’s try Rio !! 3.Documents of Rio Agenda

Slide 4

Slide 4 text

What’s Rio ?

Slide 5

Slide 5 text

What’s Rio ? 1.Rio is … https://github.com/rancher/rio New Project of Rancher Labs “Cloud Native Container Distribution”

Slide 6

Slide 6 text

What’s Rio ? 2.Who’s Developer ? Darren Shepherd Co-founder and Chief Architect at Rancher Labs, Inc. @ibuildthecloud

Slide 7

Slide 7 text

What’s Rio ? 3.When and where was Rio announced ? 2018.05.06 2018.06.13

Slide 8

Slide 8 text

What’s Rio ? Service Mesh made Docker Simple Service mesh is the missing piece in most container deployments. Many organizations have seen increased agility by Dockerizing their applications and deploying in Kubernetes. Service mesh enables more complex deployment scenarios (A/B, circuit breaker), stricter security (mTLS), and better visibility. In it’s current state service mesh is difficult to leverage and adds a lot more concepts to your deployments. In this talk we will present a new tool that builds on the simplicity of Docker Compose to deploy and run your service mesh. Darren Shepherd (Rancher Labs)

Slide 9

Slide 9 text

What’s Rio ? Using Containers in Production shoudn’t be this Hard. Darren Shepherd (Rancher Labs) It was Docker's ease of use that sparked the creativity of users, and lead to its abundant adoption for development and testing.

Slide 10

Slide 10 text

What’s Rio ? 4.What’s Concept of Rio ? 1.Simple, fun, end-to-end container experience 2.Cloud Native Container Distribution 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 through it's familiar and opinionated user experience. Additionally, Rio is a "Cloud Native Container Distribution" meaning is includes builtin Cloud Native technologies such as Kubernetes, Istio, Containerd, etc. so that the user need not be an expert in installing, using, and maintaining these system.

Slide 11

Slide 11 text

What’s Rio ? 5.What’s Status of Rio ? Current Status: Early Preview This is an early preview, features may be broken, not work as described, and has been known to be irresistibly drawn to large cities, where it will back up sewers, reverse street signs, and steal everyone's left shoe. Please try it out and file bugs. Goals 1. Fun 2. Simple 3. Portable 4. Secure 5. Product Grade 6. Cloud Native Distribution

Slide 12

Slide 12 text

What’s Rio ? Early Preview: RioPublished August 6, 2018 https://goo.gl/UzJeMJ

Slide 13

Slide 13 text

What’s Rio ? 6.What’s Components of Rio ? As of August 2018

Slide 14

Slide 14 text

What’s Rio ? 7.What’s technical concepts of Rio ? Service The main unit that is being dealt with in Rio are services. Services are just a collection of containers that provide a similar function. Stack A stack is a group of services and their related resources, such as configuration files, volumes and routes. A stack ends up typically representing one application. Workspace A workspace is a collection of stacks, and other resources such as secrets.

Slide 15

Slide 15 text

What’s Rio ? Service Mesh Rio has a built in service mesh, powered by Istio and Envoy. Rio specifically does not require the user to understand much about the underlying service mesh. Just know that all communication is going through the service mesh.

Slide 16

Slide 16 text

Let’s try Rio !!

Slide 17

Slide 17 text

Let’s try Rio !! 1. Get start Rio Quick Start • Recommendation Laptop : Minikube, Docker for Mac/Windows • Others Linux VM or Linux itself

Slide 18

Slide 18 text

Let’s try Rio !! Installation • Rio Standalone • Run on Kubernetes Rio will run in two different modes In this mode Rio comes will all the container tech you need built in. Rio does not need Docker, Kubernetes or anything else installed on the host. All you need are modern Linux servers. (Linux 4.x+ that support overlay, SquashFS, and containers in general) In this mode Rio will use an existing Kubernetes cluster. The advantages of this approach is that you get more flexibility in terms of networking, storage, and other components at the cost of greatly increased complexity. 18.04 LTS

Slide 19

Slide 19 text

Let’s try Rio !! 2. Rio Release (As of August 2018 ) Release Category Version Pre-release v0.0.1-rc1 Pre-release v0.0.1-rc2 Pre-release v0.0.1-rc3 Latest release V0.0.1 Pre-release V0.0.2-rc1 Latest release V0.0.2 Pre-release V0.0.3-rc1 Pre-release V0.0.3-rc2 Pre-release V0.0.3-rc3 Pre-release V0.0.3-rc4 Pre-release V0.0.3-rc5 Pre-release V0.0.3-rc6 https://github.com/rancher/rio/releases

Slide 20

Slide 20 text

Let’s try Rio !! 2. Prepare 01 Item Setting value Name rio Region asia-northeast1Tokyo Zone asia-northeast1-b Machine type 4 vCPUs Boot disk Ubuntu 18.04 LTS Size(GB) 80 Firewall Allow HTTP traffic, Allow HTTPS traffic Make one VM Instance

Slide 21

Slide 21 text

Let’s try Rio !! 3. Standalone 1.Download Rio v0.0.2 $ curl -LO https://github.com/rancher/rio/releases/download/v0.0.2/rio-v0.0.2-linux-amd64.tar.gz 2.Expansion $ tar zxvf rio-v0.0.2-linux-amd64.tar.gz 3.Move $ sudo mv rio-v0.0.2-linux-amd64/rio /usr/local/bin/ 4.Excute $ sudo rio server

Slide 22

Slide 22 text

Let’s try Rio !!

Slide 23

Slide 23 text

Let’s try Rio !! Rancher Labs CEO himself GitHub Issue..

Slide 24

Slide 24 text

Let’s try Rio !! 3. Prepare 02 rancher-server rio Server Item Setting value Name rio Region asia-northeast1Tokyo Zone asia-northeast1-b Machine type 4 vCPUs Boot disk Ubuntu 16.04 LTS Size(GB) 80 Firewall Allow HTTP traffic, Allow HTTPS traffic Item Setting value Name rancher-server Region asia-northeast1Tokyo Zone asia-northeast1-b Machine type 1 vCPUs Boot disk Ubuntu 16.04 LTS Size(GB) 80 Firewall Allow HTTP traffic, Allow HTTPS traffic Agent kubectl rio Sample App

Slide 25

Slide 25 text

Let’s try Rio !! 1.Download $ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl 2.Execution authority $ chmod +x ./kubectl 3.Move $ sudo mv ./kubectl /usr/local/bin/kubectl kubectl install 4.Confirm node (※Pre-set kubeconfig) $ kubectl get nodes NAME STATUS ROLES AGE VERSION rio Ready controlplane,etcd,worker 10m v1.11.2 rancher-server

Slide 26

Slide 26 text

Let’s try Rio !! 4. On Kubernetes 1.Download $ curl -LO https://github.com/rancher/rio/releases/download/v0.0.2/rio-v0.0.2-linux-amd64.tar.gz 2.Expansion $ tar zxvf rio-v0.0.2-linux-amd64.tar.gz 3.Move $ sudo mv rio-v0.0.2-linux-amd64/rio /usr/local/bin/ 4.Excute rio $ rio login [1] Connect to remote Rio server [2] Install Rio in existing Kubernetes Select Number [1] 2 INFO[0805] Installing Rio INFO[0808] Waiting to connect to Rio INFO[0819] Log in successful rancher-server

Slide 27

Slide 27 text

Let’s try Rio !! 5.kubectl by rio $ rio kubectl get services --all-namespaces NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes ClusterIP 10.43.0.1 443/TCP 1h ingress-nginx default-http-backend ClusterIP 10.43.151.86 80/TCP 1h istio-095b8502 istio-citadel ClusterIP 10.43.61.240 80/TCP 1h istio-095b8502 istio-gateway ClusterIP 10.43.95.95 80/TCP 1h istio-095b8502 istio-pilot ClusterIP 10.43.170.37 15007/TCP,15010/TCP 1h kube-system kube-dns ClusterIP 10.43.0.10 53/UDP,53/TCP 1h kube-system metrics-server ClusterIP 10.43.228.86 443/TCP 1h rio-system rio ClusterIP 10.43.251.160 443/TCP 1h

Slide 28

Slide 28 text

Let’s try Rio !! $ rio -h NAME: rio - Containers made simple, as they should be USAGE: rio [global options] command [command options] [arguments...] VERSION: v0.0.2 COMMANDS: ps List services and containers run Create and run a new service create Create a new service scale Scale a service rm Delete a service or stack inspect Print the raw API output of a resource edit Edit a service or stack up Bring up a stack export Export a stack cat Print the contents of a config exec Run a command in a running container attach Attach to a running process in a container logs Print logs from containers stage Stage a new revision of a service promote Promote a staged version to latest weight Weight a percentage of traffic to a staged service routes, route Route traffic across the mesh wait Wait for resources service, stack login Login into Rio help, h Shows a list of commands or help for one command

Slide 29

Slide 29 text

Let’s try Rio !! CLUSTER RUNTIME: server Run management server agent Run node agent SUB COMMANDS: configs, config Operations on configs volumes, volume Operations on volumes stacks, stack Operations on stacks nodes, node Operations on nodes GLOBAL OPTIONS: --debug Turn on debug logs --wait, -w Wait for resource to reach resting state --wait-timeout value Timeout in seconds to wait (default: 600) --wait-state value State to wait for (active, healthy, etc) --server value Specify the Rio API endpoint URL [$RIO_URL] --token value Specify Rio API token [$RIO_TOKEN] --kubeconfig value Specify Kubeconfig to use to connect to Kubernetes [$RIO_KUBECONFIG] --workspace value Specify which workspace to use (default: "default") [$RIO_WORKSPACE] --help, -h show help --version, -v print the version

Slide 30

Slide 30 text

Let’s try Rio !! 5.Service Mesh 1.Create a new service $ rio run -p 80/http --name test/svc --scale=3 ibuildthecloud/demo:v1 2.Ensure service is running and determine public URL $ rio ps NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL test/svc ibuildthecloud/demo:v1 5 hours ago 3 active http://svc.test.10.146.0.3.nip.io rancher-server $ rio ps NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL test/svc ibuildthecloud/demo:v1 17 seconds ago 3 active http://svc.test.8gr18g.lb.rancher.cloud ENDPOINT’s HOSTNAME is ... ROOT domain (case of standalone) is lb.rancher.cloud. ROOT domain (case of Docker for Mac/Win etc.) is 127.0.0.1.nip.io Compare Tutorial

Slide 31

Slide 31 text

Let’s try Rio !! 3.Stage new version, updating just the docker image and assigning it to "v3" version. $ rio stage --image=ibuildthecloud/demo:v3 test/svc:v3 4.Notice a new URL was created for your staged service $ rio ps NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL test/svc ibuildthecloud/demo:v1 5 hours ago 3 active http://svc.test.10.146.0.3.nip.io test/svc:v3 ibuildthecloud/demo:v3 5 hours ago 3 active http://svc-v3.test.10.146.0.3.nip.io 5.Access current service $ curl -s http://svc.test.10.146.0.3.nip.io default backend - 404 6.Access staged service under new URL $ curl -s http://svc-v3.test.10.146.0.3.nip.io default backend - 404 $ curl -s http://svc.test.8gr18g.lb.rancher.cloud Hello World $ curl -s http://svc-v3.test.8gr18g.lb.rancher.cloud Hello World v3 Compare Tutorial

Slide 32

Slide 32 text

Let’s try Rio !! By making an ingress with rancher, we were able to access it with the browser. http://svc.test-124a4837.35.200.68.156.xip.io/ http://svc-v3.test-124a4837.35.200.68.156.xip.io/ 7.Export to see stack file format $ rio export test services: svc: image: ibuildthecloud/demo:v1 ports: - 80/http revisions: v3: image: ibuildthecloud/demo:v3 scale: 3 scale: 3

Slide 33

Slide 33 text

Let’s try Rio !! 8.Send some production traffic to new version $ rio weight test/svc:v3=50% 9.See that 50% of traffic goes to new service Updated the browser many times but v3 is not displayed. . $ curl -s http://svc.test.8gr18g.lb.rancher.cloud Hello World $ curl -s http://svc.test.8gr18g.lb.rancher.cloud Hello World v3 Compare Tutorial

Slide 34

Slide 34 text

Let’s try Rio !! 11.All new traffic is v3 v3 is displayed even if the browser is updated many times $ curl -s http://svc.test.8gr18g.lb.rancher.cloud Hello World v3 $ curl -s http://svc.test.8gr18g.lb.rancher.cloud Hello World v3 Compare Tutorial 10. Happy with the new version we promote the stage version to be the primary $ rio promote test/svc:v3

Slide 35

Slide 35 text

Documents of Rio

Slide 36

Slide 36 text

Documents of Rio https://github.com/rancher/rio https://www.youtube.com/watch?time_continue=2&v=8YkIycwad2w http://febc-yamamoto.hatenablog.jp/entry/2018/08/08/204657 Written by @yamamoto_febc

Slide 37

Slide 37 text

JAPAN CONTAINER DAYS V18.12 2018.12.04-05 @ sola city Conference Center

Slide 38

Slide 38 text

! !