Compile Rancher OS for Raspberry Pi 3
Web agency » Digital news » Compile Rancher OS for Raspberry Pi 3

Compile Rancher OS for Raspberry Pi 3

Since Docker landed on the market, the market for server infrastructure, distributions and in the broad sense, the Cloud has been greatly disrupted. Among the actors, Rancher who is positioned on several fronts:

  • Distribution
  • Platform
  • Monitoring

Today is the distribution, soberly named Ranch OS that interests us.

Why Rancher OS is interesting?

  • A distribution dedicated to Docker
  • An ultra light distribution (~ 20MB)
  • Which isolates user containers from system containers. Indeed the PID 1 is none other than Docker. This runs system processes in Docker. Each user then has his own system of containerization separately.

Compilation

Today, Ranch OS was announced on ARM and more particularly for the Raspberry Pi (versions 2 and 3). This post is there to fill in the documentation not yet available and to explain how builder the image.

Prerequisites

To build Ranch OS you will need to install Docker.

Build the image

1
2
3
4
$git clones https://github.com/rancher/os.git
$ cd os/scripts/images/rpi-hypriot
$ dockerbuild -f Dockerfile.dapper –pull -t rancheros/rpi .
$ docker run -ti --privileged -v `pwd`/scripts/build.sh:/source/scripts/build.sh -v `pwd`/dist:/source/dist rancheros/rpi

If the build went well, you should have a .zip containing the image in the folder dist / .

1
2
$ ls -lh dist/
-rw-r–r– 1 root root 46M Apr 25 17:41 rancheros-rpi2.zip

Install Rancher OS on your microSD

1
2
3
4
5
6
$ cd dist
$unzip rancheros-rpi2.zip
Archive: rancheros-rpi2.zip
inflating: build/rancheros-rpi2.img
$ ls -lh build
-rw-r–r– 1 root root 500M Apr 25 15:41 rancheros-rpi2.img

At this time, you must know the device corresponding to your microSD (_ex: /dev/sdb)

1
$ sudo dd if=./build/rancheros-rpi2.img of=/dev/sdb bs=4k

Conclusion

It only takes 3 minutes watch in hand to compile and test Ranch OS on Raspberry Pi. This distribution sees sustained development and has a very interesting set of related products.

  • The default credentials are stake/stake.
  • Don't forget to enlarge the main partition (not / Boot) to use all available space on your microSD.

★ ★ ★ ★ ★