Relayer-Core (Linux)
A Relayer install begins with the XNS Console
- Register an account which will involve receiving an email and then logging in. This is your Single Sign-On (SSO) with XNS and is required for all activities on our Cloud. You can have multiple logins but your main login will be account billed as your Primary Account
- Once you are logged into the Console, the first task is to enter valid Payment type/method. Today, only credit cards are accepted, but soon we’ll add the ability to pay on terms for qualified organizations
Prerequisites
Hardware and networking guidance is covered in Relayer Setup Introduction
Relayer software deploys with Docker. It is highly recommended to install Docker following the distribution-specific Docker docs guides, and undertaking the post-installation steps.
Certain distributions (e.g. Ubuntu) may have prompted the user to install Docker during OS installation – this will not work, as it may use a package manager that installs Docker in an unsupported way (i.e. snap).
To verify docker engine is installed and running, run the below command. Commands are indicated by the prompt $.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Docker compose is also needed: this can be installed with sudo apt install docker-compose
$ docker-compose version
docker-compose version 1.29.2
If the output doesn’t resemble the expected, please review the Docker docs and go over the install guides carefully.
Docker installed following the Docker guide
Docker Post-Install steps performed
Docker Compose returning expected output
Installing Relayer Core
The following command will grab and run the Relayer Core setup script:
/bin/bash -c "$(curl -fsSL https://gitlab.com/scpcorp/relayer-core/-/raw/main/setup.sh)"
Setup Script
When run, the script will walk through a series of configuration steps.
Relayer Core 2.0
Choose relayer config directory [default: /home/$user/.config/scprime-relayer]:
Directories for config, hostio, postgres, and etcd will need to be provided. If the given directory doesn’t exist, it will be created.
In order to use TLS encryption (https) you will have to provide private.key and public.crt.
They will be copied to Relayer configuration directory.
You can generate your own self-signed certificate using MinIO's `certgen` util:
https://min.io/docs/minio/linux/operations/network-encryption.html
Do you want to use TLS encryption? (Y/n):
HTTPS is recommended (and for compatibility with some S3 apps, required). If not selected, the MinIO S3 endpoint will run as HTTP. If selected, the installer will ask for the path to the certificate details, and the endpoint will run as HTTPS.
Enter Access Token from https://console.xns.tech/keys:
Visit console.xns.tech/keys and create a new token, copy-pasting it into the installer. Protect this token, as it is used to generate billing for a Relayer’s usage.
Enter HostIO Secret (64 symbols), or leave empty to generate random one:
Recommended to leave blank and generate a new, random secret key. This key is used for data encryption, so protect it and save a backup securely.Recommended to leave blank and generate a new, random secret key. This key is used for data encryption, so protect it and save a backup securely.
Enter MinIO Access Key (Username):
MinIO Access Key and Secret Key are the security credentials for accessing data at the S3 endpoint. The Access Key should be a minimum of 3 characters, and the Secret Key a minimum of 8. Protect these credentials, as anyone with knowledge of them and access to the endpoint will be able to read/write/delete data from it.
Next are some configuration settings related to hostset and machine specs. It is recommended to leave the hostset as the default (blank), and answer the machine specs to the best of your ability.
Choose MinIO IP address to listen on.
127.0.0.1 will make MinIO available only from this machine,
and 0.0.0.0 will listen on all available addresses including internet.
Choose MinIO address [default: 127.0.0.1]:
Choose the IP for the MinIO endpoint to use. For most setups this will either be localhost (the default) or the machine’s local IP. More advanced configurations (perhaps complex, multi-NIC environments) may choose something else.
Container Start
Within a few moments of completing the setup script it will begin to pull the Docker images required. When they are completed, the containers will be created and started.
Creating scprime_relayer_database_1 ... done
Creating scprime_relayer_etcd_1 ... done
Creating scprime_relayer_hostio_1 ... done
Creating scprime_relayer_gateway_1 ... done
Creating scprime_relayer_minio_1 ... done
MinIO listens on http://127.0.0.1:9000
The MinIO web-UI should become accessible on the protocol (HTTP or HTTPS), IP, and port selected during setup. If the web-UI can’t be reached, confirm the local IP of the machine, and check firewall settings to see if traffic is being filtered. It is also possible something in the configuration is creating issues.
Configuration Changes, Container Management
While containers can be manually invoked or configuration settings directly edited, the Setup script provides a handy interface to streamline management. Simply run the script again:While containers can be manually invoked or configuration settings directly edited, the Setup script provides a handy interface to streamline management. Simply run the script again:
/bin/bash -c "$(curl -fsSL https://gitlab.com/scpcorp/relayer-core/-/raw/main/setup.sh)"
If run from the configuration directory the script will launch directly to the below menu. If run from elsewhere, the script will ask for the configuration directory.If run from the configuration directory the script will launch directly to the below menu. If run from elsewhere, the script will ask for the configuration directory.
1) reconfigure (by default)
2) start
3) stop
4) restart
5) update
Choose action:
This menu can be used to edit Relayer settings, or start/stop/restart/update relayer-core related containers. If making changes to the configuration, the script’s defaults will be the existing configuration option.This menu can be used to edit Relayer settings, or start/stop/restart/update relayer-core related containers. If making changes to the configuration, the script’s defaults will be the existing configuration option.
Logs
Relayer-core writes out logs to the Docker container. Run docker ps for the exact container names. They should resemble the following:
NAMES
scprime_relayer_minio_1
scprime_relayer_gateway_1
scprime_relayer_hostio_1
scprime_relayer_database_1
scprime_relayer_etcd_1
To inspect logs for a component, run docker logs <container-name>
In the current release, log-level by default is debug, which is quite verbose. This will give detailed information for troubleshooting, but can also become lengthy. Consider using logs flags such as -n 25 for only the most recent 25 lines, or –since.