Rancher OS

Rancher OS is a lightweight container operating system. It is designed to run docker without unnecessary libraries and service or even the need for a full underlying Linux/Windows operating system.

It can be downloaded from https://rancher.com/rancher-os/

In this article I will walk you through the steps of first booting and then installing Rancher OS inside Virtualbox.

I downloaded the rancher.iso version 1.5.5 and used Virtualbox 6.1.2.

  1. Start Virtualbox

  2. Navigate to the Machine Menu > Click New to start the VM creation wizard.

  3. Create Virtual Machine screen - Set the folder location to store the VM data and set the memory size to 2048 MB. Leave the Hard Disk set to Create a virtual hard drive now and click Create.

  4. Create Virtual Hard Drive - Ensure that Hard drive file type is set to VDI and that Storage on physical hard disk is set to Dynamically allocated and then click Create.

  5. Click on the newly created VM within the Oracle VM VirtualBox Manager and click settings. Navigate to the storage setting and add rancher.iso as a virtual optical disk and click OK.

  6. Start the RancherOS VM.

  7. RancherOS will boot and drop to a command prompt. Once there we can use ros install to install the image to disk.

  8. Firstly we need to create a yaml file called cloud-config.yml. This will contain an SSH key which will enable use to remotely access the OS from another machine.

  9. Create a SSH key and copy over the public key and add it to the cloud-config.yml file. The file should look like this :-

    #cloud-config

    ssh_authorized_keys:   - ssh-rsa AAA...
  10. Now run sudo ros install -c cloud-config.yml -d /dev/sda

  11. Answer Y to the confirmation screens and the VM will restart.

  12. Now SSH from you local machine into the RancherOS VM.

    ssh -i </path/to/private/ssh/key> rancher@<ipaddress>

  13. To ensure that everything looks correct run the following command

    sudo system-docker ps

  14. You should now see a number of docker containers that make up RancherOS.

    IMAGE

    rancher/os-docker:19.03.5

    rancher/os-console:v1.5.5

    rancher/os-base:v1.5.5

    rancher/os-base:v1.5.5

    rancher/os-base:v1.5.5

    rancher/container-crontab:v0.4.0

    rancher/os-acpid:v1.5.5

    rancher/os-syslog:v1.5.5

  15. To install any docker images simply execute the command below and the required docker images will be downloaded.

    run docker pull <image-name>

  16. https://hub.docker.com/ is a great source of templated images to get you started.

RancherOS gives you the facility to run docker with 1GB of RAM and with it’s simpler structure you should also benefit from less complexity and greater security.

Previous
Previous

Non functional requirements

Next
Next

Linux data manipulation