2021-04-20 21:31:37 +00:00
|
|
|
# Adding a Host to the Network
|
|
|
|
|
|
|
|
This document guides an admin through adding a single host to the network. Keep
|
|
|
|
in mind that the steps described here must be done for _each_ host the user
|
|
|
|
wishes to add.
|
|
|
|
|
|
|
|
## Step 1: Choose Hostname
|
|
|
|
|
|
|
|
The user will need to provide you with a name for their host. The name should
|
|
|
|
conform to the following rules:
|
|
|
|
|
|
|
|
* It should only contain lowercase letters, numbers, and hyphens.
|
|
|
|
|
|
|
|
* It should begin with a letter.
|
|
|
|
|
|
|
|
* It should end with a letter or number.
|
|
|
|
|
2022-10-30 00:22:03 +00:00
|
|
|
## Step 2: Choose IP
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
The admin should choose an IP for the host. The IP you choose for the new host
|
2024-07-07 11:37:26 +00:00
|
|
|
should be one which is not yet used by any other host and is in a subnet which
|
|
|
|
was configured when creating the network.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
## Step 3: Create a `bootstrap.json` File
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
Access to an `admin.json` file is required for this step.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
To create a `bootstrap.json` file for the new host, the admin should perform the
|
2021-04-20 21:31:37 +00:00
|
|
|
following command from their own host:
|
|
|
|
|
|
|
|
```
|
2023-08-13 14:37:37 +00:00
|
|
|
isle admin create-bootstrap \
|
2022-11-05 11:34:49 +00:00
|
|
|
--hostname <name> \
|
2022-10-30 00:22:03 +00:00
|
|
|
--ip <ip> \
|
2024-06-10 16:56:36 +00:00
|
|
|
--admin-path <path to admin.json> \
|
|
|
|
> bootstrap.json
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
2024-07-07 11:37:26 +00:00
|
|
|
The resulting `bootstrap.json` file should be treated as a secret file and
|
2024-06-10 16:56:36 +00:00
|
|
|
shared only with the user it was generated for. The `bootstrap.json` file should
|
2024-07-07 11:37:26 +00:00
|
|
|
not be re-used between hosts.
|
|
|
|
|
|
|
|
The user can now proceed with calling `isle network join`, as described in the
|
|
|
|
[Getting Started][getting-started] document.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-07-07 11:37:26 +00:00
|
|
|
[getting-started]: ../user/getting-started.md
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
### Encrypted `admin.json`
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
If `admin.json` is kept in an encrypted format on disk (it should be!) then the
|
2022-11-05 15:41:14 +00:00
|
|
|
decrypted form can be piped into `create-bootstrap` over stdin. For example, if
|
2024-06-10 16:56:36 +00:00
|
|
|
GPG is being used to secure `admin.json` then the following could be used to
|
|
|
|
generate a `bootstrap.json`:
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
```
|
2024-06-10 16:56:36 +00:00
|
|
|
gpg -d <path to admin.json.gpg> | isle admin create-bootstrap \
|
2022-11-05 11:34:49 +00:00
|
|
|
--hostname <name> \
|
2022-10-30 00:22:03 +00:00
|
|
|
--ip <ip> \
|
2021-04-20 21:31:37 +00:00
|
|
|
--admin-path - \
|
2024-06-10 16:56:36 +00:00
|
|
|
> bootstrap.json
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
Note that the value of `--admin-path` is `-`, indicating that `admin.json`
|
|
|
|
should be read from stdin.
|