Skip to content

Commit 0fcbab4

Browse files
authored
docs: refactor helios docs (#808)
1 parent b2e05b9 commit 0fcbab4

12 files changed

Lines changed: 467 additions & 272 deletions

File tree

.env.example

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ DATASOURCE_PASSWORD=helios
88
NATS_SERVER=nats-server:4222
99
NATS_AUTH_TOKEN=5760e8ae09adfb2756f9f8cd5cb2caa704cd3f549eaa9298be843ceb165185d815b81f90c680fa7f626b7cd63abf6ac9
1010
WEBHOOK_SECRET=123
11-
REPOSITORY_NAME=
12-
ORGANIZATION_NAME=
13-
GITHUB_AUTH_TOKEN=
14-
RUN_ON_STARTUP_COOLDOWN=0
1511
KC_HOSTNAME=localhost
1612
KEYCLOAK_ADMIN=admin
17-
KEYCLOAK_ADMIN_PASSWORD=admin
18-
HELIOS_CLIENT=http://localhost:4200
13+
KEYCLOAK_ADMIN_PASSWORD=admin
16 KB
Loading
91.5 KB
Loading
18.7 KB
Loading

docs/admin/monitoring.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
========================
2+
Monitoring
3+
========================
4+
5+
6+
.. contents:: Content of this document
7+
:local:
8+
:depth: 2
9+
10+
11+
12+
Overview
13+
-----------------
14+
15+
This page explains how we monitor the production Helios deployment today. We currently rely on:
16+
17+
- Grafana for metrics, dashboards and ad‑hoc investigations.
18+
- Sentry for error tracking (client and backend).
19+
20+
21+
Links
22+
-----------------
23+
24+
- Grafana: https://grafana.gchq.ase.in.tum.de/ (login via Keycloak)
25+
- Sentry (client): https://sentry.aet.cit.tum.de/organizations/aet/projects/helios-client/?project=4
26+
- Sentry (backend): https://sentry.aet.cit.tum.de/organizations/aet/projects/helios-server/?project=5
27+
28+
29+
Access & Permissions
30+
-----------------------
31+
32+
To get full access, please do both of the following.
33+
34+
1. **Sentry access**: Ask the admins to **add you to the relevant Sentry group** with permissions over the Helios projects.
35+
2. **Grafana access**: Ask the admins to **add you to the Helios dashboard** since Helios dashboard is not publicly accessible.

docs/admin/setup.rst

Lines changed: 214 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
========================
2-
Production Setup Guide
2+
Production VM Guide
33
========================
44

55
.. contents:: Content of this document
@@ -11,6 +11,8 @@ We maintain two servers: one for production and one for staging:
1111
- Production server: ``https://helios.aet.cit.tum.de/``
1212
- Staging server: ``https://helios-staging.aet.cit.tum.de/``
1313

14+
Only required package is **Docker**. The production server runs the latest stable version of Helios (``main`` branch), while the staging server runs the latest development version (``staging`` branch).
15+
1416
Both environments use the same Compose file:
1517

1618
- ``compose.prod.yml`` is used for both production and staging deployments.
@@ -68,14 +70,224 @@ File Descriptions
6870
The PEM file for the GitHub App.
6971

7072
- Used as credentials when making API requests to GitHub.
71-
- This file is generated by following the **Generate the Private Key** step in the `Creating a GitHub App <../local/setup.html#creating-a-github-app>`_.
73+
- This file is generated by following the **Generate the Private Key** step in the `Creating a GitHub App <../../contributor/setup#creating-a-github-app:~:text=Generate%20the%20Private%20Key>`_.
7274

7375
- ``helios-realm.json``
7476
An exported Keycloak realm configuration.
7577

7678
- Instead of wiping the database, we export/import Keycloak settings via this file.
7779
- It contains client IDs, client secrets, login page settings, token exchange rules, etc.
7880

81+
82+
Environment Variables
83+
------------------------
84+
85+
The ``.env`` file in ``/opt/helios`` contains all environment variables for production/staging deployments. GitHub Actions fills this file during deployment.
86+
87+
Below is the complete list of variables, their purpose, and where they are used.
88+
89+
Core Infrastructure
90+
~~~~~~~~~~~~~~~~~~~
91+
92+
- ``ENVIRONMENT``
93+
Environment identifier (``prod``, ``staging``, ``dev``).
94+
*Status:* **Unused in compose** (informational only).
95+
96+
- ``POSTGRES_DB``
97+
Name of the PostgreSQL database for the application.
98+
*Used by:* ``postgres`` (also Keycloak indirectly via DB creation).
99+
100+
- ``POSTGRES_PASSWORD``
101+
PostgreSQL password.
102+
*Used by:* ``postgres``, ``keycloak``.
103+
104+
- ``POSTGRES_USER``
105+
PostgreSQL username.
106+
*Used by:* ``postgres``, ``keycloak``.
107+
108+
- ``SPRING_PROFILES_ACTIVE``
109+
Spring Boot active profile (``prod`` for production).
110+
*Used by:* ``application-server``, ``notification``.
111+
112+
- ``DATASOURCE_URL``
113+
JDBC connection string to PostgreSQL.
114+
*Used by:* ``application-server``.
115+
116+
- ``DATASOURCE_USERNAME``
117+
DB username for application server JDBC. Should match ``POSTGRES_USER``.
118+
*Used by:* ``application-server``.
119+
120+
- ``DATASOURCE_PASSWORD``
121+
DB password for application server JDBC. Should match ``POSTGRES_PASSWORD``.
122+
*Used by:* ``application-server``.
123+
124+
NATS Messaging
125+
~~~~~~~~~~~~~~
126+
127+
- ``NATS_SERVER``
128+
Host:port of NATS server.
129+
*Used by:* ``application-server``, ``notification``.
130+
131+
- ``NATS_AUTH_TOKEN``
132+
Token for authenticating with NATS.
133+
*Used by:* ``nats-server``, ``webhook-listener``, ``application-server``, ``notification``.
134+
135+
- ``NATS_DURABLE_CONSUMER_NAME``
136+
Durable consumer name for message replay.
137+
*Used by:* ``application-server`` (value for ``notification`` is written hardcoded in ``compose.prod.yaml`` as ``notification-consumer``).
138+
139+
- ``NATS_CONSUMER_INACTIVE_THRESHOLD_MINUTES``
140+
Consumer inactivity threshold.
141+
*Used by:* ``application-server``, ``notification``.
142+
143+
- ``NATS_CONSUMER_ACK_WAIT_SECONDS``
144+
Ack wait time for durable consumers.
145+
*Used by:* ``application-server``, ``notification``.
146+
147+
GitHub App / Repository Sync
148+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149+
150+
- ``WEBHOOK_SECRET``
151+
HMAC secret for GitHub webhook validation.
152+
*Used by:* ``webhook-listener``.
153+
154+
- ``REPOSITORY_NAME``
155+
Comma-separated list of repositories to sync. This value can be empty since all the repositories which install the GitHub App will be synced automatically.
156+
*Used by:* ``application-server``.
157+
158+
- ``ORGANIZATION_NAME``
159+
GitHub organization name for auto-detection of installation ID.
160+
*Used by:* ``application-server``.
161+
*Note:* Set this value and leave ``GITHUB_INSTALLATION_ID`` empty for auto-detection of the GitHub App installation ID.
162+
163+
- ``GITHUB_AUTH_TOKEN``
164+
GitHub Personal Access Token (if not using GitHub App, we are right now using the GitHub App, so leave this empty).
165+
*Used by:* ``application-server``.
166+
167+
- ``RUN_ON_STARTUP_COOLDOWN``
168+
Minimum minutes since last sync to run sync on startup.
169+
*Used by:* ``application-server``.
170+
171+
- ``SENTRY_DSN``
172+
Sentry DSN for error reporting.
173+
*Used by:* ``application-server``.
174+
175+
- ``DATA_SYNC_RUN_ON_STARTUP``
176+
Whether to run repository sync on startup. Deploying a new version takes couple of minutes, setting this value to ``false``is safe since syncing takes quite some time and we do not want to run it on every deployment.
177+
*Used by:* ``application-server``.
178+
179+
- ``GITHUB_APP_NAME``
180+
GitHub App URL-safe name.
181+
*Used by:* ``application-server``.
182+
183+
- ``GITHUB_APP_ID``
184+
Numeric ID of GitHub App.
185+
*Used by:* ``application-server``.
186+
187+
- ``GITHUB_CLIENT_ID``
188+
OAuth Client ID for GitHub App.
189+
*Used by:* ``application-server``.
190+
191+
- ``GITHUB_INSTALLATION_ID``
192+
GitHub App installation ID. Empty if auto-detecting.
193+
*Used by:* ``application-server``.
194+
195+
- ``GITHUB_PRIVATE_KEY_PATH``
196+
Path to PKCS#8-formatted GitHub App private key.
197+
*Used by:* ``application-server``.
198+
199+
Authentication / Keycloak
200+
~~~~~~~~~~~~~~~~~~~~~~~~~~
201+
202+
- ``KC_BOOTSTRAP_ADMIN_USERNAME``
203+
Initial Keycloak admin username.
204+
*Used by:* ``keycloak``.
205+
206+
- ``KC_BOOTSTRAP_ADMIN_PASSWORD``
207+
Initial Keycloak admin password.
208+
*Used by:* ``keycloak``.
209+
210+
- ``KC_HOSTNAME``
211+
Public hostname for Keycloak.
212+
*Used by:* ``keycloak``.
213+
214+
- ``KC_HTTP_ENABLED``
215+
Whether to enable HTTP in Keycloak.
216+
*Used by:* ``keycloak``.
217+
218+
- ``OAUTH_ISSUER_URL``
219+
Keycloak realm issuer URL.
220+
*Used by:* ``application-server``.
221+
222+
- ``HELIOS_TOKEN_EXCHANGE_CLIENT``
223+
Keycloak client ID for token exchange.
224+
*Used by:* ``application-server``.
225+
226+
- ``HELIOS_TOKEN_EXCHANGE_SECRET``
227+
Keycloak client secret for token exchange.
228+
*Used by:* ``application-server``.
229+
230+
Notification Service
231+
~~~~~~~~~~~~~~~~~~~~
232+
233+
- ``MAIL_HOST``
234+
SMTP host for sending emails.
235+
*Used by:* ``notification``.
236+
237+
- ``MAIL_PORT``
238+
SMTP port.
239+
*Used by:* ``notification``.
240+
241+
- ``EMAIL_ENABLED``
242+
Enable/disable email sending.
243+
*Used by:* ``notification``.
244+
245+
- ``EMAIL_FROM``
246+
Sender email address.
247+
*Used by:* ``notification``.
248+
249+
Image Tags (Deployment Control)
250+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251+
252+
- ``CLIENT_IMAGE_TAG``
253+
Docker image tag for client.
254+
*Used by:* ``client``.
255+
256+
- ``APPLICATION_SERVER_IMAGE_TAG``
257+
Docker image tag for application server.
258+
*Used by:* ``application-server``.
259+
260+
- ``NOTIFICATION_SERVER_IMAGE_TAG``
261+
Docker image tag for notification service.
262+
*Used by:* ``notification``.
263+
264+
- ``WEBHOOK_LISTENER_IMAGE_TAG``
265+
Docker image tag for webhook listener.
266+
*Used by:* ``webhook-listener``.
267+
268+
- ``KEYCLOAK_IMAGE_TAG``
269+
Docker image tag for Keycloak.
270+
*Used by:* ``keycloak``.
271+
272+
Other Application Server Settings
273+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
274+
275+
- ``CLEANUP_WORKFLOW_RUN_DRY_RUN``
276+
If true, cleanup workflow runs in dry-run mode.
277+
*Used by:* ``application-server``.
278+
279+
- ``HELIOS_ENVIRONMENT_NAME``
280+
Used for push-based status updates to Helios.
281+
*Used by:* ``application-server``.
282+
283+
- ``HELIOS_PROD_SECRET_KEY``
284+
Used for push-based status updates to Helios.
285+
*Used by:* ``application-server``.
286+
287+
- ``HELIOS_STAGING_SECRET_KEY``
288+
Used for push-based status updates to Helios.
289+
*Used by:* ``application-server``.
290+
79291
Runtime Containers
80292
------------------
81293

docs/admin/troubleshooting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Updating SSL/TLS Certificates
5151
5252
Once Nginx is running on the ``helios-network``, it will proxy traffic to the Helios services defined in Docker Compose.
5353

54-
We are using SSL/TLS certificates are provided by the TUM IT department and are valid for 1 year. These certificates are automatically renewed by ITG and exposed via symlinks under ``/var/lib/rbg-cert/live/``. Nginx is configured to use these paths directly in both staging and production environments. For more details and the relevant ``nginx.conf`` certificate paths, refer to the `Production Setup Guide -> Additional Containers -> nginx <setup.html#additional-containers>`_.
54+
We are using SSL/TLS certificates are provided by the TUM IT department and are valid for 1 year. These certificates are automatically renewed by ITG and exposed via symlinks under ``/var/lib/rbg-cert/live/``. Nginx is configured to use these paths directly in both staging and production environments. For more details and the relevant ``nginx.conf`` certificate paths, refer to the `Production Setup Guide -> Additional Containers -> nginx <../setup#additional-containers>`_.
5555

5656
.. warning::
5757

0 commit comments

Comments
 (0)