VIFIB DESCENTRALIZED CLOUD COMPUTING

SlapOS is a decentralized Cloud Computing technology that can automate the deployment and configuration of applications in a heterogeneous environment.

Installing a SlapOS Slave Node

SlapOS - Install Slave Node

This tutorial will guide you through the process of installing a SlapOS slave node on a computer. Make sure to have read the SlapOS architecture and SlapOS system requirements design documents to understand the relation between SlapOS Master and SlapOS Slave nodes and what nodes are used for in a network.

For this tutorial you will require a SlapOS Master to register your node (for example Vifib or install your own SlapOS Master), and another computer on which to install the SlapOS slave node. The tutorial will use an arbitrary GNU/Linux server from a cloud provider (Debian8, available for example from OVH or Online.net) with wget installed.

Note, that there is one Slave node referred to as COMP-0 throughout the documentation, which provides services to SlapOS Master (COMP-ROOT) and other nodes in the network (called COMP-1,2,3...). The installation for COMP-0 is slightly different from the default installation. Differences will be pointed out in this tutorial.

Table of Content

  • Single Line Installer
  • Upgrading SlapOS slave node
  • Other Methods of Installation

Single Line Installer

SlapOS Node Installation - Command Line Installer

The easiest way to install and upgrade a SlapOS node is using the single line installer.

The installation differs for COMP-0 and normal nodes COMP-1,2,3, because the first needs to provide a Frontend (Apache) and the Re6st Registry to the SlapOS Master for IPv6 to work. Installing COMP-0 before IPv6 is available, means:

  • (done here)
  • 1. get SlapOS Master token
  • 2. add temporary IPv6
  • 3. install Slapos node
  • (done in configuring a SlapOS node)
  • 4. provide Frontend (Apache)
  • 5. provide Re6st Registry
  • 6. remove temporary IPv6
  • 7. get Re6st token from Registry
  • 8. install Re6st node (done in how to install Re6st - adds back IPv6)

COMP-1,2,3... are easier as IPv6 is available:

  • 1. get Re6st token from Registry
  • 2. install Re6st node (done in how to install Re6st - adds IPv6)
  • 3. get SlapOS Master token
  • 4. install SlapOS node

Get SlapOS Master Token

SlapOS Node Installation - Request Association Token

If you are setting up COMP-0, this is your first step. For COMP-1,2,3..., please start by requesting a Re6st token from the Registry and installing Re6st before continuing here.

When using the single line installer (and other ways of installing a SlapOS node), you will have to provide a X509 security token to identifiy your node with the SlapOS Master and enable it to manage the node within a network. The token can be requested in the SlapOS Master Dashboard. If you have no master to connect to, you can register your node with Vifib, create your own SlapOS Master or setup a node without associating it with a Master (not really useful).

Head to your SlapOS Dashboard and click on the Servers menu link to go to your list of servers. In the subheader, click Token to request a new token for associating a SlapOS Node with your network.

Association Token

SlapOS Node Installation - Association Token

Proceed to request a token. Once it's generated, copy the token, make sure, you have ssh access and head to the terminal to access your server. We will need the token during the installation process.

Temporary IPv6 Address

SlapOS Node Installation - Temporary IPv6 Adress

For COMP-1,2,3... you can skip this slide, because Re6st will handle IPv6 setup.

COMP-0 cannot use Re6st yet, because we will install it during configuration of this node. In the meantime, we need a temporary IPv6 address. Switch to root mode and start by adding the temporary IPv6 range:

sudo su

# include temporary IPv6 on lo
ip -6 addr add fc01::1/32 dev lo

More rationale: SlapOS requires an IPv6 network and uses Re6st for enabling IPv6 in heterogenous environments (distributed machines, different types).

To setup a Re6st node which can provide IPv6 connectivity, a Re6st Registry is required. It will be deployed on COMP-0 together with the first Re6st "gateway" node. But in order to deploy it, SlapOS needs to be installed and to install SlapOS, IPv6 is required. Hence a temporary IPv6 adress until the Registry is available, at which point it will be removed again and installation of the Re6st node will add the correct IPv6 (back) automatically.

Install SlapOS Node

SlapOS Node Installation - Install SlapOS Node

Continue and use the single line installer:

wget deploy.erp5.net/slapos && bash slapos

You will be asked a set of questions at some point during the installation:

What is the url to the SlapOS Master API?  (ignore if you already have a configured re6st and slapos): [https://slap.vifib.com/]: 
What is the url to the SlapOS Master Website?  (ignore if you already have a configured re6st and slapos): [https://slapos.vifib.com/]: 
What is this computer name?  (ignore if you already have a configured re6st and slapos): [noname]: Slave-I
If you have slapos token if you have (ignore if you already have a configured slapos): [notoken]: xxxxxxxx-xxxxxx

If you are connecting to your own master, on the first question, please point to port 5543 of your master's IPv4 adress, so enter https://[IPv4]:5543 and on the second question, please add your SlapOS Master dashboard url: https://[IPv4]:443/erp5/web_site_module/hostingjs/ If connecting to the Vifib Master, skip the first two questions (press enter).

Choose a name for your computer to identity it in your network and finally enter the association token you have received from your SlapOS Master. You can repeat the installation in case something goes wrong or you would like to change some of the entered parameters.

SlapOS Dashboard - Registered Servers

SlapOS - Server List

Once the installation has finished without errors, you should see:

...
PLAY RECAP *********************************************************************
127.0.0.1                  : ok=12   changed=4   unreachable=0   failed=0

Head back to your SlapOS Dashboard and verify the list of servers includes your SlapOS Node which was associated to your network using the token you had created. You may have to refresh the page for the server to show up.

The entry has three clickable areas:

  • The line itself (click server name for example) points to the server configuration (see configuring SlapOS Slave node tutorial).
  • Clicking the Computer button will open the monitor (how to monitor a SlapOS Node) - the green color indicates the server is active and contacting master.
  • As this server does not have any computer partitions installed yet, the second button next to Computer is still missing (see how to monitor a computer partition for more info).

Continue to configure the SlapOS node by adding the Re6st Registry (COMP-0) or other software you want to provide over the network (COMP-1,2,3...).

Upgrading SlapOS Node

SlapOS Node - single line installer

Upgrading a SlapOS node is trivial. Just use the single line installer again

wget deploy.erp5.net/slapos && bash slapos

This will upgrade the node, but not it's configuration since this is determined by the master.

Other Methods of Installation

Over time there have been various other ways of installing a SlapOS node including installation from packages or source, as well as on a Virtual Machines, on a Windows machine (experimental) or via USB stick (experimental). This chapter provides an overview of the various methods. However, the recommended way is to use the single line installer.

Installing SlapOS Node from Packages

SlapOS Installation from Package - Distributions

Installing from Packages has been depreciated but should still work. You will also need a GNU/Linux server with wget and in addition Python 2.6/2.7. installed. Locate your distribution from the list below and run the given commands. If your distribution is not listed, try installing from sources (depreciated and discouraged).


Debian 8

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_8.0/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_8.0/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Debain 7

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Debian 6

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_6.0/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_6.0/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 16.10

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_16.10/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_16.10/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 16.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_16.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_16.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 15.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_15.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_15.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 14.10

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_14.10/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_14.10/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 14.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_14.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_14.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

OpenSUSE 12.3

sudo zypper addrepo -fc -n "SlapOS Official repo" http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.3/ slapos
sudo zypper install slapos.node

CentOS 6

sudo wget https://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_7/home:VIFIBnexedi.repo -O /etc/yum.repos.d/slapos.repo
sudo rpm --import http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_7/repodata/repomd.xml.key
sudo yum install slapos.node -y

CentOS 6

sudo wget https://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/home:VIFIBnexedi.repo -O /etc/yum.repos.d/slapos.repo
sudo rpm --import http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/repodata/repomd.xml.key
sudo yum install slapos.node -y

For the following older distributions replace the first line with the line corresponding to your distribution version, run reload and install:


Ubuntu 10.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_10.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_10.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 11.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_11.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_11.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 11.10

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_11.10/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_11.10/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 12.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_12.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_12.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 12.10

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_12.10/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_12.10/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Ubuntu 13.04

sudo su
echo "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_13.04/ ./" | tee /etc/apt/sources.list.d/slapos.list
wget -O- "https://download.opensuse.org/repositories/home:/VIFIBnexedi/xUbuntu_13.04/Release.key" | apt-key add -
apt-get update; apt-get install slapos-node

Fedora 17 (No longer working)

sudo wget https://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_17/home:VIFIBnexedi.repo -O /etc/yum.repos.d/slapos.repo
sudo rpm --import http://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_17/repodata/repomd.xml.key
sudo yum install slapos.node -y

Fedora 18 (No loger working)

sudo wget https://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_18/home:VIFIBnexedi.repo -O /etc/yum.repos.d/slapos.repo
sudo rpm --import http://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_18/repodata/repomd.xml.key
sudo yum install slapos.node -y

OpenSUSE 12.1


sudo zypper addrepo -fc -n "SlapOS Official repo" http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.1/ slapos
sudo zypper install slapos.node

OpenSUSE 12.2


sudo zypper addrepo -fc -n "SlapOS Official repo" http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.2/ slapos
sudo zypper install slapos.node

Installing SlapOS Node from Sources

SlapOS Installing from Source

Installing from sources is depreciated and discouraged. It is however useful to understand the architecture of SlapOS from a practical point of view. You will need a GNU/Linux Server with Python 2.6/2.7 as well as:

  • gcc and the g++ compiler
  • make and patch tools
  • linux headers for tunneling tools
  • uml-utilities and bridge-utils for bridge tools

In Debian-like distributions you can install them with the following commands (with root privileges):

# apt-get install python gcc g++ make uml-utilities bridge-utils linux-headers-$(uname -r) patch wget

Your GNU/Linux server should either be connected to the Internet with native IPv6 global address. Or it should have a public IPv4 address. For servers with only a public IPv4 please head over to how to install IPv6 on a server using vifib.com.

A SlapOS Slave node is composed of computer partitions. As a reminder, a partition on a Slave node consists of a UNIX user, his directory, a dedicated tap interface and a dedicated IPv6 address. Whenever a software instance is requested to SlapOS Master, SlapOS Master looks for free partitions on every registered Slave Node and chooses one depending on specific service level parameters specified by the user. The chosen SlapOS Node is then requested to instantiate the user-specified software into an free computer partition. Whenever a software instance is no longer used, it is deleted from the Slave Node it was previously allocated to and the computer partition is freed and again available.

The installation process of SlapOS Slave node installs a couple of python scripts. Most important ones are:

  • slapos node format invoked to create users, directories, tap interfaces and IPv6 addresses for every service of each computer partition.
  • slapos node instance/software, relies on slapgrid core API which implements the SLAP protocol and requests to SlapOS Master Node which software to install, to instanciate, to account usage and to delete.
  • slapos node console provides a command line environment to contact SlapOS Master.
  • slapos node provides access to the list of running processes in all computer partitions.

Copy/Paste the following shell script in your terminal:

# Download the example script, to build slapos on /opt/slapos
wget https://lab.nexedi.com/nexedi/slapos/raw/master/component/slapos/build.sh

# After download just run it.
bash build.sh

SlapOS is installed using Buildout, which downloads the source code, patches and binaries required to build a software on a given architecture. It handles dependencies between software components automatically.

First, a directory for SlapOS software is created by invoking mkdir /opt/slapos. We then move to the SlapOS software directory where a Buildout file is created which extends SlapOS's own buildout.cfg. Nothing will be downloaded, only a text file with a link to a URL is created.

Before starting the boostrap process, some environment variables are unset. This is mostly useless on most GNU/Linux distributions or UNIX-like operating systems but it prevents certain errors in a few GNU/Linux distributions with uncommon environment settings.

After this the bootstrap process is started after ensuring a recent version of python (2.6+) is available. The python invocation bootstraps buildout. The buildout invocation interpretes the buildout.cfg file and installs SlapOS on the server.

# Download default cron entries to slapos works automatically 

wget https://lab.nexedi.com/nexedi/slapos.package/raw/master/obs/slapos/debian/cron.d -O /etc/cron.d/slapos

Optionally it is now possible to define the cron configuration. Simply copy the example above. Adapt parameters if you did not follow the exact steps (not recommended). slapformat is invoked every hour so that if we any changes happen on the network (something not supposed to happen), the Master will eventually be notified. This is very useful in case server hardware is moved from one house to another, from one data center to another, etc.

Note: Your SlapOS node will run automatically every minute if you add those lines to your crontab. If you want to manually launch slapos node, do not add those lines.

Install SlapOS Node via USB

SlapOS - Install SlapOS Node via USB

Installing via a USB key containing the SlapOS system image is a quick (experimental!) way of adding a new SlapOS node. You will need a SlapOS Master to register your node. This can Vifib (how to register on vifib) or a any other master (tutorial to create a SlapOS Master). You will also require a USB stick (8GB+), a computer to download the disk image and create the USB key and a second computer/server to install the SlapOS node with at least 60GB SSD (SSD provides enough read/writes per second to support SlapOS multi-user load). WARNING: your second computer will be completely erased! by the USB key at the first boot, so make sure there is no valuable data on it.

To write the key (CLI), download the lastest SlapOS image. This image was created with SuSE studio and is a universal image which can be installed on a USB key or on a hard disk. Unpack the image using tar.

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

Plug the USB key into your PC, change to root (sudo su) and identify which device (/dev/sdX) is the one corresponding to the USB key

# identify device
sudo su
- lsblk

Write to the key.

# Write key
dd if=SlapOS_Image.x86_64-0.5.16.raw of=/dev/sdX

Insert the USB key into your second computer before ensuring its BIOS is configured to:

  • boot from USB key
  • enable virtualization if you want to host virtual machines
  • restart automatically after a power failure (APM setting)

Boot and once the boot sequence finishes, connect as root (login: "root", pw: "linux").

If you have your own SlapOS configuration (slapos.cfg, certificate, key), place it in your configuration in /etc/opt/slapos/ or /etc/slapos before running slapprepare. To use IPv6 provided by Vifib add a line ipv6_interface = tapVPN in the [slapformat] of your slapos.cfg. In case IPv6 is not available on your network, the key will connect automatically to a server via VPN to get a reliable IPv6. If you have IPv6 but your connection is not reliable you can force the use of Vifib IPv6 by naming a file called openvpn-needed in the directory containing slapos.cfg. Run slapprepare:

#Run command:
slapprepare

# Configuration question you will be asked during boot
Automatically register new computer to Vifib? [y,n]:
What should be the name of this computer? [name]:
Do you want the setup to allow virtual machines inside this node? [y, n]:
Number of SlapOS partitions for this computer? [number]:
Is this a virtual Machine? [y,n]:
Do you want to use SlapOS with a second disk ? [y,n]:
Do you want to use vpn to provide ipv6? [y,n]:
Do you want to force the use lxc on this computer? [y,n]:
Do you want a remote ssh access? [y,n]: 

If you don't want to register with Vifib enter "N" and follow the instructions, else enter "Y". Name your computer to identify it in the network, do not allow nested virtual machines, set 20 partitions, enter "N" for not labelling this computer a virtual machine, set "Y" to use and format(!) this computer's hard disk for SlapOS and opt to use VPN for IPv6 (more stable). Only select LXC if you plan to use them and have a valid ssh public key ready (Note, that slapprepare will install a boot script that resets the root password after each run and boot - use the ssh key to not loose access to your computer).

Confirm if everything is correct, add your Vifib login/password and enter the url of your public ssh key (use a service like pastebin to enter your public key and get a "raw" link).

Once all software has been installed, SlapOS will format the server creating 100 IPv6 adresses, users and directories with respective tab interfaces and bridges. Every resource which will be executed on a SlapOS server will be attached to its dedicated address, user and directory creating a simple form of compartments between processes without the overload of virtualization or chrooting. Once formatting is done, the results will be uploaded to the master you specified.

Install SlapOS Node on Virtual Machine

SlapOS - Installing SlapOS Node on a Virtual Machine

Installing a Slave Node on a VMWare virtual machine using the SlapOS sytem image is straightforward. You will need a machine with VMWare installed (download version 4.0) as well as well as a SlapOS Master to register with. This can be Vifib (how to register on vifib) or a any other master (creating your own Master).

Start by

# 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 
# follow instructions

Afterwards, download the latest SlapOS image. This image was created with SuSE studio and is a virtual machine which can be run on any player supporting .vmdk files. Unpack after download.

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

You can now open your VMware player. Choose Open a Virtual Machine and select yours. Head over to the configuration and change the network adapter to NAT.

Boot and once the boot sequence finishes, connect as root (login: "root", pw: "linux").

If you have your own SlapOS configuration (slapos.cfg, certificate, key), place it in your configuration in /etc/opt/slapos/ or /etc/slapos before running slapprepare. To use IPv6 provided by Vifib add a line ipv6_interface = tapVPN in the [slapformat] of your slapos.cfg. In case IPv6 is not available on your network, the key will connect automatically to a server via VPN to get a reliable IPv6. If you have IPv6 but your connection is not reliable you can force the use of Vifib IPv6 by naming a file called openvpn-needed in the directory containing slapos.cfg. Run slapprepare:

#Run command:
slapprepare

# Confuguration questions you will be asked during boot
Automatically register new computer to Vifib? [y,n]:
What should be the name of this computer? [name]:
Do you want the setup to allow virtual machines inside this node? [y, n]:
Number of SlapOS partitions for this computer? [number]:
Is this a virtual Machine? [y,n]:
Do you want to use vpn to provide ipv6? [y,n]:
Do you want to force the use lxc on this computer? [y,n]:
Do you want a remote ssh access? [y,n]: 

If you don't want to register with Vifib enter "N", name your computer to identify it in the network, do not allow nested virtual machines, set 20 partitions, confirm this is a virtual machine and to use VPN for IPv6 (more stable). Only select LXC if you plan to use them and have a valid ssh public key ready (Note, that slapprepare will install a boot script that resets the root password after each run and boot - use the ssh key to not loose access to your computer).

Confirm if everything is correct, add your Vifib login/password and enter the url of your public ssh key (use a service like pastebin to enter your public key and get a "raw" link).

Once all software has been installed, SlapOS will format the server creating 100 IPv6 adresses, users and directories with respective tab interfaces and bridges. Every resource which will be executed on a SlapOS server will be attached to its dedicated address, user and directory creating a simple form of compartments between processes without the overload of virtualization or chrooting. Once formatting is done, the results will be uploaded to the master you specified.

Install SlapOS Node on Windows (Cygwin)

SlapOS - Install SlapOS Node on Windows

Installing a SlapOS node on Windows was an experimental! attempt covering installation of Cygwin and installation of SlapOS from sources (no longer working). You will need a Windows machine as well as a SlapOS Master to register with. This can be Vifib (how to register on vifib) or a any other master (creating your own Master).

Head to the Cygwin website and install Cygwin to downlaod the GUI installer. Note that the root directory of Cygwin (default: C:\cygwin) will become / during the installation. You also must have write access to the parent directory and be aware that any ACLs (access control lists) on the parent directory will determine access to the installed files.

SlapOS requires a number of packages beyond the minimal Cygwin installation (more info). Please choose the following packages:

apache         gcc4            libxslt-dev       readline
apache-dev     gcc4-core       make              rpcgen
autobuild      gcc4-c++        openldap          sqllite3
autoconf       git             openldap-dev      stunnel
automake       glib2.0         openssl           subversion
binutils       gtk+            openssl-dev       subversion-dev
bison          gtk2.0          patch             vim
bzr            libgtk2.0-dev   pkg-config        w32api
cmake          libtool         python            wget
cyrus-sasl     libxml2         python-libxlst    zlib
db4.5          libxml2-dev     python-libxml     zlib-dev
flex           libxslt         python-nummy

Once Cygwin is installed, double click the icon (or C:\cygwin\Cygwin.bat) and enter the following commands:

# create directory
$ mkdir -p /opt/slapos

# get source form windows branch
$ cd /opt/slapos
$ mkdir src
$ git clone -b windows http://git.erp5.org/repos/slapos.git src

# create /opt/slapos/buildout.cfg with content:
[buildout]
extends = src/component/slapos/buildout.cfg

# add openssl path to PATH so python 2.7 can find shared lib
$ export PATH=/opt/slapos/parts/openssl/bin:$PATH
$ echo PATH=/opt/slapos/parts/openssl/bin:$PATH >> ~/.bash_profile

# install SlapOS using buildout
$ cd /opt/slapos
$ python -S -c 'import urllib2;print urllib2.urlopen(\
    "http://www.nexedi.org/static/packages/source/slapos.buildout/bootstrap-1.5.3-dev-SlapOS-002.py" \
    ).read()' > bootstrap.py
$ python -S bootstrap.py
$ bin/buildout -v -N

Wait until buildout completes. Then

$ cd /opt/slapos
#env={} in python2.7 results in not finding required shared library
$ sed -i "s/env={}/env=None/g" `find eggs -name svcbackend.py`

If you have IPv6 you can skip this section. If you only have a public IPv4 but no native IPv6, configure a IPv6 tunnel:

# install IPv6
$ netsh interface ipv6 install

# configure Teredo Tunnel
$ netsh interface ipv6 set teredo client teredo.remlab.net 60

Validate IPv6 works (output should be similar)


$ netsh interface ipv6 show interface

Idx  Met   MTU    State         Name
---  ----  -----  ------------  -----
 14     0   1500  Connected     Wireless Network Connection
 13     0   1500  Disconnected  Local Area Connection
  9     0   1500  Connected     VirtualBox Host-Only Network
  4     2   1280  Connected     Teredo Tunneling Pseudo-Interface
  3     1   1280  Connected     6to4 Pseudo-Interface
  2     1   1280  Connected     Automatic Tunneling Pseudo-Interface
  1     0   1500  Connected     Loopback Pseudo-Interface

And ensure the state of Teredo Tunneling Pseudo-Interface is connected

Next configure SlapOS by creating /opt/slapos/slapos.cfg with:

[slapos]
software_root = /opt/slapgrid
instance_root = /srv/slapgrid
master_url = https://slap.vifib.com
computer_id = COMP-XXX
key_file = /etc/opt/slapos/key
cert_file = /etc/opt/slapos/certificate
certificate_repository_path = /etc/opt/slapos/pki/

[slapformat]
computer_xml = /etc/slapos/slapos.xml
log_file = /var/log/slapformat.log
partition_amount = 2
bridge_name = slapbr0
partition_base_name = slappart
user_base_name = slapuser
tap_base_name = slaptap

# choose any local network that doesn't conflict with current machine 
# configuration
ipv4_local_network = 192.168.0.0/16"

Replace the computer_id with the id you required from your master.

Create the directories and copy the key and certificate files which were generated before to /etc/slapos:

$ mkdir -p /etc/slapos/ski
$ mkdir -p /opt/slapgrid
$ mkdir -p /svr/slapgrid

Next, create the file /opt/slapos/computer_definition.cfg:

[computer]

[partition_0]
address = 192.168.128.28/255.255.255.0
user = slapuser0
network_interface = slapbr0
pathname = slappart0

[partition_1]
address = 192.168.128.32/255.255.255.0
user = slapuser1
network_interface = slapbr0
pathname = slappart1

Run slapformat to register the partitions:

$ cd /opt/slapos
$ bin/slapformat -c --alter_network=False --alter_user=False -i computer_definition.cfg slapos.cfg

Run slapgrid to check what should be done:

$ cd /opt/slapos
$ bin/slapgrid -c slapos.cfg

Everything should be ok and the SlapOS Slave Node is registered. Note, that running slapformat the first time will result in an error Device or resource busy.... On the second run, no more error should appear.

You can also use the windows installer (md5: 175829d0d6c7e3d41bb3458fba340c6b) directly. Set the root directory of Slapos to C:\slapos by default, then after installation you can redo the configuration above. The installer will also provide a SlapOS Console for running commands such as slapgrid, slapformat etc.

Thank You

Image Nexedi Office
  • Nexedi GmbH
  • 147 Rue du Ballon
  • 59110 La Madeleine
  • France