Skip to content

Commit afb9579

Browse files
authored
docs: external postgres (#316)
Add a how-to page on using an external database. Companion PRs: - Substra/orchestrator#210 - Substra/substra-backend#658 Fixes FL-649 --------- Signed-off-by: Olivier Léobal <[email protected]>
1 parent f924445 commit afb9579

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
************************
2+
Use an external database
3+
************************
4+
5+
By default, Substra components use their own integrated postgres databases (one per backend, and one for the orchestrator in centralized mode).
6+
7+
They can be pointed to any PostgreSQL instance (version 11 or better).
8+
9+
The backend and orchestrator use the same structure in their values:
10+
11+
.. code-block:: yaml
12+
13+
database:
14+
host: my.db.com
15+
port: 5432
16+
17+
auth:
18+
username: my-username
19+
password: my-password
20+
database: my-substra-db
21+
22+
Or, for improved security, you can create a secret with your database credentials, under the ``DATABASE_PASSWORD`` and ``DATABASE_USERNAME`` keys. Secrets can be `made very secure <https://kubernetes.io/docs/concepts/security/secrets-good-practices/>`_ but this is the basic example:
23+
24+
.. code-block:: yaml
25+
26+
apiVersion: v1
27+
kind: Secret
28+
metadata:
29+
name: my-db-secret
30+
stringData:
31+
DATABASE_PASSWORD: my-password
32+
DATABASE_USERNAME: my-username
33+
34+
And then point to it in the values, instead of using username & password:
35+
36+
.. code-block:: yaml
37+
38+
database:
39+
host: my.db.com
40+
port: 5432
41+
42+
auth:
43+
database: my-substra-db
44+
credentialsSecretName: my-db-secret

0 commit comments

Comments
 (0)