Most Powerful Open Source ERP

How To Setup Testnode With Network Restriction

This post is aiming to explain how to create a KVM and set up a test node in it with some network restrictions.
  • Last Update:2022-04-11
  • Version:001
  • Language:en

Setup a Test node with network restriction

This post is aiming to explain how to create a KVM and set up a test node in it with some network restrictions. This post omitted a lot of details, which means readers should have basic knowledge about how to install KVM, Debian, etc. This post just covers the basic stages in a big view and the differences from the standard procedure.

Jerome did same thing as I did:

1. Create a KVM

Create a service on the panel.rapid.sapce. Select KVM with version 1.0.232. ( The disk space needs 100GB. Set the RAM size to 16384. Click "Show Parameter XML", then copy the following XML to the editor:

<?xml version="1.0" encoding="utf-8"?>
    <parameter id="ram-size">16384</parameter>
    <parameter id="disk-size">100</parameter>

2. Install Debian

Normal procedure. Just make sure you installed the SSH component.

2.1 Enable IPv6

On the instance page which you requested the KVM, you can see there has a description about how to enable IPv6 on your Debian system. See below:

PERMANENT SOLUTION: in your VM, add the lines below in /etc/network/interfaces and then run: "ifup ens4"
auto ens4
iface ens4 inet6 static
    address 2001:67c:1254:xxxx:xxxx:xxxx:0:1
    netmask 96
    gateway 2001:67c:1254:xxxx:xxxx:xxxx:ffff:ffff

After this operation, you can use ssh to login into the machine:

ssh YOUR_USER_NAME@2001:67c:1254:xxxx:xxxx:xxxx:0:1

3. Install slapos on the Debian

Run the following command to install Slapos:

wget; bash vifib

The script will do some processing, after that. It will ask for some information, provide it as follow:

SlapOS Master API

SlapOS Master Web UI

Your Token

For the first two options, just use the default one. For the token, you need to go to the, in the "Server" tab, request a token.

And then set up a name for this computer, eg: Shacache-testnode

Note: The most important part is, don't forget to set ens4 network as the IPv6 provider. The default one is "lo". We need to change it to "ens4".

4 Supply Testnode

On, we suppose to be able to find the server we just created in the KVM. We can find it is because we use the provided token. In the server, click the button "Supply" to create a TestNode.

This will install the related software on your Debian system.

5 Create the real test node service

After supplying the test node, we need to create a test node service on Then provide some parameters which to "set a bridge" between the test node and the ERP5 instance which we can see the test result

So let's just create the "TestNode" service, make sure you selected the correct "Computer Node", which is the server name. You can see it in the "Server" tab(see the section above).

Then we can put some parameters:

<?xml version="1.0" encoding="utf-8" ?><instance>
  <parameter id="test-node-title">COMP3530-Shacache-KVM-TestNode</parameter>
  <parameter id="node-quantity">1</parameter>
  <parameter id="test-suite-master-url"></parameter>
  <parameter id="software-path-list">[""]</parameter>

The "test-node-title" is arbitrary, and "node-quantity" is 1 in our case. The "software-path-list" is for provide the customized the "seleniumrunner/software.cfg". It was for debugging, you can ignore it by now(FYI, it gets from here:

The important part here is the "test-suite-master-url". Which is the distribution path in the ERP5 instance where you want to set the test suite and see the test result.

This means you need to create a portal_task_distribution in that ERP5 instance. Then add your user name and password to the URL.

If you are using the official ERP, aka . You need to use the following format:

  • The test_account:test_passwd is the account to login the ERP5 instance and run the test. 
  • You have to use the domain ""
  • And ask someone to create a portal_task_distribution for you if you don't have the permission.

6. Download the playbook which contains the tweak

The playbook is here:

Which contains all the tweaks to the erp5 test node. Don't forget to delete the trailing role when you run it manually:

    - slapos-proxy

Command to apply it:

ansible-playbook slapos-standalone.yml

7. Create the testsuite

In step 4, we said we have to have an ERP5 instance where we want to create a testsuite and see the test result. In this ERP5 instance, we create a test suite plus the distribution.

Don't forget to allow the test node to access this ERP5 instance. This means you need to replace the "destination" field in the slapos-standalone.yml which is mentioned above:

    # This is for connecting to the test suite and uploading the test result.
    # You need to replace it with your own ERP5 instance domain s
    - name: Allow to access ERP5 test suite address
        action: append
        chain: OUTPUT
        protocol: tcp
        destination_port: 443
        jump: ACCEPT

Change it to your own ERP5 instance. If you are using the official ERP5, then no need to change.

Allow me to mention again, the URL of the ERP5 instance you are using is the URL you suppose to provide in "test-suite-master-url" in step 6.

8. Setup the shacache upload comfiguration(Optional)

This is for uploading packages to the shacache. It is supposed to be done by an authorized developer. So here will not cover it. Just show what does the upload configuration supposed to be.

# Upload Configuration
signature_private_key_file = /etc/opt/slapos/shacache/signature.key
signature_certificate_file = /etc/opt/slapos/shacache/signature.cert
upload-binary-dir-url =
upload-binary-cache-url =
upload-cache-url =
upload-dir-url =

# Options for HTTPS URLs
shacache-ca-file = /etc/opt/slapos/shacache/ca.cert
shacache-cert-file = /etc/opt/slapos/shacache/shacache.cert
shacache-key-file = /etc/opt/slapos/shacache/shacache.key
shadir-ca-file = /etc/opt/slapos/shacache/ca.cert
shadir-cert-file = /etc/opt/slapos/shacache/shacache.cert
shadir-key-file = /etc/opt/slapos/shacache/shacache.key