RancherOS
I first heard about Rancher back in November 2015. I figured I would give RancherOS another look and see how it’s doing.
RancherOS has an intreguing concept: A base OS that uses Docker containers for everything in the userspace.
RancherOS
- Rancher OS : A Tiny Linux Distribution designed for running Docker Containers.
- A novel feature of RancherOS is that it operates all userspace functionality as a Docker container.
- Download iso from https://github.com/rancher/os/releases
- RancherOS has two Docker Daemons: a system-level and a user-level.
- The system-docker command is used for accessing and controlling the system-level Docker daemon.
- The docker command is used for accessing and controlling the user-level Docker daemon.
-
After booting, the system-docker ps command will list all of the system-level Docker containers.
- Rancher does not have an init system.
- Any commands to be run on startup must be placed in /opt/rancher/bin/start.sh
Run cAdvisor Docker on the System level
Install to Disk
- Boot from the ISO
- Use the ros install command to install to a disk.
- The cloud-config file will be written to /var/lib/rancher/conf/cloud-config.yml and can be modified any time.
- After installation, the system will not boot to an interactive console.
Cloud-Config
- RancherOS state is controlled by a cloud-config file.
- On AWS, RancherOS supports loading the cloud-config from the user-data.
- On-Disk, RancherOS stores the cloud-config data in /var/lib/rancher/conf/cloud-config.yml
ros command
- The ros command is used to edit the configuration of the system
- To see the DNS configuration of the system: ros config get rancher.network.dns.nameservers
- Export the current cloud-config: ros config export
- Validate a cloud-config file: ros config validate -i cloud-config.yml
RancherOS Console
- The RancherOS console is itself a Docker container.
- The RancherOS console uses BusyBox by default.
- The RancherOS console can be switched to another docker-based OS, like Ubuntu.
- To switch the RancherOS console, use the ros command: ros console switch ubuntu
- RancherOS Supported Consoles are:
- default (busybox)
- alpine
- centos
- debian
- fedora
- ubuntu
- The non-default consoles share /home and /opt with the underlying host, so any changes made there will not be lost between reboots.