Skip to content
GunSik2 edited this page Nov 5, 2015 · 3 revisions

Sub projects

  • Rancher is a complete platform for operating Docker in production.
  • RancherOS is a 20mb Linux distro that runs the entire OS as Docker containers
  • Convoy is Docker storage driver for backup and recovery of Docker volumes

Rancher

Launching management server with Vagrant

git clone https://github.com/rancher/rancher
vagrant up

Launching management server manually

docker run -d --restart=always -p 8080:8080 rancher/server

Add Hosts

  • go to UI (eg. http://172.19.8.100:8080).
  • go to Infrastructure > Hosts, and click Add Host.
  • copy a command to use to add hosts, and edit command and insert "-e CATTLE_AGENT_IP=<server_ip>"
docker run -e CATTLE_AGENT_IP=172.19.8.3 -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.8.2 http://172.19.8.100:8080/v1/scripts/1A009C4AA50B75158D5D:1446742800000:Vd9dCcRD64laYPibNxlrWGkyFHE

Create Containers through UI

  • In the newly added host, click +Add Container

Create Containers through Docker CLI

docker run -it --name=app3 ubuntu:14.04.2  # docker daemon assigned ip
docker run -it --label io.rancher.container.network=true  --name=app4 ubuntu:14.04.2 # Rancher’s overlay network

RancherOS

Running RancherOS

git clone https://github.com/rancher/os-vagrant
cd os-vagrant
vagrant up
vagrant ssh

Upgrade

docker ps
sudo system-docker ps
sudo ranchectl -v
sudo ranchectl os list
sudo ranchectl os upgrade

Downgrade

sudo ranchectl -v
sudo ranchectl os list
sudo ranchectl os upgrade -i rancher/os:v0.7.0

Convoy

Backup

sudo docker run -it -v vol1:/vol1 --volume-driver=convoy ubuntu
# touch /vol1/foo
# exit
sudo convoy snapshot create vol1 --name snap1
sudo convoy backup create snap1 --dest s3://convoy-demo@us-west-2/

Restore

sudo convoy create vol1 --backup s3://convoy-demo@us-west-2/?backup=7a07c344-...-2898604baad3
sudo docker run -it -v vol1:/vol1 --volume-driver=convoy ubuntu
# ls /vol1/foo

Clone this wiki locally