|
|
|
@ -6,13 +6,35 @@ club accounts and memberships. See [architecture.md](architecture.md) for an |
|
|
|
|
overview of its architecture. |
|
|
|
|
|
|
|
|
|
## Development |
|
|
|
|
First, make sure that you have installed the |
|
|
|
|
### Docker |
|
|
|
|
If you are not modifying code related to email or Mailman, then you may use |
|
|
|
|
Docker containers instead, which are much easier to work with than the VM. |
|
|
|
|
``` |
|
|
|
|
docker.sh up |
|
|
|
|
``` |
|
|
|
|
This will create some containers with the bare minimum necessary for ceod to |
|
|
|
|
run. Run `docker logs -f phosphoric-acid` and wait until you see the line |
|
|
|
|
`sleep infinity`. Then attach to each of phosphoric-acid, mail and coffee, |
|
|
|
|
and start ceod (see 'Running the application', below). Once inside a container, |
|
|
|
|
make sure to `cd` into the current working directory on the host. |
|
|
|
|
|
|
|
|
|
To use ceo, run the following inside the phosphoric-acid container: |
|
|
|
|
``` |
|
|
|
|
login |
|
|
|
|
<username is ctdalek, password is krb5> |
|
|
|
|
<cd into your directory OUTSIDE the container> |
|
|
|
|
. venv/bin/activate |
|
|
|
|
python -m ceo |
|
|
|
|
``` |
|
|
|
|
This should bring up the TUI. |
|
|
|
|
|
|
|
|
|
### VM |
|
|
|
|
If you are making changes related to email or Mailman, you will need the full |
|
|
|
|
[syscom dev environment](https://git.uwaterloo.ca/csc/syscom-dev-environment). |
|
|
|
|
This will setup all of the services needed for ceo to work. You should clone |
|
|
|
|
this repo in the phosphoric-acid container under ctdalek's home directory; you |
|
|
|
|
will then be able to access it from any container thanks to NFS. |
|
|
|
|
|
|
|
|
|
### Environment setup |
|
|
|
|
Once you have the dev environment setup, there are a few more steps you'll |
|
|
|
|
need to do for ceo. |
|
|
|
|
|
|
|
|
@ -148,8 +170,16 @@ is running. Stop the flask app (Ctrl-C), run `clear_cache.sh`, then |
|
|
|
|
restart the app. |
|
|
|
|
|
|
|
|
|
## Interacting with the application |
|
|
|
|
The client part of ceo hasn't been written yet, so we'll use curl to |
|
|
|
|
interact with ceod for now. |
|
|
|
|
To use the TUI: |
|
|
|
|
``` |
|
|
|
|
python -m ceo |
|
|
|
|
``` |
|
|
|
|
To use the CLI: |
|
|
|
|
``` |
|
|
|
|
python -m ceo --help |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
Alternatively, you may use curl to send HTTP requests. |
|
|
|
|
|
|
|
|
|
ceod uses [SPNEGO](https://en.wikipedia.org/wiki/SPNEGO) for authentication, |
|
|
|
|
and TLS for confidentiality and integrity. In development mode, TLS can be |
|
|
|
|