To set up the Hub node application follow the steps below.
NOTE Configuration files location:
For Node, Hub and Worker:
- If you run SONM components from binaries, configuration files must be stored in same folder.
- If you have installed SONM comlonents from DEB package or repository, SONM configuration files are stored in: /etc/sonm
- No matter how you installed CLI, it's configuration file must be stored in ~/.sonm/cli.yaml
Parameters to set:
|1||gateway: ports||[num1, num2]||Port range allocated for virtual services. If your worker PC doesn't have a public IP, you should configure IPVS to allow consumers to connect to their tasks from the outer Internet. NOTE: If your worker PC has a public IP, disable the setting with # prefix.|
|2||ethereum: key_store||string||Set up the path to folder with keystore file (UTC/JSON file with access to Rinkeby account where your SONM test tokens are stored). NOTE: You should use the same keystore for all SONM components.|
|3||ethereum: pass_phrase||string||The passphrase to access your keystore file. You may set the passphrase or leave it blank (in that case you will be asked to enter the pass_phrase every time you start the Hub). If you installed SONM Node as system service (from DEB package or repository) you must specify passphrase. Otherwise sonm-node system service will fail to start.|
Settings for cluster of hubs:
|1||cluster: endpoint||< IP >: port||An endpoint for client connections using sonmCLI. Default value is ":15010". You may set only port to bind Hub to all available IPs, or set "IP:port" to bind Hub to given IP address.|
|2||cluster : announce_endpoint||< IP >:port||This one useful if hub is behind router with DMZ or port forwarding. This endpoint will be used to communicate with hub, however hub will still bind on "endpoint", not "announce_andpoint"|
|3||cluster: failover||boolean||false - the Hub will work in standalone mode; true - the Hub will work as a unit of cluster. Deafult value = 'false'.|
|4||cluster: store: type||string||Must be = 'consul' if failover setting is true. Must be = 'boltdb' if failover setting is false. Deafult value = 'boltdb'.|
|5||cluster: store: endpoint||string or IP:port||Must contain the consul IP and port if failover setting is true. If failover setting is false, the local boltdb storage path is given.|
|6||cluster: store: bucket||string||The storage name.|
|7||fine tuning (leader_key, member_list_key, sync_prefix, leader_ttl, announce_period, member_gc_period)||-||A group of settings for fine tuning of cluster of hubs configuration. WARNING: Don't change these settings|
Other parameters (no need to change):
|1||endpoint||< IP >: port||An endpoint for worker connections. Default value is ":15011". You may set only port to bind Hub to all available IPs, or set "IP:port" to bind Hub to given IP address.|
|2||loging: level||number||The log level setting. Allowed values in range of "-1" (high verbosity) to "3" (most quiet). Default value is "-1".|
|3||locator: endpoint||IP:port||This is the SONM locator service address. You shouldn't change it.|
|4||market: endpoint||IP:port||This is the SONM Marketplace address. You shouldn't change it.|
|5||whitelist: url||URL||This is the link to whitelist of Docker images allowed to run in SONM MVP Testnet. You shouldn't change it.|
|6||whitelist: enabled||boolean||Default value is 'true'.|
|7||metrics_listen_addr||IP:port||Embedded metrics service. Do not change.|
NOTE: Whitelist is enabled by default due to security reasons. But you may switch it to 'false' to allow any MVP testnet participant to run any Docker image on your Worker node. If you want try your own (or your friend's) Docker image on your Worker node through SONM without disabling whitelist, you may set specific ByerID Eth address in ask-plan. In that case only specified consumer is allowed to open a deal with your Hub.
sudo service sonm-hub restart
If you use binaries and did not specified passphrase in hub.yaml, you will be asked for a passphrase to your keystore file.