2021-04-20 21:31:37 +00:00
|
|
|
# Getting Started
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
This document will guide you through the process of obtaining an isle
|
|
|
|
binary and joining a network.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-01-29 18:01:58 +00:00
|
|
|
NOTE currently only linux machines with the following architectures are
|
|
|
|
supported:
|
|
|
|
|
|
|
|
- `x86_64` / `amd64`
|
|
|
|
- `aarch64` / `arm64`
|
|
|
|
- `i686`
|
|
|
|
|
|
|
|
(Only `x86_64` has been tested.)
|
|
|
|
|
2021-04-20 21:31:37 +00:00
|
|
|
More OSs and architectures coming soon!
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
## Obtaining an isle Binary
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-12-23 16:06:16 +00:00
|
|
|
### The Easy Way
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-12-23 16:06:16 +00:00
|
|
|
Download the latest binary for your platform from
|
|
|
|
[this link](https://code.betamike.com/micropelago/isle/releases/latest).
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-12-23 16:06:16 +00:00
|
|
|
### The Hard Way
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
Alternatively, you can build your own binary by running the following from the
|
|
|
|
project's root:
|
|
|
|
|
|
|
|
```
|
|
|
|
nix-build -A appImage
|
|
|
|
```
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
(*NOTE* Dependencies of `isle` seemingly compile all of musl and rust
|
2022-10-07 19:05:51 +00:00
|
|
|
from scratch (it's not clear why, blame garage!). If you have not otherwise
|
|
|
|
configured it, nix might be using a tmpfs as its build directory, and the
|
|
|
|
capacity of this tmpfs will probably be exceeded by this build. You can change
|
|
|
|
your build directory to somewhere on-disk by setting the TMPDIR environment
|
|
|
|
variable for `nix-daemon` (see [this github issue][tmpdir-gh].))
|
|
|
|
|
2021-04-20 21:31:37 +00:00
|
|
|
The resulting binary can be found in the `result` directory which is created.
|
|
|
|
|
2022-10-07 19:05:51 +00:00
|
|
|
[tmpdir-gh]: https://github.com/NixOS/nix/issues/2098#issuecomment-383243838
|
|
|
|
|
2023-12-23 16:06:16 +00:00
|
|
|
## Obtaining Your Bootstrap File
|
|
|
|
|
2024-06-10 16:56:36 +00:00
|
|
|
The `bootstrap.json` file contains all information required for your particular
|
2023-12-23 16:06:16 +00:00
|
|
|
host to join the network, and must be generated and provided to you by an admin
|
|
|
|
for the network.
|
|
|
|
|
2021-04-20 21:31:37 +00:00
|
|
|
## Running the Daemon
|
|
|
|
|
2023-12-23 16:06:16 +00:00
|
|
|
Once you have a binary and bootstrap file, you will need to run the `daemon`
|
|
|
|
sub-command as the root user. This can most easily be done using the `sudo`
|
|
|
|
command, in a terminal:
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
```
|
2024-06-10 16:56:36 +00:00
|
|
|
sudo /path/to/isle daemon --bootstrap-path /path/to/bootstrap.json
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
This will start the daemon process, which will keep running until you kill it
|
2024-06-10 16:56:36 +00:00
|
|
|
with `ctrl-c`. The `--bootstrap-path /path/to/bootstrap.json` argument is only
|
2023-12-23 16:06:16 +00:00
|
|
|
required the first time the daemon is run, it will be ignored on subsequent
|
|
|
|
runs.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
You can double check that the daemon is running properly by pinging a private IP
|
|
|
|
from the network in a separate terminal:
|
|
|
|
|
|
|
|
```
|
|
|
|
ping 10.10.0.1
|
|
|
|
```
|
|
|
|
|
|
|
|
If the pings are successful then your daemon is working!
|
|
|
|
|
|
|
|
## Installing the Daemon as a Systemd Service
|
|
|
|
|
|
|
|
NOTE in the future we will introduce an `install` sub-command which will
|
|
|
|
automate most of this section.
|
|
|
|
|
|
|
|
Rather than running the daemon manually, you can install it as a systemd
|
|
|
|
service. This way your daemon will automatically start in the background on
|
|
|
|
startup, and will be restarted if it has any issues.
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
To do so, create a file at `/etc/systemd/system/isle.service` with the
|
2021-04-20 21:31:37 +00:00
|
|
|
following contents:
|
|
|
|
|
|
|
|
```
|
|
|
|
[Unit]
|
2023-08-05 21:53:17 +00:00
|
|
|
Description=isle
|
2021-04-20 21:31:37 +00:00
|
|
|
Requires=network.target
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=always
|
|
|
|
RestartSec=1s
|
|
|
|
User=root
|
2023-08-05 21:53:17 +00:00
|
|
|
ExecStart=/path/to/isle daemon
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
```
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
Remember to change the `/path/to/isle` part to the actual absolute path
|
2021-04-20 21:31:37 +00:00
|
|
|
to your binary!
|
|
|
|
|
|
|
|
Once created, perform the following commands in a terminal to enable the
|
|
|
|
service:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo systemctl daemon-reload
|
2023-08-05 21:53:17 +00:00
|
|
|
sudo systemctl enable --now isle
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
You can check the service's status by doing:
|
|
|
|
|
|
|
|
```
|
2023-08-05 21:53:17 +00:00
|
|
|
sudo systemctl status isle
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
and you can view its full logs by doing:
|
|
|
|
|
|
|
|
```
|
2023-08-05 21:53:17 +00:00
|
|
|
sudo journalctl -lu isle
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|