From 618b092e8b6640ab346a2caf002b4e740a613a4b Mon Sep 17 00:00:00 2001 From: TC Johnson Date: Thu, 21 Sep 2023 08:24:09 -0500 Subject: [PATCH] Add private or dev network setup docs Guides and config templates for use in setting up private Veilid networks for independent or development needs. --- BOOTSTRAP-SETUP.md | 20 ++++++++++--------- dev-setup/dev-network-setup.md | 2 +- ...trap-config.md => veilid-bootstrap-config} | 0 ...-config.md => veilid-dev-bootstrap-config} | 5 +++++ ...-node-config.md => veilid-dev-node-config} | 6 +++++- 5 files changed, 22 insertions(+), 11 deletions(-) rename doc/config/{veilid-bootstrap-config.md => veilid-bootstrap-config} (100%) rename doc/config/{veilid-dev-bootstrap-config.md => veilid-dev-bootstrap-config} (67%) rename doc/config/{veilid-dev-node-config.md => veilid-dev-node-config} (69%) diff --git a/BOOTSTRAP-SETUP.md b/BOOTSTRAP-SETUP.md index 1aeb6343..1f2ca219 100755 --- a/BOOTSTRAP-SETUP.md +++ b/BOOTSTRAP-SETUP.md @@ -14,12 +14,10 @@ Follow instructions in [INSTALL.md](./INSTALL.md) ## Configure Veilid as Bootstrap -**As root** - ### Stop the Veilid service ```shell -systemctl stop veilid-server.service +sudo systemctl stop veilid-server.service ``` ### Setup the config @@ -36,7 +34,7 @@ sudo -u veilid /bin/bash ### Generate a new keypair -Copy the output to secure storage. +Copy the output to secure storage such as a password manager. This information will be used in the next step and can be used for node recovery, moving to a different server, etc. ```shell veilid-server --generate-key-pair @@ -44,7 +42,7 @@ veilid-server --generate-key-pair ### Create new node ID and flush existing route table -Include the brackets [] when pasting the keys. Use the public key in the command. Secret key will be request interacitvly and will not echo when pasted. +Include the brackets [] when pasting the keys. Use the public key in the command. Secret key will be requested interactively and will not echo when pasted. ```shell veilid-server --set-node-id [PUBLIC_KEY] --delete-table-store @@ -52,18 +50,22 @@ veilid-server --set-node-id [PUBLIC_KEY] --delete-table-store ### Generate the DNS TXT record -Copy the output to secure storage. +Copy the output to secure storage. This information will be use to setup DNS records. ```shell veilid-server --dump-txt-record ``` -**Switch back to root** - ### Start the Veilid service +Disconnect from the Veilid user and start veilid-server.service. + ```shell -systemctl start veilid-server.service +exit +``` + +```shell +sudo systemctl start veilid-server.service ``` Optionally configure the service to start at boot `sudo systemctl enable veilid-server.service` diff --git a/dev-setup/dev-network-setup.md b/dev-setup/dev-network-setup.md index aac705c4..e5e822bb 100644 --- a/dev-setup/dev-network-setup.md +++ b/dev-setup/dev-network-setup.md @@ -16,7 +16,7 @@ This acts as a passphase to allow nodes to join the network. It is the mechanism ### Dev Bootstrap Server -Follow the steps detailed in [BOOTSTRAP-SETUP.md](../BOOTSTRAP-SETUP.md) using the dev bootstrap example [config](../doc/config/veilid-dev-bootstrap-config.md) for the *Setup the config* section. Set your network key on line 28. +Follow the steps detailed in [BOOTSTRAP-SETUP.md](../BOOTSTRAP-SETUP.md) using the dev bootstrap example [config](../doc/config/veilid-dev-bootstrap-config.md) for the *Setup the config* section. Set a _network_key_password_ in the config file. ### Dev Nodes diff --git a/doc/config/veilid-bootstrap-config.md b/doc/config/veilid-bootstrap-config similarity index 100% rename from doc/config/veilid-bootstrap-config.md rename to doc/config/veilid-bootstrap-config diff --git a/doc/config/veilid-dev-bootstrap-config.md b/doc/config/veilid-dev-bootstrap-config similarity index 67% rename from doc/config/veilid-dev-bootstrap-config.md rename to doc/config/veilid-dev-bootstrap-config index 4cf4072e..936effb3 100644 --- a/doc/config/veilid-dev-bootstrap-config.md +++ b/doc/config/veilid-dev-bootstrap-config @@ -3,6 +3,11 @@ # # Private Development Bootstrap Server Configuration # +# This config is templated to setup a bootstrap server with +# a network_key_password. Set the network key to whatever you +# like. Treat it like a password. Use the same network key in +# the config files for at least four nodes to establish an +# independent Veilid network for private or development uses. # ----------------------------------------------------------- --- diff --git a/doc/config/veilid-dev-node-config.md b/doc/config/veilid-dev-node-config similarity index 69% rename from doc/config/veilid-dev-node-config.md rename to doc/config/veilid-dev-node-config index a77b135a..f2bf161d 100644 --- a/doc/config/veilid-dev-node-config.md +++ b/doc/config/veilid-dev-node-config @@ -1,8 +1,12 @@ # Veilid Server # ============= # -# Dev Node Configuration +# Private Development Node Configuration # +# This config is templated to setup a Velid node with a +# network_key_password. Set the network key to whatever you +# set within your private bootstrap server's config. Treat it +# like a password. # ----------------------------------------------------------- ---