Skip to content
Snippets Groups Projects
Commit 5c44069b authored by juga's avatar juga
Browse files

service/anon_ticket: Improve documentation

parent 00000401
No related branches found
No related tags found
1 merge request!44service/anon_ticket: Try to clarify ticketlobby
......@@ -6,12 +6,6 @@ The project is developed in-house and hosted on GitLab at
[[_TOC_]]
<!-- note: this template was designed based on multiple sources: -->
<!-- https://diataxis.fr/ -->
<!-- http://opsreportcard.com/section/9-->
<!-- http://opsreportcard.com/section/11 -->
<!-- comments like this one should be removed on instantiation -->
# Tutorial
<!-- simple, brainless step-by-step instructions requiring little or -->
......@@ -29,19 +23,13 @@ The project is developed in-house and hosted on GitLab at
## Disaster recovery
<!-- what to do if all goes to hell. e.g. restore from backups? -->
<!-- rebuild from scratch? not necessarily those procedures (e.g. see -->
<!-- "Installation" below but some pointers. -->
# Reference
If the PostgreSQL database isn't lost, see the
[installation procedure](#installation).
<!-- this section is a more in-depth review of how this service works, -->
<!-- how it's setup. day-to-day operation should be covered in -->
<!-- tutorial or how-to, this is more in-depth -->
If having to install from scratch, see also
[anon_ticket Quickstart](https://gitlab.torproject.org/tpo/tpa/anon_ticket#11-quickstart)
<!-- a good guide to "audit" an existing project's design: -->
<!-- https://bluesock.org/~willkg/blog/dev/auditing_projects.html -->
<!-- the following sections are partially based on that -->
# Reference
## Installation
......@@ -57,22 +45,24 @@ activated.
## Upgrades
<!-- how upgrades are performed. preferably automated through Debian -->
<!-- packages, otherwise document how upgrades are performed. see also -->
<!-- the Testing section below -->
$ source .env/bin/activate # To activate the python virtual environment
$ cd anon_ticket
$ git fetch origin main
$ git merge origin/main
$ python manage.py migrate # To apply new migrations
$ python manage.py collectstatic # To generate new `static` files
$ systemctl --user reload/restart ticketlobby.service
## SLA
<!-- this describes an acceptable level of service for this service -->
There is no SLA established for this service.
## Design and architecture
<!-- how this is built -->
<!-- should reuse and expand on the "proposed solution" discussed in -->
<!-- a previous RFC or the Discussion section below. it's a -->
<!-- "as-built" documented, whereas the "Proposed solution" is an -->
<!-- "architectural" document, which the final result might differ -->
<!-- from, sometimes significantly -->
`anon_ticket` is a [Django](https://www.djangoproject.com/) application and
project. Frontend is served by gunicorn and ngnix as proxy and nginx for
`static` files. It uses TPA's [postgresql](howto/postgresql) for storage and
[Gitlab](howto/gitlab) API to create users, issues and notes on issues.
## Services
......@@ -85,24 +75,28 @@ Persistent data is stored in a PostgreSQL database.
## Queues
<!-- email queues, job queues, schedulers -->
None.
## Interfaces
<!-- e.g. web APIs, commandline clients, etc -->
This service uses the [Gitlab REST API](https://docs.gitlab.com/ee/api/rest/).
The application can be managed via its Web interface or via
[Django cli](https://docs.djangoproject.com/en/3.1/ref/django-admin/)
## Authentication
<!-- SSH? LDAP? standalone? -->
standalone plus [Gitlab API tokens](https://docs.gitlab.com/ee/user/group/settings/group_access_tokens.html),
see [tpo/tpa/team#41510](https://gitlab.torproject.org/tpo/tpa/team/-/issues/41510).
## Implementation
<!-- programming languages, frameworks, versions, license -->
Python, Django >= 3.1 licensed under BSD 3-Clause "New" or "Revised" license.
## Related services
<!-- dependent services (e.g. authenticates against LDAP, or requires -->
<!-- git pushes) -->
[Gitlab](howto/gitlab), [PosgreSQL](howto/postgresql), nginx
## Issues
......@@ -110,34 +104,50 @@ This project has its own issue tracker at https://gitlab.torproject.org/tpo/tpa/
## Maintainer
<!-- document who deployed and operates this service, the team and -->
<!-- ideally the person inside that team -->
Service deployed by @lavamind, @juga and @ahf.
## Users
<!-- who the main users are, how they use the service. possibly reuse -->
<!-- the Personas section in the RFC, if available. -->
Any user that wish to report/comment an issue in https://gitlab.torproject.org,
without having an account.
## Upstream
<!-- who the upstreams are, if they are still active, -->
<!-- collaborative, how do we keep up to date, support channels, see -->
<!-- also the "Issues" section above -->
Upstream are volunteers and some TPI persons, see
[Contributor analytics](https://gitlab.torproject.org/tpo/tpa/anon_ticket/-/graphs/master?ref_type=heads)
Upstream is not very active.
To report Issues, see [Issues](#issues).
## Monitoring and metrics
<!-- describe how this service is monitored, how security issues and -->
<!-- upgrades are tracked, see also "Upgrades" above. -->
No known monitoring nor metrics.
To keep up to date, see [Upgrades](#upgrades).
## Tests
<!-- how the service can be tested, for example after major changes -->
<!-- like IP address changes or upgrades. describe CI, test suites, linting -->
The service has to be tested manually, going to
https://anonticket.torproject.org and check that you can:
- `create identifier`
- `login with identifier`
- `See a list of all projects`
- `Search for an issue`
- `Create an issue`
- Create a `note` on an existing issue
- `See My Landing Page`
- `request gitlab account`
To test the code, see
[anon_ticket Tests](https://gitlab.torproject.org/tpo/tpa/anon_ticket/-/tree/master?ref_type=heads#50-tests)
## Logs
<!-- where are the logs? how long are they kept? any PII? -->
<!-- what about performance metrics? same questions -->
Logs are sent to journal. Gunicorn access and error logs are also saved at
`$HOME/log` without IP (proxy's one) nor User-Agent.
## Backups
......@@ -146,19 +156,17 @@ This project has its own issue tracker at https://gitlab.torproject.org/tpo/tpa/
## Other documentation
<!-- references to upstream documentation, if relevant -->
[anon_ticket README](https://gitlab.torproject.org/tpo/tpa/anon_ticket/-/blob/2fa7b0aaf5b143032f92b3df61b13ebe66d2101b/readme.MD)
# Discussion
<!-- the "discussion" section is where you put any longer conversation -->
<!-- about the project that you will not need in a casual -->
<!-- review. history of the project, why it was done the way it was -->
<!-- (as opposed to how), alternatives, and other proposals are -->
<!-- relevant here. -->
This service was initially deployed by @ahf at https://anonticket.onionize.space/
and has been migrated here, see
[tpo/tpa/team#40577](https://gitlab.torproject.org/tpo/tpa/team/-/issues/40577).
<!-- this at least partly overlaps with the TPA-RFC process (see -->
<!-- policy.md), but in general should defer to proposals when -->
<!-- available -->
In the long term, this service will deprecate https://gitlab.onionize.space/
service, deployed by @ahf, from the [Gitlab Lobby](https://gitlab.torproject.org/tpo/tpa/gitlab-lobby) code, because its functionality has already been integrated in
`anon_ticket`.
## Overview
......@@ -193,6 +201,10 @@ This project has its own issue tracker at https://gitlab.torproject.org/tpo/tpa/
-->
Nothing urgent.
Next steps: [anon_ticket Issues](https://gitlab.torproject.org/tpo/tpa/anon_ticket/-/issues/?sort=created_date&state=opened&first_page_size=100)
## Proposed Solution
<!-- Link to RFC -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment