6. What’s Rio ?
1.Rio is …
https://github.com/rancher/rio
New Project of Rancher Labs
“Cloud Native Container Distribution”
7. What’s Rio ?
2.Who’s Developer ?
Darren Shepherd
Co-founder and Chief Architect at Rancher Labs, Inc.
@ibuildthecloud
8. 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)
9. 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.
10. 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.
11. 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
12. What’s Rio ?
Early Preview: Rio Published August 6, 2018
https://goo.gl/UzJeMJ
14. 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.
15. 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.
17. Let’s try Rio !!
1. Get start Rio
Quick Start
• Recommendation
Laptop : Minikube, Docker for Mac/Windows
• Others
Linux VM or Linux itself
18. 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
19. Let’s try Rio !!
2. Rio Release (As of October 2018 )
Release Category Version
Latest release V0.0.1
Latest release V0.0.2
Latest release V0.0.3
Pre-release V0.0.4-rc1
https://github.com/rancher/rio/releases
21. Let’s try Rio !!
2. Prepare
Item Setting value
Name rio
Region asia-northeast1 Tokyo
Zone asia-northeast1-b
Machine type 4 vCPUs MEM 15GB
Boot disk
Ubuntu 18.04 LTS
Size(GB) 80
Firewall Allow HTTP traffic, Allow HTTPS traffic
Make one VM Instance
22. Let’s try Rio !!
3. Standalone
1.Download Rio v0.0.3
$ curl -LO https://github.com/rancher/rio/releases/download/v0.0.3/rio-v0.0.3-linux-amd64.tar.gz
2.Expansion
$ tar zxvf rio-v0.0.3-linux-amd64.tar.gz
3.Move
$ sudo mv rio-v0.0.3-linux-amd64/rio /usr/local/bin/
4.Excute
$ sudo rio server
23. Let’s try Rio !!
5.Remenber CLI & Token
INFO[0008] To use CLI: rio login -s https://10.146.0.2:7443 -t
R1049352d36864f3ad3302b8058565c3704bd6f2bd0143b3ebc6b1db4af750e5894::admin:035849792260
08a5ffd630f6f42b07b4
INFO[0008] To join node to cluster: rio agent -s https://10.146.0.2:7443 -t
R1049352d36864f3ad3302b8058565c3704bd6f2bd0143b3ebc6b1db4af750e5894::node:a334ab8435e54
ebd0cfac0699df62f14
24. Let’s try Rio !!
6.Launch a new console & excute “rio login” command
$ rio login -s https://10.146.0.2:7443 -t
R1049352d36864f3ad3302b8058565c3704bd6f2bd0143b3ebc6b1db4af750e5894::admin:035849792260
08a5ffd630f6f42b07b4
INFO[0000] Log in successful
25. Let’s try Rio !!
Let’s try Service Mesh
1.Create a new service
$ rio run -p 80/http --name test/svc --scale=3 ibuildthecloud/demo:v1
test-124a4837:svc
2.Ensure service is running and determine public URL
$ rio ps
NAME IMAGE CREATED SCALE STATE ENDPOINT DETAIL
test/svc ibuildthecloud/demo:v1 2 minutes ago 3 active http://svc.test.p0pbky.lb.rancher.cloud
3.Stage new version, updating just the docker image and assigning it to "v3"
version.
$ rio stage --image=ibuildthecloud/demo:v3 test/svc:v3
test-124a4837:svc
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 9 minutes ago 3 active http://svc.test.p0pbky.lb.rancher.cloud
test/svc:v3 ibuildthecloud/demo:v3 9 minutes ago 3 active http://svc-v3.test.p0pbky.lb.rancher.cloud
26. Let’s try Rio !!
5.Access current service
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World
6.Access staged service under new URL
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World v3
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
27. 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
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World v3
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World v3
10.Happy with the new version we promote the stage version to be the primary
$ rio promote test/svc:v3
11.All new traffic is v3
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World v3
$ curl -s http://svc.test.p0pbky.lb.rancher.cloud
Hello World v3
28. Command Reference
NAME:
rio - Containers made simple, as they should be
USAGE:
rio [global options] command [command options] [arguments...]
VERSION:
v0.0.3
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
events Stream change events
wait Wait for resources service, stack
login Login into Rio
help, h Shows a list of commands or help for one command
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 command
29. Command Reference
Basic Commands (Beginner):
create Create a resource from a file or from stdin.
expose Take a replication controller, service, deployment or pod and
expose it as a new
Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects
run-container Run a particular image on the cluster. This command is
deprecated, use "run"
instead
Basic Commands (Intermediate):
get Display one or many resources
explain Documentation of resources
edit Edit a resource on the server
delete Delete resources by filenames, stdin, resources and names, or by
resources and
label selector
Deploy Commands:
rollout Manage the rollout of a resource
rolling-update Perform a rolling update of the given ReplicationController
scale Set a new size for a Deployment, ReplicaSet, Replication Controller,
or Job
autoscale Auto-scale a Deployment, ReplicaSet, or ReplicationController
Cluster Management Commands:
certificate Modify certificate resources.
cluster-info Display cluster info
top Display Resource (CPU/Memory/Storage) usage.
cordon Mark node as unschedulable
uncordon Mark node as schedulable
drain Drain node in preparation for maintenance
taint Update the taints on one or more nodes
Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
logs Print the logs for a container in a pod
attach Attach to a running container
exec Execute a command in a container
port-forward Forward one or more local ports to a pod
proxy Run a proxy to the Kubernetes API server
cp Copy files and directories to and from containers.
auth Inspect authorization
Advanced Commands:
apply Apply a configuration to a resource by filename or stdin
patch Update field(s) of a resource using strategic merge patch
replace Replace a resource by filename or stdin
convert Convert config files between different API versions
Settings Commands:
label Update the labels on a resource
annotate Update the annotations on a resource
completion Output shell completion code for the specified shell (bash or zsh)
Other Commands:
api-versions Print the supported API versions on the server, in the form of
"group/version"
config Modify kubeconfig files
help Help about any command
plugin Runs a command-line plugin
version Print the client and server version information
Usage:
kubectl [flags] [options]
Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all
commands).
rio kubectl command