aboutsummaryrefslogtreecommitdiff
path: root/doc/adding-nodes.md
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-22 23:44:00 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-22 23:44:00 +0100
commit0e1574a82b7067910d5403cfd46e94bcf929327a (patch)
tree96b2962ce6a8461b10db0c7ea6aea4f03ceaf909 /doc/adding-nodes.md
parent3e5e2d60cdac107cc996e0efe936ced8fd25c61d (diff)
downloadnixcfg-0e1574a82b7067910d5403cfd46e94bcf929327a.tar.gz
nixcfg-0e1574a82b7067910d5403cfd46e94bcf929327a.zip
More doc reorganization
Diffstat (limited to 'doc/adding-nodes.md')
-rw-r--r--doc/adding-nodes.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/adding-nodes.md b/doc/adding-nodes.md
new file mode 100644
index 0000000..24b409c
--- /dev/null
+++ b/doc/adding-nodes.md
@@ -0,0 +1,30 @@
+# Quick start
+
+## How to create files for a new zone
+
+*The documentation is written for the production cluster, the same apply for other clusters.*
+
+Basically:
+ - Create your `site` file in `cluster/prod/site/` folder
+ - Create your `node` files in `cluster/prod/node/` folder
+ - Add your wireguard configuration to `cluster/prod/cluster.nix`
+ - You will have to edit your NAT config manually to bind one public IPv4 port to each node
+ - Nodes' public wireguard keys are generated during the first run of `deploy_nixos`, see below
+ - Add your nodes to `cluster/prod/ssh_config`, it will be used by the various SSH scripts.
+ - If you use `ssh` directly, use `ssh -F ./cluster/prod/ssh_config`
+ - Add `User root` for the first time as your user will not be declared yet on the system
+
+## How to deploy a Nix configuration on a fresh node
+
+We suppose that the node name is `datura`.
+Start by doing the deployment one node at a time, you will have plenty of time
+in your operator's life to break everything through automation.
+
+Run:
+ - `./deploy_nixos prod datura` - to deploy the nix configuration file;
+ - a new wireguard key is printed if it hadn't been generated before, it has to be
+ added to `cluster.nix`, and then redeployed on all nodes as the new wireguard conf is needed everywhere
+ - `./deploy_passwords prod datura` - to deploy user's passwords
+ - if a user changes their password (using `./passwd`), needs to be redeployed on all nodes to setup the password on all nodes
+ - `./deploy_pki prod datura` - to deploy Nomad's and Consul's PKI
+