docs/Running: Section-ise the setup.py install section

* Moves the "you need to edit these files in the monitor" into a section
  related to this, rather than up in #concepts.
This commit is contained in:
Athanasius 2021-07-05 14:36:24 +00:00
parent 8f36f8dcfe
commit 547ec2bc22

View File

@ -306,16 +306,8 @@ from the Gateway to the Relay and Monitor.
As the code currently (2021-05-16) stands it MUST run on a standalone host As the code currently (2021-05-16) stands it MUST run on a standalone host
such that everything is served relative to the path root, not a path prefix. such that everything is served relative to the path root, not a path prefix.
Also all of the `contrib/monitor` files have `eddn.edcd.io` hard-coded. You See also the [post-installation notes](#post-installation-steps) for some
will need to perform search and replace on the installed/live files to use a caveats about running this other than on the actual eddn.edcd.io host.
test host. The files in question are:
monitor/js/eddn.js
monitor/schemas.html
Replace the string `eddn.edcd.io` with the hostname you're using. You'll need
to perform similar substitutions if you change the configuration to use any
different port numbers.
--- ---
@ -403,55 +395,73 @@ 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. If you are just testing out code changes then you can choose to run ## Running scripts from source
this application directly from the source using the provided script in If you are just testing out code changes then you can choose to run
`contrib/run-from-source.sh`. this application directly from the source using the provided script in
`contrib/run-from-source.sh`. This assumes the `dev` environment.
1. Otherwise you will want to utilise the `setup.py` file to build and ## Running from installation
install the application files. You'll need to do some setup first as Otherwise you will want to utilise the `setup.py` file to build and
there are necessary files *not* checked into git, because they're per install the application files. You'll need to do some setup first as
environment: there are necessary files *not* checked into git, because they're per
environment:
1. Change directory to the top level of the git clone. ### Performing the installation
1. Change directory to the top level of the git clone.
1. Create a file `setup_env.py` with contents: 1. Create a file `setup_env.py` with contents:
``` ```
EDDN_ENV="dev" EDDN_ENV="dev"
``` ```
Replace `dev` with the environment you're setting up for.
1. As we're using a python venv we can now just run: Replace `dev` with the environment you're setting up for.
`python setup.py install` 1. As we're using a python venv we can now just run:
to install it all. This will install a python egg into the python `python setup.py install`
venv, and then also ensure that the monitor and schema files are in
place, along with support scripts.
There is an example systemd setup in `contrib/systemd` that assumes
this local installation.
There are also some SysV style init.d scripts in `contrib/init.d/` for
running the components. They will need the `DAEMON` lines tweaking for
running from another location.
You should now have: 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
1. `~/.local/bin` - with some scripts and per-environment config files: place, along with support scripts.
There is an example systemd setup in `contrib/systemd` that assumes
this local installation.
There are also some SysV style init.d scripts in `contrib/init.d/` for
running the components. They will need the `DAEMON` lines tweaking for
running from another location.
You should now have:
1. `~/.local/bin` - with some scripts and per-environment config files:
1. `start-eddn-dev-service` - script that runs a specified EDDN service.
This is intended to be used by the contrib systemd setup, but will
work standalone as well.
1. `eddn-logs-archive` - script that potentially archives and expires
existing archival logs for the specified environment.
1. `~/.local/share/eddn/dev` - with the monitor and schema files, along
with an example config override file if you didn't already have a
`config.json` here.
### Post-installation steps
If you're not using the `live` environment then there are some edits you
need to make.
All of the `contrib/monitor` files have the hostname `eddn.edcd.io`
hard-coded. You will need to perform search and replace on the
installed/live files to use a test host. The files in question are:
monitor/js/eddn.js
monitor/schemas.html
Replace the string `eddn.edcd.io` with the hostname you're using.
You'll need to perform similar substitutions if you change the
configuration to use any different port numbers.
1. `start-eddn-dev-service` - script that runs a specified EDDN service.
This is intended to be used by the contrib systemd setup, but will
work standalone as well.
1. `eddn-logs-archive` - script that potentially archives and expires
existing archival logs for the specified environment.
1. `~/.local/share/eddn/dev` - with the monitor and schema files, along
with an example config override file if you didn't already have a
`config.json` here.
--- ---
# Accessing the Monitor # Accessing the Monitor