docs/Running: Mandate the python venv installation

Let's stop guessing at how the reader wants to do it and just *tell*
them how to do it instead.

Python virtual environment, done.
This commit is contained in:
Athanasius 2021-06-14 17:12:43 +01:00
parent db7b69473b
commit d16e222a99

View File

@ -155,22 +155,6 @@ You will need to get the database schema in place:
mysql -p eddn < ${HOME}/eddn/dev/EDDN/schema.sql mysql -p eddn < ${HOME}/eddn/dev/EDDN/schema.sql
<the password you set in the "CREATE USER" statement above> <the password you set in the "CREATE USER" statement above>
### Monitor and Schema files
The Monitor files are not currently installed anywhere by the `setup.py`
script, so you'll need to manually copy them into somewhere convenient,
e.g.:
mkdir -p ${HOME}/.local/share/eddn
cp -r ${HOME}/eddn/dev/EDDN/contrib/monitor ${HOME}/.local/share/eddn
chmod -R og+rX ${HOME} ${HOME}/.local ${HOME}/.local/share ${HOME}/.local/share/eddn
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. So perform, e.g.:
mkdir -p ${HOME}/.local/share/eddn
cp -r ${HOME}/eddn/dev/EDDN/schemas ${HOME}/.local/share/eddn
chmod -R og+rX ${HOME}/.local/share/eddn/schemas
# Concepts # Concepts
There are three components to this application. There are three components to this application.
@ -277,32 +261,27 @@ It sets:
# Running # Running
You have some choices for how to run the application components: You have some choices for how to run the application components:
1. You can choose to run this application directly from the source using the 1. If you are just testing out code changes then you can choose to run
provided script in `contrib/run-from-source.sh`. this application directly from the source using the provided script in
`contrib/run-from-source.sh`.
1. Or you can utilise the `setup.py` file to build and install the application 1. Otherwise you will want to utilise the `setup.py` file to build and
files. By default this requires write permissions under `/usr/local`, but install the application files. As we're using a python venv we can just
you can run: run:
python setup.py install --user python setup.py install
to install under `${HOME}/.local/` instead. 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.
There is an example systemd setup in `contrib/systemd` that assumes There is an example systemd setup in `contrib/systemd` that assumes
this local installation. this local installation.
If you install into `/usr/local/` then there are SysV style init.d scripts There are also some SysV style init.d scripts in `contrib/init.d/` for
in `contrib/init.d/` for running the components. They will need the running the components. They will need the `DAEMON` lines tweaking for
`DAEMON` lines tweaking for running from another location. running from another location.
1. For quick testing purposes you can run them as follows, assuming you
installed into `${HOME}/.local/`, and have your override settings in
`${HOME}/etc/eddn-settings-overrides.json`:
${HOME}/.local/bin/eddn-gateway --config ${HOME}/etc/eddn-settings-overrides.json >> ${HOME}/logs/eddn-gateway.log 2>&1 &
${HOME}/.local/bin/eddn-monitor --config ${HOME}/etc/eddn-settings-overrides.json >> ${HOME}/logs/eddn-monitor.log 2>&1 &
${HOME}/.local/bin/eddn-relay --config ${HOME}/etc/eddn-settings-overrides.json >> ${HOME}/logs/eddn-relay.log 2>&1 &
# Accessing the Monitor # Accessing the Monitor
There is an EDDN Status web page usually provided at, e.g. There is an EDDN Status web page usually provided at, e.g.
https://eddn.edcd.io/. This is enabled by the Monitor component through https://eddn.edcd.io/. This is enabled by the Monitor component through
@ -312,6 +291,18 @@ by the Monitor process itself.
You will need to configure a reverse proxy to actually enable access to this. You will need to configure a reverse proxy to actually enable access to this.
There is an example nginx configuration in `contrib/nginx-eddn.conf`. There is an example nginx configuration in `contrib/nginx-eddn.conf`.
The necessary files should be put in place by
The 'monitor' files are what form the status/statistics page at
https://eddn.edcd.io/, so they need to be installed somewhere in a
static manner accessible to nginx.
Although setup.py installs the files you might still need to ensure the
permissions are correct for your web server to access them.
chmod -R og+rX ${HOME} ${HOME}/.local ${HOME}/.local/share ${HOME}/.local/share/eddn
chmod -R og+rX ${HOME}/.local/share/eddn/schemas
## Testing all of this in a VM ## 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 In order to test all of this in a VM you might need to set up a double
proxying: proxying: