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 Node

This tutorial will guide you through the process of installing a SlapOS node on a computer. A regular node (referred to as COMP-123) is used by the SlapOS Master to install software on the node and then provide instances of this software within computer partitions. For details please refer to the SlapOS introduction.

For this tutorial you will require a SlapOS Master and (first) user account, which can either be your own installed SlapOS Master or a commercial service like Vifib to register your node and another computer on which to install the SlapOS 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 node referred to as COMP-0 throughout the documentation, which provides services to SlapOS Master (COMP-ROOT) besides regular nodes like the one we are going to install here (called COMP-1,2,3...).

Table of Content

  • SlapOS Node Installation

SlapOS Node Installation

The following steps will guide you through the installation of a SlapOS on a server. This includes handling both IPv6 connectivity to be able to access computer partitions and the eventaully instantiated software as well as installing the SlapOS node (including partitions) along with the SlapOS client.

If you are planning to use ViFiB (commercial services), the corresponding/differing steps for how to install a node with ViFiB are pointed out as well.

SlapOS Master Dashboard

SlapOS Interface - Dashboard

Start by logging into your SlapOS Master's Dashboard with you administrative user credentials at (preferred url):

https://master.YOUR_DOMAIN/

or:

https://[instance-IPv4]/erp5/web_site_module/hostingjs/

For using ViFiB start by creating a user account and then request a FreeFib token instead of the token shown here. Continue with the installation of Re6st on the node once you have the token.

List of Instantiated Services

SlapOS Dashboard - Add Service

Head to the list of services by clicking on the Services button on the side menu. The list will show all services currently instantiated (not the software currently installed!). To create an instance of an installed software, click the Add button in the subheader.

Create New Res6st Token Instance

SlapOS Dashboard - Select Service

Select Re6st as this is the service we want to create an instance from.

Select Re6st Service Version

SlapOS Dashboard - Select Service Version

Please choose the latest version.

Re6st Registry Configuration

SlapOS Dashboard - Re6st Token Service Configuration Parameters

Select Software Type Re6st Token which will load a form with instance-specific parameters.

Every new node that should be added to the network will require a token, so give this token a recognizable name (Re6st-TOKEN-[my_computer_name] for example).

Select the Computer on which the Registry of your SlapOS Master was installed at the bottom of the page, then click Proceed to instantiate the service. You will be forwarded to the list of current services. Refresh the page, it may take a few minute for the node to be instantiated and the token to appear. It is a single use token to connect one other node to the network, meaning that if the installation later fails for some reason, you need to destroy the instance token being created and create a new one.

Instantiate Re6st Token

SlapOS Dashboard - Service Re6st Token Instantiation

Refresh the list of instantiated services to make the token appear. Click on it to access the connection parameters.

Token Connection Parameters

SlapOS Interface - Re6st Token Connection Parameters

Locate the token in the Connection Parameters. It might require a few minutes to show up. Refresh the page to see whether the token has been instantiated.

With the token you can now install Re6st on your new machine.

Installing Re6st

sudo su
# yum install wget

(...)

# wget https://deploy.erp5.net/re6st && bash re6st

ssh into the terminal of your server, switch to root and verfiy wget is available. Then install re6st as shown above. At some point the script will ask you:

What is the Url of the Re6st registry [https://re6stnet.nexedi.com]:
Please insert your re6stnet token [notoken]:

Provide the master-url you noted when setting the port forwarding for the Re6st Registry in installing SlapOS node (Comp-0) - it should be http://[your_IPv4_address]:9201) along with the token created in the previous steps and continue. The setup should finish without errors:

...
PLAY RECAP *********************************************************************
127.0.0.1                  : ok=24   changed=7   unreachable=0   failed=0

If you are using ViFiB on a Linux machine, the command is slightly different:

$ sudo su
# wget https://deploy.erp5.net/gnet/re6st & bash re6st

# (you will need to enter your token when asked)

Verify Files Created

sudo su
# ls /etc/re6stnet/
ca.crt     cert.cert     cert.key     re6stnet.conf     README

Verify that the configuration files were created. You can also call:

echo "default" >> /etc/re6stnet/re6stnet.conf

and make the service is started by calling:

/etc/init.d/re6stnet restart

Verify Re6st is Running

sudo su
# service re6stnet status

You can use the above command to see whether Re6st is working. The output should be similar to:

● re6stnet.service - (null)
   Loaded: loaded (/etc/init.d/re6stnet)
   Active: active (running) since Fri 2018-03-09 16:43:23 UTC; 6min ago
   Process: 26395 ExecStop=/etc/init.d/re6stnet stop (code=exited, status=0/SUCC
  ESS)
   Process: 26423 ExecStart=/etc/init.d/re6stnet start (code=exited, status=0/SU
  CCESS)
   CGroup: /system.slice/re6stnet.service
           ├─26431 /opt/re6st/parts/python2.7/bin/python2.7 /usr/sbin/re6stnet@r
  e6stnet.conf
           ├─26437 openvpn --dev-type tap --dev re6stnet-tcp --persist-tun --per
  sist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.485-py2.7.egg/re6
  st/ovpn-client --tls-server --mode server --clien...
           ├─26444 babeld -h 15 -H 15 -L /var/log/re6stnet/babeld.log -S /var/li
  b/re6stnet/babeld.state -I /var/run/re6stnet/babeld.pid -s -C ipv6-subtrees tr
  ue -C default max-rtt-penalty 5000 rtt-max 500 rt...
           ├─26537 openvpn --dev-type tap --dev re6stnet1 --persist-tun --persis
  t-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.485-py2.7.egg/re6st/
  ovpn-client --nobind --client --remote 163.172.45...
           └─26862 openvpn --dev-type tap --dev re6stnet2 --persist-tun --persis
  t-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.485-py2.7.egg/re6st/
  ovpn-client --nobind --client --remote 52.36.124....

  Mar 09 16:43:23 slapostest2 systemd[1]: Started (null).

After this step Re6st is installed and the machine is accessable over IPv6.

Get SlapOS Master Token

SlapOS Node Installation - Request Association Token

Head back to the SlapOS Dashboard at:

https://master.YOUR_DOMAIN/ (preferred)

or:

https://[instance-IPv4]/erp5/web_site_module/hostingjs/

and log in as a administrative user. Click on the Servers link in the side to go to your list of servers.

When using the single line installer, you have to provide a X509 security token to identifiy your node with a SlapOS Master and enable it to manage the node within a network. To get such a token, in the subheader, click Token.

Association Token

SlapOS Node Installation - Association Token

Click Token to request a token. Once it's generated, copy the token for later. Note, that the token can only be used once. If the installation of SlapOS fails for whatever reason and you need to retry, you need to request a new token before. Head back to the terminal.

Single Line Installer

sudo su
# wget deploy.erp5.net/slapos && bash slapos

...

What is the url to the SlapOS Master API? [https://slap.vifib.com/]: 
What is the url to the SlapOS Master Website? [https://slapos.vifib.com/]: 
What is this computer name? [noname]:
If you have slapos token if you have? [notoken]:

Continue and use the single line installer. You will be asked a set of questions during the installation. As you are connecting to your own master, on the first question, please point to port 5443 of your master's IPv4 adress, so enter https://[your_IPv4_address]:5443 and on the second question, please add your SlapOS Master dashboard url. Same as you are using to get the token:

https://master.YOUR_DOMAIN

Choose a name for your computer (like SOFTWARE-BOX-1 to identity it in your network and finally enter the association token you have received earlier from your SlapOS Master.

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

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

In case installation fails and you want to start over, you need to request a new token as mentioned above and, depending on whether already created, remove any existing configuration in /etc/opt/slapos/slapos.cfg before restarting.

You can verify that SlapOS was installed by trying:

# slapos node
watchdog                   RUNNING   pid 13270, uptime 0:00:03

And (re)formatting the SlapOS node:

# slapos node format --now
2018-04-21 13:07:29 slapos[13279] INFO Updating Computer
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart0
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart1
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart2
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart3
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart4
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart5
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart6
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart7
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart8
2018-04-21 13:07:30 slapos.format[13279] INFO Partition resources saved to slappart9
2018-04-21 13:07:30 slapos[13279] INFO Posting information to 'https://54.37.31.108:5443/'
2018-04-21 13:07:30 slapos[13279] INFO slapos successfully prepared the computer.

SlapOS Dashboard - Registered Servers

SlapOS - Server List

Head back to your SlapOS Dashboard and verify the list of servers now 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.

Note, the entry has three clickable areas:

  • The line itself (click server name for example) points to the server configuration
  • Clicking the Computer button will open the monitor - the green color indicates the server is active and contacting the Master (yellow points at connection issues with the computer or one of its partitions, red means the computer has lost connection)
  • The Partitions button will only be visible after the first instance of an installed software as been provided.

Thank You

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