-
Notifications
You must be signed in to change notification settings - Fork 14
Documentation #33
base: master
Are you sure you want to change the base?
Documentation #33
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Markus Sommer | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# Application Agents | ||
|
||
## Web Server | ||
|
||
### REST-interface | ||
|
||
Specify the endpoints | ||
|
||
### WebSockets-interface | ||
|
||
Same here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Markus Sommer | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# Daemon Configuration | ||
|
||
Here, we'll go over the [sample config-file](https://github.com/dtn7/dtn7-go/blob/master/cmd/dtnd/configuration.toml) and explain the available options in-depth. | ||
|
||
## [core] | ||
|
||
### store | ||
|
||
Path to the on-disk store used to persist bundles, may be either a relative or absolute path. | ||
|
||
The store consist of a [badgerhold](https://github.com/timshannon/badgerhold) database for metadata, the bundle contents are written directly to disk. | ||
|
||
### inspect-all-bundles | ||
|
||
Inspect the Administrative Records from all Bundles, not only those addressed to this very node. | ||
By doing so, this node can learn about a delivery and clear its store without being told directly. | ||
|
||
### node-id | ||
|
||
Public name of the node. | ||
Will be set as the default endpoint ID for all CLAs, unless a different one has been specified. | ||
|
||
According to the [standard](https://tools.ietf.org/html/draft-ietf-dtn-bpbis-31#section-4.2.5.1.1), your ID should be: | ||
|
||
- `dtn:none`, if you are actually nothing | ||
- `dtn://` + the actual name + `/` <- for a unicast enpoint | ||
- `dtn://~` + the name of your multicast group + `/` <- for something that is not a unicast enpoint (it does not neccessarily have to be a multicast group, but that's the only use case I can think off the top of my head) | ||
|
||
You might also use the [other](https://tools.ietf.org/html/draft-ietf-dtn-bpbis-31#section-4.2.5.1.2) adressing scheme, but we can't guarantee that such behaviour won't lead to death and/or dismemberment. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if I also dislike the |
||
|
||
## [logging] | ||
|
||
## [discovery] | ||
|
||
## [agents] | ||
|
||
## [[listen]] | ||
|
||
## [[peer]] | ||
|
||
## [routing] | ||
|
||
Select the routing algorithm, you can choose on from the list `["epidemic", "spray", "binary_spray", "dtlsr", "prophet", "sensor-mule"]` | ||
|
||
### epidemic | ||
|
||
*Epidemic Routing* is the simplest delay-tolerant routing algorithm. | ||
All bundles are always sent to all peers, which gives the best delivery probability, but also the highest overhead. | ||
Note that `dtnd` keeps track of peers who have already been sent a specific bundle, so each bundle should only be forwarded to each peer once. | ||
|
||
### spray | ||
|
||
The *Spray & Wait* routing algorithm. | ||
|
||
### binary_spray | ||
|
||
The *Binary Spray & Wait* routing algorithm. | ||
|
||
### dtlsr | ||
|
||
The *Delay-Tolerant Link-State Routing* algorithm. | ||
|
||
### prophet | ||
|
||
The *PRoPHET* routing algorithm. | ||
|
||
### sensor-mule | ||
|
||
For dtn over equine carriers. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Markus Sommer | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# Use the `dtn-tool` or die trying |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Markus Sommer | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# dtn7-go Documentation | ||
|
||
Here be dragons. | ||
|
||
## Contents | ||
|
||
| Topic | Description | | ||
|:--------------------------------|:------------------------------------------------------------------------| | ||
| [Installation](install.md) | Instructions for manual & automatic installations | | ||
| [Configuration](config.md) | Explanation of the `dtnd` configuration options | | ||
| [Application Agents](agents.md) | APIs of the provided *Application Agents* | | ||
| [dtn-tool](dtn-tool.md) | How to use use the dtn tool, because it's not really all that intuitive | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Markus Sommer | ||
SPDX-FileCopyrightText: 2021 Alvar Penning | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
--> | ||
|
||
# Installation Instructions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about providing a dockerized / Kubernetes option? I'd be interested in working on that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mogren: I would be very happy about a short documentation and a possible example of use. Thanks a lot for your help. By the way, there are already two Dockerfiles for dnt7-go. One from @jonashoechst exists for CORE in the tutorial branch. Another one is in the dtn7-playground repository. Thus, there should already be some inspiration for the Docker part. |
||
|
||
## Manual | ||
|
||
- Install the *Go Programming language*, either through your package manager, or from [here](https://golang.org/dl/). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps add a note to always use the latest release or at least one greater than 1.13. |
||
- Clone the [source repository](https://github.com/dtn7/dtn7-go). | ||
- Check out the most recent release tag. Or don't and just build the `HEAD`, but we don't promise that it won't be broken. | ||
- (Optional) Run `go test ./...` in the repository root to make sure we didn't screw up too badly. | ||
- Run `go build ./cmd/dtnd && go build ./cmd/dtn-tool` in the repositry root to build both `dtnd` and `dtn-tool` | ||
|
||
If you want to run `dtnd` as a service, you might also want to do the following: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following section is very targeted to a specific setup; a generic GNU/Linux with systemd. Thus, this might be moved to the "Other Linux" section. You might wanna also add a reference from, e.g., Arch Linux to this section. |
||
|
||
- Put the config-file (`cmd/dtnd/configuration.toml`) in `/etc/dtn7` | ||
- Put the systemd-service (`contrib/systemd/service/dtn7.service`) in `/etc/systemd/system` | ||
- Probably run `systemctl daemon-reload` for good measure | ||
- Create the working directory `/var/lib/dtn7` | ||
- Create a `dtn7` user like this: `useradd -r -s /sbin/nologin -d /var/lib/dtn7 dtn7` | ||
- Set ownership of the working directory `chown dtn7:dtn7 /var/lib/dtn7` | ||
- Start the service: `systemctl start dtn7` | ||
|
||
If you install the arch-package, we do all of that for you. | ||
|
||
## Automatic | ||
|
||
For some select platforms, packages are provided. (Footnote: ''select'' in this case means those platforms that don't make it | ||
prohibitively complicated to package for them - looking at you, Debian) | ||
|
||
### Nix / NixOS | ||
|
||
Nix is a purely functional package manager for Linux or macOS. | ||
NixOS is a Linux distribution based on Nix. | ||
|
||
There is a [dtn7 Nix User Repository (NUR)](https://github.com/dtn7/nur-packages) which contains two versions of dtn7-go. | ||
|
||
- The `dtn7-go` package for the latest release, | ||
- and the `dtn7-go-unstbale` package which is always the latest `master` branch's `HEAD`. | ||
|
||
Both packages are automatically bumped after changes in the dtn7-go repository. | ||
|
||
You can import and install one of those dtn7 packages as described in the [dtn7 NUR's README](https://github.com/dtn7/nur-packages). | ||
Alternatively, all [NURs](https://github.com/nix-community/NUR) can be included and a dtn7-go version installed from those. | ||
|
||
### Arch Linux | ||
|
||
Install it from the [AUR](https://aur.archlinux.org/packages/dtn7) either manually, or using your favourite aur-helper. | ||
|
||
The package also installs the config file & systemd-service. | ||
Also takes care of directory & user creation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be nitpicking, but can you please replace |
||
|
||
Start daemon using `systemctl start dtn7` | ||
|
||
### Other Linux | ||
|
||
We would like to provide packages for all distributions, however we're not really sure how. | ||
Attempts at using the *Open SUSE Build Service* were unsuccessful, since the build VMs don't have internet access and therefore can't get the dependencies from `go.mod`. | ||
|
||
If you know how to (automatically) build and package go applications for other distributions or package managers, please contact us. | ||
|
||
### macOS | ||
|
||
We provide a package for macOS through [Homebrew](https://brew.sh). To install from the [provided package](https://github.com/dtn7/homebrew-dtn7): | ||
``` | ||
$ brew install dtn7/dtn7/dtn7-gp | ||
``` | ||
A configuration file (`/usr/local/etc/dtn7-go/configuration.toml`) will be created, as well as a brew services / launchd compatible service file will be created. dtn7-d's store, as well as the runtime logs will appear in `/usr/local/var/dtn7-go/`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Node ID must be an unique identifier, as specified in section 4.2.5.2. Thus, it cannot be the null endpoint or a multicast address.