Saputro Aryulianto [email protected] Operations Boot Camp I RancherOS The perfect place to run Docker
Hi,
● Ary● System Administrator at Pusilkom UI for
General Elections Commissions of Republic of Indonesia ● OpenStack Engineer at PT. Boer Technology (Btech)● GNU/Linux Bogor (GLiB) Activist ● Local Commitee at GNOME.Asia Summit 2015● Speakers at openSUSE.Asia Summit 2016● Amateur Dota2 Player :)
3
Overview of
4
Never Search On Google Images!
5
Overview of RancherOS
● RancherOS is a minimalist Linux distribution perfect for running Docker containers. By running Docker directly on top of the kernel and delivering Linux services as containers, RancherOS delivers just what you need to build what you want.
6
H/W Requirement
● x86_64 server with at least 512MB of RAM.– If you are planning on installing to disk, you will need at
least 1024MB of RAM.
7
How This Works
8
How This Works
● Everything in RancherOS is a Docker container. We accomplish this by launching two instances of Docker.
● One is what we call the system Docker which runs as the first process. System Docker then launches a container that runs the user Docker. The user Docker is then the instance that gets primarily used to create containers.
●
9
Quick Start Guide
10
Launching RancherOS Using Docker Machine
● Launching RancerOS Using Docker Machine– docker-machine create -d virtualbox --virtualbox-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso <MACHINE-NAME>
● That’s it! You’re up and running a RancherOS instance.
11
Launching RancherOS Using Docker Machine
● To login to the instance, just use the docker-machine command.– docker-machine ssh <MACHINE-NAME>
● Point your docker client to the docker daemon inside the VM– eval $(docker-machine env rancherosary)
● Test!– docker run -p 80:80 -p 443:443 -d nginx
12
Installing RancherOS to disk
13
Managing Versions
● You can find the current version of your operating system by running the command:– [rancher@rancheros-99 ~]$ sudo ros os version
v0.7.0● To view all available releases:
– [rancher@rancheros-99 ~]$ sudo ros os list
rancher/os:v0.7.0 remote
rancher/os:v0.7.1 remote
rancher/os:v0.8.0 remote
14
Managing Versions
● You can install the latest stable version by running the command ros os upgrade or by selecting a version with the -i parameter:– [rancher@rancheros-99 ~]$ sudo ros os upgrade -i rancher/os:v0.9.0
15
Managing Docker Versions
● To view available versions:– [rancher@rancheros-99 ~]$ sudo ros engine list
disabled docker-1.10.3
disabled docker-1.11.2
current docker-1.12.1
16
Managing Docker Versions
● To switch version:– [rancher@rancheros-99 ~]$ sudo ros engine switch docker-1.11.2
INFO[0000] Project [os]: Starting project
INFO[0000] [0/19] [docker]: Starting
…
INFO[0010] Recreating docker
INFO[0010] [1/19] [docker]: Started
17
Docker Swarm Clusters on RancherOS
18
Topology
19
Docker Swarm
● We’ll start by making our Docker Swarm cluster– docker swarm init --advertise-addr 192.168.0.100
● Join worker to Swarm Cluster– docker swarm join \
--token SWMTKN-1xxxxxxxxxxx● Verify node on Manager
– docker node ls
20
Reference
● https://docs.rancher.com/os/● https://blog.selectel.com/virtual-private-cloud-co
reos-rancheros/
21
Q & A
22
Thank You!
23
Keep in Touch :)
● www.aryulianto.com● https://www.twitter.com/saputroyulianto● https://www.facebook.com/saputroaryulianto● https://www.linkedin.com/in/aryulianto● https://t.me/aryulianto ● Telegram: @aryulianto