Dev network setup docs

Added guilds for setting up a public bootstrap, a dev network,
and config templates for dev nodes. Added link in the contribution
guide to dev network setup guide.
This commit is contained in:
TC Johnson 2023-09-18 21:28:56 -05:00
parent 1e27df2aee
commit 6e9610ecd2
No known key found for this signature in database
8 changed files with 171 additions and 12 deletions

View File

@ -1,5 +1,7 @@
# Starting a Veilid Bootstrap Server # Starting a Generic/Public Veilid Bootstrap Server
## Instance Recommended Setup ## Instance Recommended Setup
CPU: Single CPU: Single
RAM: 1GB RAM: 1GB
Storage: 25GB Storage: 25GB
@ -7,50 +9,69 @@ IP: Static v4 & v6
Firewall: 5150/TCP/UDP inbound allow all Firewall: 5150/TCP/UDP inbound allow all
## Install Veilid ## Install Veilid
Follow instructions in [INSTALL.md](./INSTALL.md) Follow instructions in [INSTALL.md](./INSTALL.md)
## Configure Veilid ## Configure Veilid as Bootstrap
**As root** **As root**
### Stop the Veilid service ### Stop the Veilid service
```shell
```shell
systemctl stop veilid-server.service systemctl stop veilid-server.service
``` ```
### Setup the config ### Setup the config
In _/etc/veilid-server/veilid-server.conf`_ ensure _bootstrap: ['bootstrap.<your.domain>']_ in the _routing_table:_ section In _/etc/veilid-server/veilid-server.conf`_ ensure _bootstrap: ['bootstrap.<your.domain>']_ in the _routing_table:_ section
If you came here from the [dev network setup](./dev-setup/dev-network-setup.md) guide, this is when you set the network key.
**Switch to veilid user** **Switch to veilid user**
```shell ```shell
sudo -u veilid /bin/bash sudo -u veilid /bin/bash
``` ```
### Generate a new keypair ### Generate a new keypair
Copy the output to secure storage. Copy the output to secure storage.
```shell ```shell
veilid-server --generate-key-pair veilid-server --generate-key-pair
``` ```
### Create new node ID and flush existing route table ### 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 request interacitvly and will not echo when pasted.
```shell ```shell
veilid-server --set-node-id [PUBLIC_KEY] --delete-table-store veilid-server --set-node-id [PUBLIC_KEY] --delete-table-store
``` ```
### Generate the DNS TXT record ### Generate the DNS TXT record
Copy the output to secure storage. Copy the output to secure storage.
```shell ```shell
veilid-server --dump-txt-record veilid-server --dump-txt-record
``` ```
**Switch back to root** **Switch back to root**
### Start the Veilid service
```shell ### Start the Veilid service
```shell
systemctl start veilid-server.service systemctl start veilid-server.service
``` ```
Optionally configure the service to start at boot `sudo systemctl enable veilid-server.service`
_REPEAT FOR EACH BOOTSTRAP SERVER_ _REPEAT FOR EACH BOOTSTRAP SERVER_
## Enter DNS Records ## Enter DNS Records
Create the following DNS Records for your domain: Create the following DNS Records for your domain:
(This example assumes two bootstrap serves are being created) (This example assumes two bootstrap serves are being created)

View File

@ -6,7 +6,7 @@ Before you get started, please review our [Code of Conduct](./code_of_conduct.md
To begin crafting code to contribute to the Veilid project, first set up a [development environment](./DEVELOPMENT.md). [Fork] and clone the project into your workspace; check out a new local branch and name it in a way that describes the work being done. This is referred to as a [feature branch]. To begin crafting code to contribute to the Veilid project, first set up a [development environment](./DEVELOPMENT.md). [Fork] and clone the project into your workspace; check out a new local branch and name it in a way that describes the work being done. This is referred to as a [feature branch].
Some contributions might introduce changes that are incompatible with other existing nodes. In this case it is recommended to also set a development network *Guide Coming Soon*. Some contributions might introduce changes that are incompatible with other existing nodes. In this case it is recommended to also setup a [development network](./dev-setup/dev-network-setup.md).
Once you have added your new function or addressed a bug, test it locally to ensure it's working as expected. If needed, test your work in a development network with more than one node based on your code. Once you're satisfied your code works as intended and does not introduce negative results or new bugs, follow the merge requests section below to submit your work for maintainer review. Once you have added your new function or addressed a bug, test it locally to ensure it's working as expected. If needed, test your work in a development network with more than one node based on your code. Once you're satisfied your code works as intended and does not introduce negative results or new bugs, follow the merge requests section below to submit your work for maintainer review.

View File

@ -0,0 +1,42 @@
# Dev Network Setup
## Purpose
There will be times when a contibutor wishes to dynamically test their work on live nodes. Doing so on the actual Veilid network would likely not yield productive test outcomes and so setting up an independent network for testing purposes is warranted.
This document outlines the process of using the steps found in [INSTALL.md](../INSTALL.md) and [BOOTSTRAP-SETUP.md](../BOOTSTRAP-SETUP.md) with some modifications which results in a reasonably isolated and independent network of Veilid development nodes which do not communicate with nodes on the actual Veilid network.
The minimum topology of a dev network is 1 bootstrap server and 4 nodes, all with public IP addresses with port 5150/TCP open. This allows enabling public address detection and private routing. The minimum specifications are 1 vCPU, 1GB RAM, and 25 GB storage.
## Quick Start
### The Network Key
This acts as a passphase to allow nodes to join the network. It is the mechanism that makes your dev network isolated and independent. Create a passphrase and protect/store it as you would any other a password.
### 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.
### Dev Nodes
1. Follow the steps detailed in [INSTALL.md](../INSTALL.md) *DO NOT START THE SYSTEMD SERVICE*
2. Replace the default veilid-server config using the dev node example [config](../doc/config/veilid-dev-server-config.md) as a template. Enter your information on lines 27 and 28 to match what was entered in the dev bootstrap server's config.
3. Start the node with fresh data
```shell
sudo -u veilid veilid-server --delete-protected-store --delete-block-store --delete-table-store`
```
4. `ctrl-c` to stop the above process
5. Start the dev node service
```shell
sudo systemctl start veilid-server.service
```
6. (Optionally) configure the service to start at boot
```shell
sudo systemctl enable veilid-server.service
```

View File

@ -0,0 +1,33 @@
# Veilid Server
# =============
#
# Public Bootstrap Server Configuration
#
# -----------------------------------------------------------
---
logging:
system:
enabled: true
level: debug
api:
enabled: true
level: debug
terminal:
enabled: false
core:
capabilities:
disable: ['TUNL','SGNL','RLAY','DIAL','DHTV','APPM']
network:
upnp: false
dht:
min_peer_count: 2
detect_address_changes: false
routing_table:
bootstrap: ['bootstrap.<your.domain>']
protected_store:
insecure_fallback_directory: '/var/db/veilid-server/protected_store'
table_store:
directory: '/var/db/veilid-server/table_store'
block_store:
directory: '/var/db/veilid-server/block_store'

View File

@ -0,0 +1,34 @@
# Veilid Server
# =============
#
# Private Development Bootstrap Server Configuration
#
# -----------------------------------------------------------
---
logging:
system:
enabled: true
level: debug
api:
enabled: true
level: debug
terminal:
enabled: false
core:
capabilities:
disable: ['TUNL','SGNL','RLAY','DIAL','DHTV','APPM']
network:
upnp: false
dht:
min_peer_count: 2
detect_address_changes: false
routing_table:
bootstrap: ['bootstrap.<your.domain>']
network_key_password: '<your-chosen-passkey>'
protected_store:
insecure_fallback_directory: '/var/db/veilid-server/protected_store'
table_store:
directory: '/var/db/veilid-server/table_store'
block_store:
directory: '/var/db/veilid-server/block_store'

View File

@ -0,0 +1,34 @@
# Veilid Server
# =============
#
# Dev Node Configuration
#
# -----------------------------------------------------------
---
logging:
system:
enabled: true
level: debug
api:
enabled: true
level: debug
terminal:
enabled: false
core:
capabilities:
disable: ['APPM']
network:
upnp: false
dht:
min_peer_count: 10
detect_address_changes: false
routing_table:
bootstrap: ['bootstrap.<your.domain>']
network_key_password: '<your-chosen-passkey>'
protected_store:
insecure_fallback_directory: '/var/db/veilid-server/protected_store'
table_store:
directory: '/var/db/veilid-server/table_store'
block_store:
directory: '/var/db/veilid-server/block_store'

View File

@ -14,7 +14,6 @@
<div style="font-family: monospace; font-size: 3em; font-weight: bold; background-color: red; color: white; padding: 0.5em;"> <div style="font-family: monospace; font-size: 3em; font-weight: bold; background-color: red; color: white; padding: 0.5em;">
early α docs<br/> early α docs<br/>
please don't share publicly
</div> </div>
<h1>Veilid Architecture Guide</h1> <h1>Veilid Architecture Guide</h1>

View File

@ -1,7 +1,3 @@
# early α docs
# please don't share publicly
# Veilid Architecture Guide # Veilid Architecture Guide
- [From Orbit](#from-orbit) - [From Orbit](#from-orbit)