From 242fdff00c3abf292b7db07d9150fbeebdbc8ab0 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 14 Mar 2022 17:03:30 +0000 Subject: [PATCH] docs: General update for switching to wheel for install --- docs/Developers.md | 6 ++-- docs/Running-this-software.md | 35 +++++++++++------------ docs/eddn-settings-overrides-EXAMPLE.json | 6 ++-- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/docs/Developers.md b/docs/Developers.md index 66aa1eb..b7ca85d 100644 --- a/docs/Developers.md +++ b/docs/Developers.md @@ -128,7 +128,7 @@ compress this body then you MUST set a `Content-Type` header of `applicaton/json`. You *MAY* use gzip compression on the body of the message, but it is not -required. If you do compress the body then you **MUST* send a `Content-Type` +required. If you do compress the body then you **MUST** send a `Content-Type` header of `gzip` instead of `application/json`. **Due to issues when messages are compressed, form-encoded data is NO LONGER @@ -380,11 +380,11 @@ make a valid request" responses you might experience the following: To verify the current limit check for the line that looks like: ``` - bottle.BaseRequest.MEMFILE_MAX = 1024 * 1024 # 1MiB, default is/was 100KiB + bottle.BaseRequest.MEMFILE_MAX = 1024 * 1024 # 1MiB, default is/was 100KiB ``` in - [src/eddn/Gateway.py](https://github.com/EDCD/EDDN/blob/live/src/eddn/Gateway.py), + [src/EDDN_Gateway.py](https://github.com/EDCD/EDDN/blob/live/src/EDDN_Gateway.py), as added in [commit 0e80c76cb564771465f61825e694227dcc3be312](https://github.com/EDCD/EDDN/commit/0e80c76cb564771465f61825e694227dcc3be312). diff --git a/docs/Running-this-software.md b/docs/Running-this-software.md index 31310e3..80cc46c 100644 --- a/docs/Running-this-software.md +++ b/docs/Running-this-software.md @@ -364,7 +364,7 @@ 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 + python EDDN_Gateway.py --config some/other/configfile.json 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 @@ -374,8 +374,9 @@ There is an **example** of this in [eddn-settings-overrides-EXAMPLE.json](./eddn-settings-overrides-EXAMPLE.json). It sets: - 1. The gateway to listen on `0.0.0.0` rather than localhost (necessary - when testing in a VM). + 1. Sets CERT_FILE and KEY_FILE to empty strings to that no TLS termination + happens in the EDDN components. This necessitates using a reverse proxy + for *all* of the endpoints, including the various statistics URLs. 1. Configures the database connection and credentials. 1. Turns off the relay duplicate check. @@ -386,14 +387,12 @@ You have some choices for how to run the application components: ## Running scripts from source If you are just testing out code changes then you can choose to run -this application directly from the source using the script -`systemd/start-eddn-service`. You'll need to run it as, e.g. +this application directly from the source: - systemd/start-eddn-service dev gateway --from-source - -When using `--from-source` you can also supply a `--background` argument to -put the process into the background with a `.pid` file written in the logs -directory. +``` +cd /src +python EDDN_Gateway.py --config +``` Check the `systemd/eddn__config` files for the location of the logs directory. @@ -417,11 +416,13 @@ environment: 1. As we're using a python venv we can now just run: - `python setup.py install` + `python setup.py bdist_wheel` - to install it all. This will install a python egg into the python - venv, and then also ensure that the monitor and schema files are in - place, along with support scripts. + to build a .whl file into the `dist/` directory. This also ensures that + the monitor and schema files are in place, along with support scripts. + You will then need to install the wheel: + + `pip install dist/eddn--py3-none-any.whl` There is an example systemd setup in `systemd` that assumes this local installation. @@ -453,7 +454,7 @@ via system, including at boot time. to start/stop any of the EDDN services **in the live environment**. You would invoke it like: - `systemctl start eddn@eddn-gateway.service` + `systemctl start eddn@gateway.service` 1. `systemd/eddn.target` - a system target until file which will start all of: @@ -484,10 +485,6 @@ installed*. You will need to copy the example file to the live name and edit to suit. -In addition there's also `monitor/schemas.html` which has the hostname -`eddn.edcd.io` hard-coded into it. So you'll need to do a search and -replace on it. - --- # Accessing the Monitor diff --git a/docs/eddn-settings-overrides-EXAMPLE.json b/docs/eddn-settings-overrides-EXAMPLE.json index d748b76..97952e7 100644 --- a/docs/eddn-settings-overrides-EXAMPLE.json +++ b/docs/eddn-settings-overrides-EXAMPLE.json @@ -1,8 +1,6 @@ { - "CERT_FILE": "/home/eddn/etc/fullchain.pem", - "KEY_FILE": "/home/eddn/etc/privkey.pem", - - "GATEWAY_HTTP_BIND_ADDRESS": "0.0.0.0", + "CERT_FILE": "", + "KEY_FILE": "", "MONITOR_DB": { "database": "eddn",