Date: 2016-10-04 Version: 1
Author: [email protected]
I just installed RancherOS on my FreeNAS-Machine See this gist. Afterwards this is a small writeup on what I did next.
See Quick Start Guide in the Rancher docs.
# Everything below via [rancher@rancher ~]$
sudo system-docker ps
sudo docker ps
There are two docker-daemons! The system-docker
runs only system services, the other one only client containers.
# Install and run "linux-dash" (a server-monitor)
$ sudo system-docker run -d --net=host --name busydash husseingalal/busydash
In the commad, we used --net=host
to tell System Docker not to containerize the container’s networking, and use the host’s networking instead. After running the container, you can see the monitoring server by accessing http://rancher
. To make the container survive use:
$ sudo mkdir -p /opt/rancher/bin
$ sudoedit /opt/rancher/bin/start.sh
# Autostart
# Update and Start busydash
sudo system-docker pull husseingalal/busydash
sudo system-docker start busydash
$ sudo chmod 755 /opt/rancher/bin/start.sh
The whole RancherOS isn't persistend. So everything gets lost after reboot.
$ sudo ros console enable ubuntu
This should enable persistence inside the following directories:
/home
/opt
/var/lib/docker
/var/lib/rancher
So after a reboot I'm greeted with a standard ubuntu shell. YEAY! After the usual stuff this should feel like home:
$ sudo apt-get update
$ sudo apt-get install git vim tmux zsh
$ git clone git clone https://github.com/s1lvester/mydotfiles .mydotfiles
... and so on.
If you're like me, then sooner or later you're going to FUBAR. The great thing about RancherOS is that state in which you're booting is defined by the kernel line. So here are my 2ct on how to fix upcoming issues.
- attach to the console in a second ssh-session to the FreenNAS-root.
- in the first session stop the rancheros-bhyve and restart. I used
sleep 2 && iohyve start rancheros
in order to get enough time to switch sessions - interrupt the grub-autoboot and press
e
- delete the state parameters and add
rancher.password=rancher
- you'll be able to login via console.
Thanks for this!
sudo ros enable console ubuntu
should be
sudo ros console enable ubuntu