Skip to content

Commit 162b0a0

Browse files
committed
[DOP-23077] Improve documentation
1 parent 33918bc commit 162b0a0

File tree

29 files changed

+206
-76
lines changed

29 files changed

+206
-76
lines changed

.env.docker

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
TZ=UTC
22
ENV=LOCAL
33

4-
# Server Settngs
5-
SYNCMASTER__SERVER__DEBUG=true
6-
SYNCMASTER__SERVER__LOG_URL_TEMPLATE=https://grafana.example.com?correlation_id={{ correlation_id }}&run_id={{ run.id }}
7-
8-
# Session
9-
SYNCMASTER__SERVER__SESSION__SECRET_KEY=session_secret_key
4+
# Logging options
5+
SYNCMASTER__LOGGING__SETUP=True
6+
SYNCMASTER__LOGGING__PRESET=colored
107

11-
# Postgres
8+
# Common DB options
129
SYNCMASTER__DATABASE__URL=postgresql+asyncpg://syncmaster:changeme@db:5432/syncmaster
1310

14-
# RabbitMQ
15-
SYNCMASTER__BROKER__URL=amqp://guest:guest@rabbitmq:5672/
11+
# Encrypt / Decrypt credentials data using this Fernet key.
12+
# !!! GENERATE YOUR OWN COPY FOR PRODUCTION USAGE !!!
13+
SYNCMASTER__ENCRYPTION__SECRET_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
1614

17-
# Logging
18-
SYNCMASTER__LOGGING__SETUP=True
19-
SYNCMASTER__LOGGING__PRESET=colored
15+
# Common RabbitMQ options
16+
SYNCMASTER__BROKER__URL=amqp://guest:guest@rabbitmq:5672
2017

21-
# Encrypt / Decrypt credentials data
22-
SYNCMASTER__ENCRYPTION__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
23-
24-
# Scheduler settings
25-
SYNCMASTER__SCHEDULER__TRANSFER_FETCHING_TIMEOUT_SECONDS=200
18+
# Server options
19+
SYNCMASTER__SERVER__SESSION__SECRET_KEY=generate_some_random_string
20+
SYNCMASTER__SERVER__LOG_URL_TEMPLATE=https://logs.location.example.com/syncmaster-worker?correlation_id={{ correlation_id }}&run_id={{ run.id }}
21+
# !!! NEVER USE ON PRODUCTION !!!
22+
SYNCMASTER__SERVER__DEBUG=true
2623

27-
# KEYCLOAK Auth
24+
# Keycloak Auth
25+
#SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider
2826
SYNCMASTER__AUTH__KEYCLOAK__SERVER_URL=http://keycloak:8080
2927
SYNCMASTER__AUTH__KEYCLOAK__REALM_NAME=manually_created
3028
SYNCMASTER__AUTH__KEYCLOAK__CLIENT_ID=manually_created
3129
SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=generated_by_keycloak
3230
SYNCMASTER__AUTH__KEYCLOAK__REDIRECT_URI=http://localhost:8000/auth/callback
3331
SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email
3432
SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False
35-
SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider
3633

3734
# Dummy Auth
3835
SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider
39-
SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=secret
36+
SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=generate_another_random_string
37+
38+
# Scheduler options
39+
SYNCMASTER__SCHEDULER__TRANSFER_FETCHING_TIMEOUT_SECONDS=200
4040

41+
# Tests-only
4142
# S3
4243
MINIO_ACCESS_KEY=syncmaster
4344
MINIO_SECRET_KEY=changeme

.env.local

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
export TZ=UTC
22
export ENV=LOCAL
33

4-
# Server Settngs
5-
export SYNCMASTER__SERVER__DEBUG=true
6-
export SYNCMASTER__SERVER__LOG_URL_TEMPLATE="https://grafana.example.com?correlation_id={{ correlation_id }}&run_id={{ run.id }}"
7-
8-
# Session
9-
export SYNCMASTER__SERVER__SESSION__SECRET_KEY=session_secret_key
4+
# Logging options
5+
export SYNCMASTER__LOGGING__SETUP=True
6+
export SYNCMASTER__LOGGING__PRESET=colored
107

11-
# Postgres
8+
# Common DB options
129
export SYNCMASTER__DATABASE__URL=postgresql+asyncpg://syncmaster:changeme@localhost:5432/syncmaster
1310

14-
# RabbitMQ
15-
export SYNCMASTER__BROKER__URL=amqp://guest:guest@localhost:5672/
11+
# Encrypt / Decrypt credentials data using this Fernet key.
12+
# !!! GENERATE YOUR OWN COPY FOR PRODUCTION USAGE !!!
13+
export SYNCMASTER__ENCRYPTION__SECRET_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
1614

17-
# Logging
18-
export SYNCMASTER__LOGGING__SETUP=True
19-
export SYNCMASTER__LOGGING__PRESET=colored
15+
# Common RabbitMQ options
16+
export SYNCMASTER__BROKER__URL=amqp://guest:guest@localhost:5672
2017

21-
# Encrypt / Decrypt credentials data
22-
export SYNCMASTER__ENCRYPTION__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
23-
24-
# Scheduler settings
25-
export SYNCMASTER__SCHEDULER__TRANSFER_FETCHING_TIMEOUT_SECONDS=200
18+
# Server options
19+
export SYNCMASTER__SERVER__SESSION__SECRET_KEY=generate_some_random_string
20+
export SYNCMASTER__SERVER__LOG_URL_TEMPLATE="https://logs.location.example.com/syncmaster-worker?correlation_id={{ correlation_id }}&run_id={{ run.id }}"
21+
# !!! NEVER USE ON PRODUCTION !!!
22+
export SYNCMASTER__SERVER__DEBUG=true
2623

27-
# Keycloack Auth
28-
export SYNCMASTER__AUTH__KEYCLOAK__SERVER_URL=http://keycloak:8080
24+
# Keycloak Auth
25+
#export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider
26+
export SYNCMASTER__AUTH__KEYCLOAK__SERVER_URL=http://localhost:8080
2927
export SYNCMASTER__AUTH__KEYCLOAK__REALM_NAME=manually_created
3028
export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_ID=manually_created
3129
export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=generated_by_keycloak
3230
export SYNCMASTER__AUTH__KEYCLOAK__REDIRECT_URI=http://localhost:8000/auth/callback
3331
export SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email
3432
export SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False
35-
export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider
3633

3734
# Dummy Auth
3835
export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider
39-
export SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=secret
36+
export SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=generate_another_random_string
37+
38+
# Scheduler options
39+
export SYNCMASTER__SCHEDULER__TRANSFER_FETCHING_TIMEOUT_SECONDS=200
4040

41+
# Tests-only
4142
export TEST_S3_HOST_FOR_CONFTEST=localhost
4243
export TEST_S3_PORT_FOR_CONFTEST=9010
4344
export TEST_S3_HOST_FOR_WORKER=test-s3

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
:caption: Worker
2727
:hidden:
2828

29-
worker/start_worker
29+
worker/install
3030
worker/log_url
3131
worker/configuration/index
3232

@@ -36,7 +36,7 @@
3636
:caption: Scheduler
3737
:hidden:
3838

39-
scheduler/start_scheduler
39+
scheduler/install
4040
scheduler/configuration/index
4141

4242
.. toctree::

docs/scheduler/configuration/broker.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _backend-configuration-broker:
1+
.. _scheduler-configuration-broker:
22

33
Broker settings
44
=================
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _scheduler-configuration-credentials:
2+
3+
Credentials settings
4+
====================
5+
6+
.. autopydantic_model:: syncmaster.settings.credentials.CredentialsEncryptionSettings

docs/scheduler/configuration/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _backend-configuration-database:
1+
.. _scheduler-configuration-database:
22

33
Database settings
44
=================

docs/scheduler/configuration/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Configuration
1010

1111
database
1212
broker
13+
credentials
1314
logging
1415

1516
.. autopydantic_settings:: syncmaster.scheduler.settings.SchedulerAppSettings

docs/scheduler/configuration/logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _backend-configuration-logging:
1+
.. _scheduler-configuration-logging:
22

33
Logging settings
44
================
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
Starting the Scheduler
2-
======================
1+
.. _server-install:
2+
3+
Install & run scheduler
4+
=======================
35

46
With docker
57
-----------
@@ -13,12 +15,12 @@ Options can be set via ``.env`` file or ``environment`` section in ``docker-comp
1315
.. dropdown:: ``docker-compose.yml``
1416

1517
.. literalinclude:: ../../docker-compose.yml
16-
:emphasize-lines: 90-103
18+
:emphasize-lines: 93-107
1719

1820
.. dropdown:: ``.env.docker``
1921

2022
.. literalinclude:: ../../.env.docker
21-
:emphasize-lines: 11-25
23+
:emphasize-lines: 4-16,38-39
2224

2325
To start the worker container you need to run the command:
2426

docs/server/configuration/broker.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _backend-configuration-broker:
1+
.. _server-configuration-broker:
22

33
Broker settings
44
=================

0 commit comments

Comments
 (0)