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
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)
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.
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.
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
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.
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.
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
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
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
-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
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
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
$ 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 <ServiceName>.<StackName>.<ClusterID>.<ROOT domain> 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
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
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
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
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