Node¶
Prerequisite¶
To properly configure your Node, you need the followings:
- Docker 19.03.12
-
A Linux server with a ssh access
- host for SSH connection
- username for SSH connection
- SSH key for SSH connection
- Optional: passphrase, if the SSH key is passphrase protected.
-
To verify the above information, you can execute the following command and make sure that login is successful without the password.
1$ ssh -i path/to/ssh-key-file username@host
Create a Node¶
Start by creating a new node using the cli.
1 2 3 4 5 | |
Configure the Node¶
Configure the node using your default editor with:
1 | |
Alternatively, you can directly open the
config.yamlfile inside the node folder.
Note:
- Enter the host and the username in the config file.
- Put the
ssh_key_fileinside thekeysdirectory. - Configure path to the
ssh_key_fileas follows:1 2 3
# node1/config.yaml ssh: key: ../keys/ssh_key_file - Enter the docker registry and username provided by Leitwert.
Configure the node secrets¶
Then, edit the secrets of the node using:
1 | |
Alternatively, you can directly edit the
secrets.yamlfile usingsops secrets.yaml
The relative path can be omitted if you are in the corresponding folder.
Note:
- Enter the docker token provided by Leitwert
- Enter the passphrase of the SSH key, if it exists, in the secrets file.
Template a Node¶
Template the node using its configuration using:
1 | |
All templated files are stored inside the
.output/<node-name>folder from the workspace.
Deploy a Node¶
Finally, all templated files can be deployed to the node using:
1 | |
Note that by default, the deploy command automatically template the files
Workspace¶
At the end of this tutorial, your workspace should have the following tree structure:
1 2 3 4 5 6 7 8 9 10 | |