Hyper Open Edge Cloud

How To Install a SlapOS Node (Comp-123)

Tutorial outlining the steps of installing a SlapOS Node
  • Last Update:2025-03-04
  • Version:002
  • Language:en

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-1,2,3) is used by the SlapOS Master to install software on the node and then provide instances of this software within its computer partitions. For details, please refer to the SlapOS introduction.

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...).

Agenda

  • Prerequisites
  • Generate a Compute Node Token
  • SlapOS Node Installation
  • Validation

Prerequisites

  1. A Rapid.Space user account
  2. Re6st Installed
  3. Root access to your server

For this tutorial you need a Rapid.Space user account and have Re6st installed on your server. Installing re6st is necessary in order to have subnet IPv6 addresses which are required for a SlapOS Node. 

The tutorial demonstrates installation on an arbitrary GNU/Linux server from a cloud provider (Debian, available for example from OVH or Online.net) with wget installed, on which you will need root access.
If you want to install SlapOS Node in Rapid.Space KVM, you can refer Howto Install SlapOS Node (Comp-123) On Rapid.Space KVM.

Verify that 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 - Resilient, Scalable, IPv6 Network application  
     Loaded: loaded (/lib/systemd/system/re6stnet.service; enabled; preset: enabled)  
     Active: active (running) since Thu 2024-09-27 10:11:37 CET; 34s ago  
   Main PID: 7896 (re6stnet)  
      Tasks: 4 (limit: 19136)  
     Memory: 25.4M  
        CPU: 429ms  
     CGroup: /system.slice/re6stnet.service  
             ├─7896 /opt/re6st/parts/python3/bin/python3 /usr/sbin/re6stnet @re6stnet.conf  
             ├─7911 openvpn --dev-type tap --dev re6stnet-tcp --persist-tun --persist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.650-py3.11.egg/re6st/ovpn-client --tls-server --mode server --client-connect "/opt/re6st/eggs/r>  
             ├─7916 babeld -h 15 -H 15 -L /var/log/re6stnet/babeld.log -S /var/lib/re6stnet/babeld.state -I /var/run/re6stnet/babeld.pid -s -C "redistribute local deny" -C "redistribute ip 2401:5180:85::1/48 eq 48" -C "key type blake2s12>  
             └─8112 openvpn --dev-type tap --dev re6stnet1 --persist-tun --persist-key --script-security 2 --up /opt/re6st/eggs/re6stnet-0.650-py3.11.egg/re6st/ovpn-client --nobind --client --remote 54.168.75.39 1194 tcp --verify-x509-na>

Sep 27 10:11:37 test-kvm systemd\[1\]: Started re6stnet.service - Resilient, Scalable, IPv6 Network application.

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

SlapOS Node Installation

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

Get a SlapOS Compute Node Token

SlapOS Node Installation - Request Association Token

The single line installer script you will be executing on your server will ask your for a valid X509 security token to identify your node with a SlapOS Master and enable it to manage the node within a network.
Such a token is called a Compute Node Token, and this section shows how to generate one.

Log in to the Rapid.Space Panel.

  1. From the homepage, click on the Projects link in the side to go to your list of accessible projects.
  2. Click on the project in which you wish to register the Compute Node.
  3. Click on Add Compute Node Token.

Copy the Compute Node Token

SlapOS Node Installation - Association Token

Your Compute Node Token is now generated and should be displayed on the screen: copy it for later. The other lines of information above should not be needed.

IMPORTANT: This token can only be used once. If the installation of SlapOS on your server fails for whatever reason and you need to retry, you will need to request a new token beforehand.

Run the single-line installer

sudo su -
$ wget https://deploy.erp5.net/slapos && bash slapos
...

# What is the url to the SlapOS Master API?  (ignore if you already have a configured re6st and slapos): [https://slap.vifib.com/]: (ignore this question)
# What is the url to the SlapOS Master Website?  (ignore if you already have a configured re6st and slapos): [https://panel.rapid.space/]: (ignore this question)
# Name your computer (ignore if you already have a configured re6st and slapos or if you don't want to register your computer to SlapOS Master): [noname]: $Your_Computer_Name
...
# Input your slapos token (ignore if you already have a configured slapos) [notoken]: $Your_Compute_Node_Token
...
# Which interface will provide IPv6? (ignore if you already have a configured re6st) [lo]: lo
...
# How many SlapOS computer partitions would you like? [10]:

Now that your Compute Node Token is ready, SlapOS can be installed on your server via our single-line installer.

Log into your server via your method of choice.

IMPORTANT: You will need to be logged in to the root user.

Run the command as shown above. 

After a few moments during the installation, you will be prompted to answer a set of questions:

  • As you are connecting to the SlapOS Master, you can skip the first two questions.
  • Next, choose and input a name for your computer, noted above as $Your_Computer_Name. This will be the name with which your server will appear in your Rapid.Space project.
    IMPORTANT: If the name contains spaces, surround the whole name with double quotes, e.g. "My SlapOS Compute Node".

  • Next, input the Compute Node Token you have generated before: $Your_Compute_Node_Token.

  • When prompted for the IPv6 network interface, either enter lo or skip the question as you are using Re6st.

  • Finally, for the number of SlapOS computer partitions, you can stay with the default of 10 for a small deployment. If you expect a larger deployment, 100 partitions is a safe number, and adds no extra overhead.

NOTE: If you are using copy/paste, beware of whitespace or invisible characters that might be added when pasting your data.

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

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

However, in case the installation fails and you want to start over, you need to request a new Compute Node Token as mentioned above and, depending on whether it is already created, remove any existing configuration at /etc/opt/slapos/slapos.cfg before restarting the installation.

NOTE: If you need more computer partitions after the installation is finished, you can edit the above-mentioned configuration file at /etc/opt/slapos/slapos.cfg: find the partition-amount line in the [slapformat] section, and set it to the desired number.
Save and exit the configuration file, and run the command $ slapos node format --now to update your node with the new changes.

Validation

  1. Verify the installation of the SlapOS Node
  2. Verify the presence of the registered Node on the Rapid.Space Panel

Verify the installation of the SlapOS Node

$ slapos node
watchdog                         RUNNING   pid 657, uptime 27 days, 20:01:48

 

$ slapos node format --now
2024-09-27 10:32:37 slapos[93162] INFO Updating computer
2024-09-27 10:32:38 slapos[93162] INFO Posting information to 'https://slap.vifib.com/'
2024-09-27 10:32:39 slapos[93162] INFO slapos successfully prepared the computer.

You can verify that SlapOS was installed by trying the above command $ slapos node: you should see a single service running, which is the watchdog.

Next, (re)format the SlapOS node with the command $ slapos node format --now.

Verify Registered Servers on Panel

Head back to your Rapid.Space Panel.
Either click on Compute Nodes from your Project page or click on Servers from the homepage, and verify that the list of servers now includes your new SlapOS Node which was associated to your network using the Compute Node Token you have generated. You may have to refresh the page for the server to show up.

 NOTE: Clicking on an entry will bring you to the Compute Node's page, where you will be able to see more information about the it. Also, the Status column can have three different colors:

  • Green indicates the server is active and successfully contacting the Master.
  • Yellow indicates connection issues with the Node or one of its partitions.
  • Red means the Node has lost connection entirely.