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: https://nexedijs.erp5.net/#/web_page_module/10520
Create a service on the panel.rapid.sapce. Select KVM with version 1.0.232. (https://handbook.rapid.space/user/rapidspace-HowTo.Request.A.KVM) 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"?>
Normal procedure. Just make sure you installed the SSH component.
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"
iface ens4 inet6 static
After this operation, you can use ssh to login into the machine:
Run the following command to install Slapos:
wget https://deploy.erp5.net/vifib; 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
For the first two options, just use the default one. For the token, you need to go to the panel.rapid.space, 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".
On panel.rapid.space, 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.
After supplying the test node, we need to create a test node service on panel.rapid.space. 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>
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: https://lab.nexedi.com/nexedi/slapos/blob/0be7b044fc635b7020ccb8b8c99e5a5986eec13f/software/erp5testnode/instance.cfg#L37)
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 https://nexedijs.erp5.net/ . You need to use the following format:
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:
Command to apply it:
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
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.
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 = https://www.shacache.org/shadir
upload-binary-cache-url = https://www.shacache.org/shacache
upload-cache-url = https://www.shacache.org/shacache
upload-dir-url = https://www.shacache.org/shadir
# 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