Skip to content

Commit

Permalink
Merge pull request #115 from DataHighway-DHX/christian/instructions
Browse files Browse the repository at this point in the history
update instructions
  • Loading branch information
cgroeschel authored Jun 15, 2021
2 parents 25c52c5 + ae2a2bf commit 016d2e0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
21 changes: 13 additions & 8 deletions docs/tutorials/tutorials-nodes-full-node-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ cargo build --release


### Set up the node as a system service.
To do this, navigate into the root directory of the DataHighway-DHX/node repo and execute the following to create the service configuration file (harbour):
To do this, navigate into the root directory of the DataHighway-DHX/node repo and execute the following to create the service configuration file and make specific configuration updates for your node as detailed below:

```bash
{
echo '[Unit]'
echo 'Description=DataHighway'
echo '[Service]'
echo 'Type=simple'
echo 'WorkingDirectory=`pwd`'
echo 'ExecStart=`pwd`/node/target/release/datahighway --chain `pwd`/node/node/src/chain-definition-custom/chain_def_harbour.json --bootnodes BootNode --name YOURNODENAME'
echo 'WorkingDirectory=/home/foo/node'
echo 'ExecStart=/home/foo/node/target/release/datahighway --chain CHAIN_NAME --bootnodes BOOT_NODE --name YOUR_NODE_NAME'
echo '[Install]'
echo 'WantedBy=multi-user.target'
} > /etc/systemd/system/datahighway.service
Expand All @@ -83,21 +83,26 @@ WorkingDirectory=needs to be the full path to your node project which you cloned
/home/foo/node
```

ExecStart=needs to be the full path to the datahighway binary, eg:
ExecStart=needs to include the full path to the datahighway binary, eg:
```
/home/foo/node/target/release/datahighway
```

Name your node with the --name option which will be shown on telemetry, eg:
CHAIN_NAME=Specify the chain name where you want to connect your node to, eg
```
--chain harbour
```
--name MyUniqueNodeName

YOUR_NODE_NAME=Name your node with the --name option which will be shown on telemetry, eg:
```
--name MyAwesomeNode
```
BootNode=specify our bootnode to connect to the chain (vs. running your own one locally), eg harbour testnet
BOOT_NODE=specify one of our chain specific bootnodes, its IP and Peer-ID can be provided thru a discord request
```
--bootnodes /ip4/18.185.37.254/tcp/30333/p2p/12D3KooWFmR35FFHiXcQv8hsFWDq6ofttqBPeMkd4Jt6qRgq3HnT
--bootnodes /ip4/GET_IP_FROM_DISCORD/tcp/30333/p2p/GET_PEER_ID_FROM_DISCORD
```


Double check that the config has been written to /etc/systemd/system/datahighway.service correctly.
```
cat /etc/systemd/system/datahighway.service
Expand Down
21 changes: 13 additions & 8 deletions docs/tutorials/tutorials-nodes-validator-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ cargo build --release


### Set up the node as a system service.
To do this, navigate into the root directory of the DataHighway-DHX/node repo and execute the following to create the service configuration file (harbour):
To do this, navigate into the root directory of the DataHighway-DHX/node repo and execute the following to create the service configuration file and make specific configuration updates for your node as detailed below:

```bash
{
echo '[Unit]'
echo 'Description=DataHighway'
echo '[Service]'
echo 'Type=simple'
echo 'WorkingDirectory=`pwd`'
echo 'ExecStart=`pwd`/node/target/release/datahighway --chain `pwd`/node/node/src/chain-definition-custom/chain_def_harbour.json --bootnodes BootNode --name YOURNODENAME --validator --unsafe-ws-external --unsafe-rpc-external --rpc-cors=all --rpc-methods=Unsafe --execution=native -lruntime=debug'
echo 'WorkingDirectory=/home/foo/node'
echo 'ExecStart=/home/foo/node/target/release/datahighway --chain CHAIN_NAME --bootnodes BOOT_NODE --name YOUR_NODE_NAME --validator --unsafe-ws-external --unsafe-rpc-external --rpc-cors=all --rpc-methods=Unsafe --execution=native -lruntime=debug'
echo '[Install]'
echo 'WantedBy=multi-user.target'
} > /etc/systemd/system/datahighway.service
Expand All @@ -83,18 +83,23 @@ WorkingDirectory=needs to be the full path to your node project which you cloned
/home/foo/node
```

ExecStart=needs to be the full path to the datahighway binary, eg:
ExecStart=needs to include the full path to the datahighway binary, eg:
```
/home/foo/node/target/release/datahighway
```

Name your node with the --name option which will be shown on telemetry, eg:
CHAIN_NAME=Specify the chain name where you want to connect your node to, eg
```
--name MyValidator
--chain harbour
```
BootNode=specify our bootnode to connect to the chain (vs. running your own one locally

YOUR_NODE_NAME=Name your node with the --name option which will be shown on telemetry, eg:
```
--name MyAwesomeNode
```
BOOT_NODE=specify one of our chain specific bootnodes, its IP and Peer-ID can be provided thru a discord request
```
--bootnodes /ip4/18.185.37.254/tcp/30333/p2p/12D3KooWFmR35FFHiXcQv8hsFWDq6ofttqBPeMkd4Jt6qRgq3HnT
--bootnodes /ip4/GET_IP_FROM_DISCORD/tcp/30333/p2p/GET_PEER_ID_FROM_DISCORD
```

Note1: The Startup argument '--rpc-methods=Unsafe' is required to workaround ["Method not found"](https://github.com/paritytech/substrate/issues/6100)
Expand Down

0 comments on commit 016d2e0

Please sign in to comment.