docs/running: Formatting fixups.

This commit is contained in:
Athanasius 2021-05-16 17:12:52 +01:00
parent 1e4eb9e0e1
commit 4229d59450

View File

@ -88,12 +88,11 @@ another file.
1. `MONITOR_RECEIVER_BINDINGS` defines where the Monitor connects in order to
subscribe to messages from the Gateway. Should match
`GATEWAY_SENDER_BINDINGS`.
1. `MONITOR_DB` - defines the necessary information for the application to
connect to a mysql/mariadb database for storing stats.
1. `MONITOR_UA` appears to be unused.
1. Database Configuration
This is performed in the `MONITOR_DB` key:
1. `MONITOR_DB` - defines the necessary information for the application to
connect to a mysql/mariadb database for storing stats.
1. `database` - the name of the database
1. `user` - the user to connect as
1. `password` - the secure password you set above when installing and
@ -101,14 +100,15 @@ another file.
It is assumed that the database is on `localhost`.
Any of these settings can be overridden by a separate config file that you
then pass to the application scripts, e.g.:
To change anything from the defaults create an override config file, which
must be in valid JSON format (so no comments, no dangling commas etc).
You can then pass this file to the application scripts, e.g.:
python Gateway.py --config some/other/configfile.json
this way you can utilise such a file to override settings for certificate
files and database credentials without worrying about the basic setup. Think
of `src/eddn/conf/Settings` as the defaults.
You only need to define the settings that you need to change from defaults,
e.g. certificate files and database credentials, without worrying about the
basic setup.
## Running
You have two choices for how to run the application components:
@ -128,6 +128,14 @@ You have two choices for how to run the application components:
in `contrib/init.d/` for running the components. They will need the
`DAEMON` lines tweaking for running from another location.
1. For quick testing purposes you can run them as follows, assuming you
installed into `~/.local/`, and have your override settings in
`${HOME}/etc/eddn-settings-overrides.json`:
~/.local/bin/eddn-gateway --config ${HOME}/etc/eddn-settings-overrides.json >> ~/logs/eddn-gateway.log 2>&1 &
~/.local/bin/eddn-monitor --config ${HOME}/etc/eddn-settings-overrides.json >> ~/logs/eddn-monitor.log 2>&1 &
~/.local/bin/eddn-relay --config ${HOME}/etc/eddn-settings-overrides.json >> ~/logs/eddn-relay.log 2>&1 &
## Accessing the Monitor
There is an EDDN Status web page usually provided at https://eddn.edcd.io/ .
This is enabled by the Monitor component through the combination of the
@ -148,9 +156,9 @@ There is an example nginx configuration in `contrib/nginx-eddn.conf`.
You will need to ensure that the Monitor nginx setup can see the schema files
in order to serve them for use by the Gateway:
1. mkdir -p ${HOME}/.local/share/eddn
1. cp -r <eddn source root>/schemas ${HOME}/.local/share/eddn
1. chmod -R og+rX ${HOME}/.local/share/eddn/schemas
mkdir -p ${HOME}/.local/share/eddn
cp -r <eddn source root>/schemas ${HOME}/.local/share/eddn
chmod -R og+rX ${HOME}/.local/share/eddn/schemas
## Netdata
In order to get host performance metrics (CPU, RAM and network usage) you will
@ -173,16 +181,18 @@ some assumptions:
1. The hostname being used - `server_name` directives.
1. The location of the monitor files - `root` directive.
1. The location of the schema files - `location` directive.
1. The location of the TLS certificate files.
1. The location of the TLS certificate files - `ssl_certificate` and
`ssl_certificate_key` directives.
You should be able to:
1. Copy this into `/etc/nginx/sites-available/eddn`
1. Copy `contrib/nginx-eddn.conf` into `/etc/nginx/sites-available/eddn`.
1. Edit to suit the local situation/setup.
1. Enable the site:
cd /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available/eddn
systemctl restart nginx.service
## Testing all of this in a VM
In order to test all of this in a VM you might need to set up a double
@ -203,6 +213,9 @@ If using Apache on a Debian server then you need some ProxyPass directives:
ProxyPass "/eddn/" "https://VM_HOST/"
</IfModule>
Note how the external URLs will all begin, `https://yourserver/eddn/`, not just
`https://yourserver/`.
You'll also need to redirect the Gateway and Relay ports using firewall rules.
With iptables: