Skip to content

Instantly share code, notes, and snippets.

#cloud-config
rancher:
debug: true
#!/bin/bash
set -ex
INSTALLER_IMAGE=rancher/os:v0.7.1
ros config set rancher.network.interfaces.eth1.dhcp false
if grep eth2 /proc/net/dev; then
ros config set rancher.network.interfaces.eth0.dhcp false
ros config set rancher.network.interfaces.eth2.dhcp true
system-docker restart network
docker:
image: <image with custom Docker binaries>
command: /usr/bin/user-docker
environment:
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY
labels:
io.rancher.os.scope: system
io.rancher.os.after: console
Josh Curl is a software engineer at Rancher Labs.
Architecture of a Fully Containerized Linux Distro
Overview of RancherOS
RancherOS is the first operating system to run all system services as containers. This is done by replacing traditional init systems with Docker as PID 1. This allows RancherOS to keep a very minimal footprint; the latest ISO is only 41MB.
RancherOS runs two instances of Docker: one run as PID 1, called “System Docker”, and another instance of Docker that runs in a container, called “User Docker”. System Docker is intended to only run essential system services such as udev and NTP. The bulk of a user’s containers are expected to be run in User Docker.
Console and SSH

v0.7.1. Kernel Headers

There are two ways to include the service file. It can be hosted somewhere and then referenced via a cloud-config file.

#cloud-config
rancher:
  services_include:
    https://raw.githubusercontent.com/rancher/os-services/embedded-headers/k/kernel-headers.yml: true
#cloud-config
rancher:
log: true
#cloud-config
rancher:
debug: true
#cloud-config
rancher:
debug: true
#!/bin/bash
set -ex
INSTALLER_IMAGE=rancher/os:v0.7.0-rc7
if grep eth2 /proc/net/dev; then
ros config set rancher.network.interfaces.eth0.dhcp false
ros config set rancher.network.interfaces.eth1.dhcp false
ros config set rancher.network.interfaces.eth2.dhcp true
system-docker restart network
#cloud-config
runcmd:
- [mkswap, /dev/vdb]
- [swapon, /dev/vdb]