Skip to content

Commit

Permalink
Add timetables api user
Browse files Browse the repository at this point in the history
  • Loading branch information
culka committed Sep 21, 2023
1 parent 1a9f08a commit 953dd29
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 19 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,25 @@ jobs:
-v
$(pwd)/test-secrets/db-tiamat-username:/run/secrets/db-tiamat-username:ro
-v
$(pwd)/test-secrets/db-tiamat-password:/run/secrets/db-tiamat-password:ro"
$(pwd)/test-secrets/db-tiamat-password:/run/secrets/db-tiamat-password:ro
-v
$(pwd)/test-secrets/db-timetables-api-username:/run/secrets/db-timetables-api-username:ro
-v
$(pwd)/test-secrets/db-timetables-api-password:/run/secrets/db-timetables-api-password:ro"
dbQuery:
# finds all users in the database
"SELECT usename FROM pg_catalog.pg_user ORDER BY usename;"
expectedOutput: |
usename
------------------
-----------------------
authusername
hasurausername
importerusername
tiamat
timetablesapiusername
user
(5 rows)
(6 rows)
steps:
- name: Checkout code
Expand Down Expand Up @@ -178,7 +183,7 @@ jobs:
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v1
with:
testdb_version: "${{ env.IMAGE_NAME }}:azuredbmock-${{ env.COMMIT_ID }}"

- name: Seed infrastructure links
uses: HSLdevcom/jore4-tools/github-actions/seed-infrastructure-links@seed-infrastructure-links-v1

Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,23 @@ Environment variables:

Secrets:

| Secrets | Example | Description |
| ------------------------- | --------------- | ----------------------------------------------------------------------- |
| db-auth-username | dbauth | Name of the database user for the authentication microservice |
| db-auth-password | \*\*\* | Password of the database user for the authentication microservice |
| db-auth-name | authdb | Name of the (internal) database used by the auth backend microservice |
| db-jore3importer-username | dbjore3importer | Name of the database user for the jore3 importer microservice |
| db-jore3importer-password | \*\*\* | Name of the database user for the jore3 importer microservice |
| db-jore3importer-name | importerdb | Name of the (internal) database used by the jore3 importer microservice |
| db-hasura-username | dbhasura | Name of the database user for the hasura microservice |
| db-hasura-password | \*\*\* | Password of the database user for the hasura microservice |
| db-hasura-name | jore4db | Name of the database used by the hasura microservice |
| db-timetables-name | timetablesdb | Name of the database used by the timetables module |
| db-tiamat-username | tiamat | Name of the database user for the tiamat microservice |
| db-tiamat-password | \*\*\* | Password of the database user for the tiamat microservice |
| db-tiamat-name | stopdb | Name of the database used by the tiamat microservice |
| Secrets | Example | Description |
| -------------------------- | --------------- | ----------------------------------------------------------------------- |
| db-auth-username | dbauth | Name of the database user for the authentication microservice |
| db-auth-password | \*\*\* | Password of the database user for the authentication microservice |
| db-auth-name | authdb | Name of the (internal) database used by the auth backend microservice |
| db-jore3importer-username | dbjore3importer | Name of the database user for the jore3 importer microservice |
| db-jore3importer-password | \*\*\* | Name of the database user for the jore3 importer microservice |
| db-jore3importer-name | importerdb | Name of the (internal) database used by the jore3 importer microservice |
| db-hasura-username | dbhasura | Name of the database user for the hasura microservice |
| db-hasura-password | \*\*\* | Password of the database user for the hasura microservice |
| db-hasura-name | jore4db | Name of the database used by the hasura microservice |
| db-timetables-name | timetablesdb | Name of the database used by the timetables module |
| db-tiamat-username | tiamat | Name of the database user for the tiamat microservice |
| db-tiamat-password | \*\*\* | Password of the database user for the tiamat microservice |
| db-tiamat-name | stopdb | Name of the database used by the tiamat microservice |
| db-timetables-api-username | dbtimetablesapi | Name of the database user for the timetables API microservice |
| db-timetables-api-password | \*\*\* | Password of the database user for the timetables API microservice |

All other environment variables are the same as as in `postgis/postgis`'s base
image, [postgres](https://registry.hub.docker.com/_/postgres/)
Expand Down
1 change: 1 addition & 0 deletions azuredbmock/00-initialize.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE USER xxx_db_auth_username_xxx PASSWORD 'xxx_db_auth_password_xxx';
CREATE USER xxx_db_jore3importer_username_xxx PASSWORD 'xxx_db_jore3importer_password_xxx';
CREATE USER xxx_db_hasura_username_xxx PASSWORD 'xxx_db_hasura_password_xxx';
CREATE USER xxx_db_tiamat_username_xxx PASSWORD 'xxx_db_tiamat_password_xxx';
CREATE USER xxx_db_timetables_api_username_xxx PASSWORD 'xxx_db_timetables_api_password_xxx';

-- Create the extensions used, see https://hasura.io/docs/latest/graphql/core/deployment/postgres-requirements.html
-- Create the extensions in the public schema, since we'd need to give additional privileges ("use schema") to any
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ services:
- db-tiamat-username
- db-tiamat-password
- db-tiamat-name
- db-timetables-api-username
- db-timetables-api-password
environment:
- POSTGRES_DB=testdb

Expand Down Expand Up @@ -83,3 +85,7 @@ secrets:
file: ./test-secrets/db-tiamat-password
db-tiamat-name:
file: ./test-secrets/db-tiamat-name
db-timetables-api-username:
file: ./test-secrets/db-timetables-api-username
db-timetables-api-password:
file: ./test-secrets/db-timetables-api-password
1 change: 1 addition & 0 deletions test-secrets/db-timetables-api-password
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
timetablesapipassword
1 change: 1 addition & 0 deletions test-secrets/db-timetables-api-username
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
timetablesapiusername

0 comments on commit 953dd29

Please sign in to comment.