How to set up a CoreOS cluster on Ubuntu server


Step 1: Install Vagrant and VirtualBox (can be VMWare)
Step 2: Clone coreos-vagrant repository
Step 3: Config and start a cluster

Step 1: Install Vagrant and VirtualBox (can be VMWare)

CoreOS, Linux for Massive Server Deployments.

CoreOS is a new Linux distribution that has been re-architected to provide features needed to run modern infrastructure stacks. The strategies and architectures that influence CoreOS allow companies like Google, Facebook and Twitter to run their services at scale with high resilience.

First of all, let's download some virtualization providers to run CoreOS.We are going to use VirtualBox/Vagrant to virtualize your cluster.

Type this to start:
$ sudo apt-get update && sudo apt-get dist-upgrade -y
if, you are under a corporative proxy, you may not have connection to internet, so make sure your proxy is well configured.


After install VirtualBox let's make sure we have configure our apt sources list to be able to download VirtualBox latest version.


$ sudo vim /etc/apt/sources.list

Add one of the following lines according to your distribution to your /etc/apt/sources.list: at the end of the text.

Note: type letter " i " to edit

deb trusty contrib 
deb saucy contrib 
deb raring contrib 
deb quantal contrib 
deb precise contrib 
deb lucid contrib non-free 
deb wheezy contrib 
deb squeeze contrib non-free

Then save.
Note: press ":wq" then "enter" w: write, q: quit

The Oracle public key for apt-secure can be downloaded and set it with the following command:

$ wget -q -O- | sudo apt-key add -

To install VirtualBox:
$ sudo apt-get update && sudo apt-get install virtualbox-4.3

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

$ sudo apt-get install dkms

This is the same as the steps above, let's say "the short answers"
$ echo "deb trusty contrib" | sudo tee -a /etc/apt/sources.list > /dev/null wget -q -O- | sudo apt-key add - 
$ sudo apt-get update 
$ sudo apt-get install linux-headers-3.13.0-35-generic -y 
$ sudo apt-get install virtualbox-4.3 -y 
$ sudo /etc/init.d/vboxdrv setup

Then we should reboot our server
$ sudo reboot


There are install packages available for Windows, Linux and OSX. Find the latest installer on the Vagrant downloads page. Be sure to get version 1.6.3 or greater.

Just type:

$ wget

$ sudo dpkg --install vagrant_1.7.1_x86_64.deb

for 32 bits
$ wget
$ sudo dpkg --install vagrant_1.7.1_i686.deb

That is going to take a few minutes. Once the process had finished, you should be able to run the Vagrant and VirtualBox binaries.

Let's try them:

$ vboxmanage -v && vagrant --version

Make sure you have the correct version for each:

  • VirtualBox 4.3 or greater
  • Vagrant 1.6.3 or greater

Step 2: Clone coreos-vagrant repository

Let's try them:
$ sudo git clone
$ cd coreos-vagrant

Step 3: Config and start a cluster


CoreOS allows you to configure machine parameters, launch systemd units on start-up and more via cloud-config. Jump over to the docs to learn about the supported features. You can provide cloud-config data to your CoreOS Vagrant VM by editing the user-data file inside of the cloned directory. A sample file user-data.sample exists as a base and must be renamed to user-data for it to be processed.

If you need to update your cloud-config later on, run vagrant reload --provision to reboot your VM and apply the new file.


The config.rb.sample file contains a few useful settings about your Vagrant environment and most importantly, how many machines you'd like in your cluster.

CoreOS is designed to be updated automatically with different schedules per channel. Select the channel you'd like to use for this cluster below:


The Stable channel should be used by production clusters. Versions of CoreOS are battle-tested within the Beta and Alpha channels before being promoted. Current version is CoreOS 494.5.0.

Rename the file to config.rb then uncomment and modify:

# Size of the CoreOS cluster created by Vagrant
# Official CoreOS channel from which updates should be downloaded


The beta channel consists of promoted alpha releases. Current version is CoreOS 522.2.0.
Rename the file to config.rb then uncomment and modify:

# Size of the CoreOS cluster created by Vagrant
# Official CoreOS channel from which updates should be downloaded


The alpha channel closely tracks master and is released to frequently. The newest versions of docker, etcd and fleet will be available for testing. Current version is CoreOS 540.0.0.

Rename the file to config.rb and modify a few lines:

# Size of the CoreOS cluster created by Vagrant
# Official CoreOS channel from which updates should be downloaded

Start Machines Using Vagrant's default VirtualBox Provider

Start the machine(s):
$ sudo vagrant up
List the status of the running machines:
$ sudo vagrant status
Connect to one of the machines:
$ sudo vagrant ssh core-01 -A

If you can't connect to the virtual machines, you may have not configure the 64-bit virtualization extensions. To turn on this option try this:

On bare metal:
  1. Press LEFT-SHIFT to enter to BIOS
  2. Look for "enabiling 64-bit virtualization" or look for "VT-x", they are the same thing.
  3. Reboot
On VMWare:

  1. Power off vmware vitrual machine.
  2. Go to "edit virtual machine settings"
  3. Go to processors. There are three checkboxes there.
  4. Check second checkbox (enable VT-x/AMD-V)
  5. Power on machine.
On VirtualBox:
  1. Power off VB vitrual machine.
  2. Go to "edit virtual machine settings"
  3. Go to system. There are three tabs there.
  4. Go to acceleration tab then (enable VT-x/AMD-V)
  5. Power on machine.

Start Machines Using Vagrant's VMware Provider

If you have purchased the VMware Vagrant provider, run the following commands:
$ sudo vagrant up --provider vmware_fusion
$ sudo vagrant ssh core-01 -A

And that's it !

Cheers :)


Popular posts from this blog

How to implement OAuth 2.0 server with Redis

Como crear una aplicación .NET Core y almacenarla en un contenedor de Docker usando Visual Studio

Integrar Web API de .NET en proyecto de Xamarin.Forms utilizando Visual Studio y Azure API App

Ejecutar pruebas de volumen con Visual Studio y Team Service

Enviar mensajes cloud-to-device a Raspberry con Docker, .NET Core y Web App On Linux (parte III - Azure IoT Hub cloud-to-device API)