From 4b5bef83e22a52394b1c5411c2a22d296225eee1 Mon Sep 17 00:00:00 2001 From: zed tan Date: Tue, 12 Sep 2023 16:19:14 +0200 Subject: [PATCH 1/3] [#253] clean up INSTALL.md - Added `Install` section to group debian and rpm installs. - Re-added `
`s -- they're used to break the `_Explanation:_` blocks to the next line. My personal preference is to _not_ use `
`s in docs, but i didn't want to change too many things here. - Shortened titles `Add the repo to a Debian ...` and `... Fedora ...` to keep it super concise and decoupled from actual steps - Some formatting best-practices - newlines between markdown blocks - indent code blocks that belong to bullet points to make sure that they are syntatically grouped (i.e. correct markdown 'DOM' hierarchy) - sudo: - Removed `sudo` explanations. `apt/dnf/yum` will not run without, no need to explain. - added `sudo` to RPM instruction code blocks (just those two) for consistency, and also you can't run dnf/yum without root anyway. - Made generic "Fedora based" instructions. Actually YUM/DNF-based, keeping it simple for now. Also name-dropped common distros for SEO/CTRL+F convenience - Removed certain `Explanation` blocks for concision. Some are repeated, and some step titles are already self-explanatory --- INSTALL.md | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9e77462a..d3a104fd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,9 +4,11 @@ These network support nodes are heavier than the node a user would establish on their phone in the form of a chat or social media application. A cloud based virtual private server (VPS), such as Digital Ocean Droplets or AWS EC2, with high bandwidth, processing resources, and uptime availability is crucial for building the fast, secure, and private routing that Veilid is built to provide. -### Add the repo to a Debian based system and install a Veilid node +## Install -This is a multi-step process. +### Debian + +Follow the steps here to add the repo to a Debian based system and install Veilid. **Step 1**: Add the GPG keys to your operating systems keyring. *Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring. @@ -15,52 +17,59 @@ This is a multi-step process. wget -O- https://packages.veilid.net/gpg/veilid-packages-key.public | sudo gpg --dearmor -o /usr/share/keyrings/veilid-packages-keyring.gpg ``` -**Step 2**: Identify your architecture +**Step 2**: Identify your architecture
*Explanation*: The following command will tell you what type of CPU your system is running ```shell dpkg --print-architecture ``` -**Step 3**: Add Veilid to your list of available software. -*Explanation*: Using the command in **Step 2** you will need to run **one** of the following: +**Step 3**: Add Veilid to your list of available software.
+*Explanation*: Use the result of your command in **Step 2** and run **one** of the following: - For **AMD64** based systems run this command: -```shell -echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null -``` + ```shell + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null + ``` - For **ARM64** based systems run this command: -```shell -echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null -``` + ```shell + echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null + ``` *Explanation*: Each of the above commands will create a new file called `veilid.list` in the `/etc/apt/sources.list.d/`. This file contains instructions that tell the operating system where to download Veilid. -**Step 4**: Refresh the package manager. -*Explanation*: This tells the `apt` package manager to rebuild the list of available software using the files in `/etc/apt/sources.list.d/` directory. This is invoked with "sudo" to grant superuser permission to make the changes. +**Step 4**: Refresh the package manager.
+*Explanation*: This tells the `apt` package manager to rebuild the list of available software using the files in `/etc/apt/sources.list.d/` directory. ```shell sudo apt update ``` **Step 5**: Install Veilid. -*Explanation*: With the package manager updated, it is now possible to install Veilid! This is invoked with "sudo" to grant superuser permission to make the changes. ```shell sudo apt install veilid-server veilid-cli ``` -### Add the repo to a Fedora based system and install a Veilid node +### RPM-based + +Follow the steps here to add the repo to +RPM-based systems (CentOS, Rocky Linux, AlmaLinux, Fedora, etc.) +and install Veilid. **Step 1**: Add Veilid to your list of available software. -*Explanation*: With the package manager updated, it is now possible to install Veilid! ```shell -yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-repo.repo +sudo yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-repo.repo +``` +**Step 2**: Install Veilid. + +```shell +sudo dnf install veilid-server veilid-cli ``` **Step 2**: Install Veilid. From a3e3ab8ab5b3267cee8e1c5cd634605e61305caa Mon Sep 17 00:00:00 2001 From: zed tan Date: Mon, 11 Sep 2023 22:21:40 +0200 Subject: [PATCH 2/3] [#253] add instructions to run veilid node Added instructions to: - Run a veilid node with systemd - add instructions for getting veilid to start at boot - Manually run a veilid node, because users may use platforms without systemd available. Changes: - Changed title to include run - Added `systemctl start ...` instructions - Added heavily caveated instructions to run veilid-server manually --- INSTALL.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d3a104fd..e30ef149 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,4 +1,4 @@ -# Install a Veilid Node +# Install and run a Veilid Node ## Server Grade Headless Nodes @@ -72,9 +72,31 @@ sudo yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-re sudo dnf install veilid-server veilid-cli ``` -**Step 2**: Install Veilid. -*Explanation*: With the package manager updated, it is now possible to install Veilid! +## Start headless node + +To start a headless Veilid node, run as root: ```shell -dnf install veilid-server veilid-cli +systemctl start veilid-server.service ``` + +To have your Veilid node start at boot: + +```shell +systemctl enable --now veilid-server.service +``` + +> **Not recommended:** +> In cases where you must run `veilid-server` +> without `systemd` (e.g., systems that use OpenRC, or containers), +> you _must_ run the `veilid-server` +> as the `veilid` user. +> Do this manually by running as root: +> +> ```shell +> # Force-allow login by setting shell +> usermod -s /bin/bash veilid +> # Run veilid-server as veilid user +> # Note that by default, veilid user is still passwordless. +> sudo -u veilid veilid-server +> ``` From 34b4419859997c612d3e51075a302941e38ef550 Mon Sep 17 00:00:00 2001 From: zed tan Date: Fri, 15 Sep 2023 22:38:32 +0200 Subject: [PATCH 3/3] [#253] implement feedback for INSTALL.md - re-add one missing `
` - add `sudo` to `systemctl` commands - removed quoted/admonished section for running veilid-server directly - instead, made 'With systemd' and 'Without systemd' sub-sections, with instructions - removed extraneous instructions to `usermod` to allow login for `veilid` user --- INSTALL.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e30ef149..cc574352 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ These network support nodes are heavier than the node a user would establish on Follow the steps here to add the repo to a Debian based system and install Veilid. -**Step 1**: Add the GPG keys to your operating systems keyring. +**Step 1**: Add the GPG keys to your operating systems keyring.
*Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring. ```shell @@ -74,29 +74,26 @@ sudo dnf install veilid-server veilid-cli ## Start headless node -To start a headless Veilid node, run as root: +### With systemd + +To start a headless Veilid node, run: ```shell -systemctl start veilid-server.service +sudo systemctl start veilid-server.service ``` -To have your Veilid node start at boot: +To have your headless Veilid node start at boot: ```shell -systemctl enable --now veilid-server.service +sudo systemctl enable --now veilid-server.service ``` -> **Not recommended:** -> In cases where you must run `veilid-server` -> without `systemd` (e.g., systems that use OpenRC, or containers), -> you _must_ run the `veilid-server` -> as the `veilid` user. -> Do this manually by running as root: -> -> ```shell -> # Force-allow login by setting shell -> usermod -s /bin/bash veilid -> # Run veilid-server as veilid user -> # Note that by default, veilid user is still passwordless. -> sudo -u veilid veilid-server -> ``` +### Without systemd + +`veilid-server` must be run as the `veilid` user. + +To start your headless Veilid node without systemd, run: + +```shell +sudo -u veilid veilid-server +```