Skip to content

Add terraform configuration for Keycloak for the local development environment#1085

Merged
sschuberth merged 4 commits intomainfrom
terraform-keycloak
Apr 15, 2025
Merged

Add terraform configuration for Keycloak for the local development environment#1085
sschuberth merged 4 commits intomainfrom
terraform-keycloak

Conversation

@lamppu
Copy link
Member

@lamppu lamppu commented Mar 28, 2025

Add a Keycloak instance to the Docker Compose environment and add Terraform configuration that matches the current setup for Keycloak needed for DOS. Use this instance by default in the local development environment and also use this Keycloak instance in the Playwright tests in the GitHub workflow.

Please see the individual commits for details.

@lamppu lamppu temporarily deployed to unittest-environment March 28, 2025 15:24 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment March 28, 2025 15:24 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from 792333d to a7f624a Compare March 28, 2025 15:38
@lamppu lamppu temporarily deployed to unittest-environment March 28, 2025 15:38 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment March 28, 2025 15:38 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment March 28, 2025 15:59 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to unittest-environment March 28, 2025 15:59 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from 562857b to c33f33a Compare March 28, 2025 16:01
@lamppu lamppu temporarily deployed to test-environment March 28, 2025 16:01 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to unittest-environment March 28, 2025 16:01 — with GitHub Actions Inactive
@lamppu lamppu had a problem deploying to test-environment March 28, 2025 16:33 — with GitHub Actions Failure
@lamppu lamppu temporarily deployed to unittest-environment March 28, 2025 16:33 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from dcd3ed8 to e025708 Compare April 2, 2025 13:49
@lamppu lamppu had a problem deploying to test-environment April 2, 2025 13:49 — with GitHub Actions Failure
@lamppu lamppu temporarily deployed to unittest-environment April 2, 2025 13:49 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from e025708 to e3cb918 Compare April 8, 2025 16:43
@lamppu lamppu temporarily deployed to unittest-environment April 8, 2025 16:43 — with GitHub Actions Inactive
@lamppu lamppu had a problem deploying to test-environment April 8, 2025 16:43 — with GitHub Actions Failure
@lamppu lamppu force-pushed the terraform-keycloak branch from e3cb918 to 6d2d291 Compare April 9, 2025 15:26
@lamppu lamppu temporarily deployed to unittest-environment April 9, 2025 15:26 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment April 9, 2025 15:26 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from 6d2d291 to ff40da4 Compare April 14, 2025 09:07
@lamppu lamppu temporarily deployed to unittest-environment April 14, 2025 09:07 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment April 14, 2025 09:07 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from ff40da4 to 38b32da Compare April 14, 2025 11:24
@lamppu lamppu temporarily deployed to test-environment April 14, 2025 11:24 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to unittest-environment April 14, 2025 11:24 — with GitHub Actions Inactive
@lamppu lamppu force-pushed the terraform-keycloak branch from 38b32da to 8f1272c Compare April 14, 2025 11:29
@lamppu lamppu temporarily deployed to unittest-environment April 14, 2025 11:29 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to test-environment April 14, 2025 11:29 — with GitHub Actions Inactive
@lamppu lamppu marked this pull request as ready for review April 14, 2025 11:44
@lamppu lamppu requested a review from a team as a code owner April 14, 2025 11:44
@sschuberth
Copy link
Member

@sparsick, feel free to chime in if you have something to comment on!

lamppu added 4 commits April 15, 2025 09:32
This will prevent an error when starting the API in development mode, where
it was failing to read the .env file.

Signed-off-by: Johanna Lamppu <[email protected]>
To make the current Keycloak setup more transparent and to make testing
new changes easier in local development, add a Keycloak setup with
Terraform and add Keycloak and Terraform to the Docker Compose setup.

Signed-off-by: Johanna Lamppu <[email protected]>
Use the Keycloak instance in Docker Compose by default in the local
development environment. With this change, the Keycloak URL, realm, and
the client configuration environment variables all now have a default value,
and so they don't need to be set in the local development environment.

Signed-off-by: Johanna Lamppu <[email protected]>
Use the Docker Compose Keycloak instance for API and Clearance UI in the
Docker Compose environment and use it in the Playwright tests in the
GitHub workflow.

With this change, also the end-to-end user credentials don't need to be
given as environment variables anymore, and the `E2E_USER_USERNAME` and
`E2E_USER_PASSWORD` variables are completely removed.

Signed-off-by: Johanna Lamppu <[email protected]>
@lamppu lamppu force-pushed the terraform-keycloak branch from 8f1272c to edc6d27 Compare April 15, 2025 06:41
@lamppu lamppu temporarily deployed to test-environment April 15, 2025 06:41 — with GitHub Actions Inactive
@lamppu lamppu temporarily deployed to unittest-environment April 15, 2025 06:41 — with GitHub Actions Inactive
@sschuberth sschuberth enabled auto-merge (rebase) April 15, 2025 06:52
@sschuberth sschuberth merged commit 27a1c7e into main Apr 15, 2025
5 checks passed
@sschuberth sschuberth deleted the terraform-keycloak branch April 15, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants