Hyper Open Edge Cloud

How to Install a SlapOS Slave Node with VMware

A step by step guide to bootstrap a SlapOS Slave Node on VMWare Player
  • Last Update:2013-07-15
  • Version:002
  • Language:en

Installing SlapOS Slave Node with VMWare

The goal of this tutorial is to explain how to install SlapOS on a virtual machine using the SlapOS system image. With this approach, it is possible to add a new SlapOS Slave node in very short time and with little effort.

Agenda

  • The Requirements
  • The Computer
  • Customize image

The tutorial is split into 4 parts. First we shall list the requirements to install SlapOS on a virtual machine. Second, we will explain how to add so-called Computer to VIFIB. Then we will explain how to generate and configure your virtual machine. We will finaly explain how to monitor each computer.

The Requirements

  • A SlapOS Master (slapos.org) Account
  • VMware player

In order to install SlapOS in a virtual machine, there are a couple of requirements. First, you need to have an account on www.slapos.org or any other SlapOS Master. You can get such an account for free by subsribing to slapos.org. The subscription form is available each time you try to login.

In order to run SlapOS virtual machine you will need VMware player installed. You can download it here.

# Download the ".bundle" file for your linux distribuition (32 or 64 bits).
# In case the extension is .txt change it to .bundle 
 chmod +x VMware-Player-4.0.2-591240.x86_64.bunble 
 gksudo ./VMware-Player-4.0.2-591240.x86_64.bunble 
# And follow instructions
    

Customize image

# Download http://community.slapos.org/download/latest-vmx
tar -xzf SlapOS_Image.x86_64-latest.vmx.tar.gz

You can now open vmware player. Choose Open a virtual machine and choose yours. Then go to configuration and change network adaptater to "NAT".

First download the SlapOS image. This image was created with SuSE studio. It is a virtual machine which can be run on every player supporting ".vmdk" files. SuSE studio can also generate images for USB drive, Hard disk, qemu, etc. for those who want to try SlapOS on on a bare metal server rather than on a virtual machine please follow this tutorial. After the download is completed, unpack the image with tar.

Boot

You can now boot. Wait for the boot sequence too finish. At the end connect as root. Login is :"root" and password is "linux". Then run:

# Run command:
slapprepare

# After a few seconds, it will ask you a few questions:

Automatically register new computer to Vifib? [y,n]:

# If you don't have any configuration ready answer "Y" else "N"

# You will be asked for a name of a computer. As name put something you will remenber as identification.
Do you want the setup to allow virtual machines inside this node?
# It is safer to answer "no" here, as a virtual machine inside a virtual machine has no sense.
Number of SlapOS partitions for this computer? 

# You can put the value you want. We advise a 20.

Is this a virtual Machine? [y,n]:

# Answer "y"

Do you want to use vpn to provide ipv6? [y,n]:

# It is better to put "y" to have a more stable ipv6

Do you want to force the use lxc on this computer? [y,n]:

# If you plan to use LXC on this container answer 'y' else 'no'

Do you want a remote ssh access? [y,n]:

# WARNING: Slapprepare install a boot script which reset root password after this run and on each boot.
If you do not want to loose access to your computer answer 'Y' and prepare a valide ssh public key available on internet

# A dialog will then ask you to confirm this values. If everything seems right, you can confirm.
You will be asked for your slapos community login and password.
You will also be asked for a ssh key. Enter the url of your public ssh key.

Once all software is installed, SlapOS will format the server. Formatting the server in SlapOS world means that 100 IPv6 adresses and 100 tap interfaces will be created and bridged. 100 users and 100 directories will also be created. Every resource which is executed on a SlapOS server is attached to its dedicated address, user and directory. This creates a simple form of compartment between processes without the overload of virtualization or chrooting.

The result of server formatting is the uploaded to https://www.slapos.org.

Note about slapos configuration: If you already have your slapos configuration (slapos.cfg, certificate, key) place it in "/etc/opt/slapos/" or "/etc/slapos" before running "slapprepare" command. To use ipv6 provided by vifib add line "ipv6_interface = tapVPN" in [slapformat] part in slapos.cfg .

Note about ipv6: If you don't have ipv6 on your network the key will connect automaticaly in vpn to a server to get a reliable ipv6. If your ipv6 connection is not reliable you can force the use of Vifib ipv6 by naming a file "openvpn-needed" in the directory containing slapos.cfg (by default /etc/opt/slapos/) .

What Next?

Now that you know how to install a SlapOS Slave Node, you can contribute by adding computers.