Network Example - niclabs/dtc GitHub Wiki

The following diagram shows how the system could be configured on an internal network:

Network Diagram

The server and the nodes should be on the same internal network, so all of them are being seen by the server (172.17.1.5).

The server and the nodes have an user named dtc, in charge of executing the command. In case of the server, this user has to have permissions to read and write in the folder /etc/dtc/. In the case of the nodes, this user has to have permissions to read and write in the folder /etc/dtcnode/

The configuration command that should be run in this case is the following:

    go run github.com/niclabs/dtcconfig rsa \
    -t 3 \
    -n 172.17.1.11:2030,172.17.1.12:2030,172.17.1.13:2030,172.17.1.14:2030,172.17.1.15:2030 \
    -H 172.17.1.5 \
    -c /etc/dtc/dtc-config.yaml
    -d /etc/dtc/dtc.sqlite3
    -l /etc/dtc/dtc.log

then the files should be copied on each node:

  • Copy node_1/dtcnode-config.yaml to /etc/dtcnode/dtcnode-config.yaml in machine 172.17.1.11
  • Copy node_2/dtcnode-config.yaml to /etc/dtcnode/dtcnode-config.yaml in machine 172.17.1.12
  • Copy node_3/dtcnode-config.yaml to /etc/dtcnode/dtcnode-config.yaml in machine 172.17.1.13
  • Copy node_4/dtcnode-config.yaml to /etc/dtcnode/dtcnode-config.yaml in machine 172.17.1.14
  • Copy node_5/dtcnode-config.yaml to /etc/dtcnode/dtcnode-config.yaml in machine 172.17.1.15

and the program dtcnode should be executed on each machine. It is up to you how to keep it running on the servers. In case of Debian nodes, you could create a Systemd service.