Instantiate Re6st Registry

Instantiate Re6st Registry

How To Instantiate Re6st Registry

This document explains how to instantiate a Re6st Registry. To follow the steps outlined in this section, you need to have:

  • Access to a SlapOS Master - how to install and configure a SlapOS Master
  • A node (COMP-0) that provides services to the SlapOS Master and other nodes on the network (see installing a SlapOS node).
  • Re6st added to software catalog on SlapOS (see how to add software to the SlapOS Master catalog). The url of the software.cfg to add (at the time of writing) is https://lab.nexedi.com/nexedi/slapos/raw/1.0.49/software/re6stnet/software.cfg.
  • Re6st software supplied on one of the network nodes, so it can be instantiated.

Table of Content

  • Re6st Registry Configuration

Configuring Re6st Registry

The process of installing (supplying) a software and providing it as a service (instantiation) are the same for all softwares and is described in configuring a SlapoS node. However during instantiation each instance can be configured differently.

This section will cover the specific configuration parameters used for Re6st Registry instantiation and the steps required to get Re6st to work.

Re6st is used in SlapOS to create a mesh network and route traffic through available nodes. To setup Re6st while configuring COMP-0, it is first required to instantiate a Re6st Registry - a register which manages Re6st nodes in a network and issues tokens for new nodes to join the network. The Registry is handled in this chapter.

A second step for COMP-0 and the only step for COMP-1,2,3... is to request a Re6st token which is covered in instantiating a Re6st Access Token.

Registry Configuration

SlapOS Interface - Re6st Registry Instance Configuration

After selecting Services, adding a new service Re6st and selecting the latest version, you should be on the configuration screen of the Registry. Select Software Type Default (denotes the Registry why not Registry?) which will load a form with software-specific parameters.

Set the following parameters:

IPv6 prefix: fc01::/7
Default length of allocated prefix: 16

Don't forget to select your computer at the end of the form to prevent the SlapOS Master allocating the Registry on a computer of its choice.

Click Proceed to start instantitation. This will forward you to the list of current services.

Registry Instantiation and Port Forwarding

SlapOS Interface - Re6st Service Instantiation

Refresh the page to show your instance and installation status.

You can follow the compilation by looking at the slapos-node-software.log using:

# tail opt/slapos/log/slapos-node-software.log -f

Since the Registry is listening on port 19201XXX or 9201? XXX (see system requirements) and user permissions in Linux systems prevent accessing ports above 1024, traffic must be forwarded.

This can be done using a Firewall with NAT traversal or using Socat. We will use Socat, a relay for bidirectional data transfer between two independent data channels. Data channels can be files, pipes, devices (terminal or modem, etc.), or sockets (Unix, IP4, IP6 - raw, UDP, TCP), etc. For more information, please refer to the Free Software Directory).

To install socat in case needed, head to your terminal and:

sudo su
root@svenslapostest2:/# sudo apt-get install socat

Still in your terminal, start by finding the IP adress to bind to:

root@localhost:~# netstat -natp | grep 9201
tcp         0       0 10.0.27.44:9201       0.0.0.0:*          LISTEN       26027/python2.7
tcp         0       0 10.0.27.44:40706      10.0.27.44:9201    TIME_WAIT    -
tcp         0       0 10.0.27.44:40699      10.0.27.44:9201    TIME_WAIT    -
tcp         0       0 10.0.27.44.9201       10.0.27.44.:40655  TIME_WAIT    -
tcp         0       0 :::9201               :::*               LISTEN       26027/python2.7

Continue with:XXX Explain what we see means XXX

root@localhost:~# ifconifg eth0 | grep inet\
            inet addr:167.114.246.26  Bcast:167.114.246.26  Mask:255.255.255.255

Then call Socat:

root@localhost:~# socat TCP4-LISTEN:9201,fork,bind=167.114.246.26 TCP4:10.0.27.44:9201 & [3] 13443

Note, that your Registry master-url in the example is 167.114.246.26:9201. SAVE THIS URL. You will need to provide it whenever you want to connect a new node to the network.

To verify whether port forwarding works, you can:

root@svenslapostest2:/# ps aux | grep socat
    

XXX add output XXX

Before finishing make sure that any temporary IPv6 adress space added during installation of the SlapOS node itself (when installing the COMP-0 node) is removed. On your terminal, run:

sudo su
ip -6 addr del fc01::1/32 dev lo

IPv6 will be reset when the first (gateway) node is being created. XXX EXPLAIN XXX.

Verify Re6st Is Accessible

SlapOS Re6st Registry Service Accessability

Once port forwarding is setup, try accessing the registry over the url 167.114.246.26:9201.

Thank You

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