Compare commits

..

16 Commits

Author SHA1 Message Date
3wc
3f7af10040 chore: publish 6.1.0+22.0.1 release 2023-07-24 14:36:32 +01:00
3wc
d2b9fffc46 chore: publish 6.0.0+21.0.2 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-12 17:34:23 -04:00
3wc
b682264613 chore: publish 6.0.0+21.0.2 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-12 17:17:24 -04:00
3wc
be3980d66f chore: publish 5.1.0+20.0.3 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-19 19:22:18 -04:00
157d3beaab fix: put the admin password in the container, also add restore capabilities
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-05 12:07:56 +01:00
d432a45c21 chore: publish 5.0.2+20.0.3 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 10:44:47 +01:00
6a085e0546 fix: change the themes directory
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 10:43:03 +01:00
836abe0237 chore: publish 5.0.1+20.0.3 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-13 08:56:00 +01:00
3wc
9bd0b2928c Switch to self-hosted stack-ssh-deploy image [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-21 11:49:56 -08:00
3wc
f42183601c Fix CI by adding networks: [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-20 11:58:41 -08:00
3wc
04618a142b Automatically generate catalogue on release [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
Re: coop-cloud/recipes-catalogue-json#4
2023-01-20 10:27:11 -08:00
3wc
5b306db9b7 Update abra syntax in examples (finally) [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 16:02:27 -08:00
3wc
c0fab3a3a3 fix: improve DB backup
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-22 19:20:30 -08:00
2ac47abfcd feat!: new 20.x release
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-16 19:37:17 +01:00
ef6ffd9985 feat: backup labels for mysql 2022-11-16 18:16:25 +01:00
38bdef2fd0 adds welcome_theme env
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-18 14:54:35 +02:00
7 changed files with 65 additions and 118 deletions

View File

@ -3,10 +3,12 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: keycloak
networks:
- proxy
generate_secrets: true
purge: true
deploy_key:
@ -23,11 +25,17 @@ trigger:
- master
---
kind: pipeline
name: recipe release
name: generate recipe catalogue
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
image: plugins/downstream
settings:
command: recipe keycloak release
deploy_key:
from_secret: abra_bot_deploy_key
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -6,6 +6,7 @@ DOMAIN=keycloak.example.com
LETS_ENCRYPT_ENV=production
ADMIN_USERNAME=admin
WELCOME_THEME=keycloak
SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1

View File

@ -21,9 +21,9 @@
2. Deploy [`coop-cloud/traefik`][cc-traefik]
3. `abra app new keycloak --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
5. `abra app deploy YOURAPPDOMAIN`
## How do I setup a custom theme?

View File

@ -1,81 +0,0 @@
---
version: "3.8"
services:
app:
image: "jboss/keycloak:16.1.1"
networks:
- proxy
- internal
secrets:
- admin_password
- db_password
environment:
- DB_ADDR=db
- JBDC_PARAMS="useSSL=false"
- DB_DATABASE=keycloak
- DB_PASSWORD_FILE=/run/secrets/db_password
- DB_USER=keycloak
- DB_VENDOR=mariadb
- KEYCLOAK_PASSWORD_FILE=/run/secrets/admin_password
- KEYCLOAK_USER=${ADMIN_USERNAME}
- PROXY_ADDRESS_FORWARDING=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
volumes:
- "themes:/opt/jboss/keycloak/themes"
depends_on:
- mariadb
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=4.0.1+16.1.1"
db:
image: "mariadb:10.8"
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
networks:
internal:
proxy:
external: true
secrets:
admin_password:
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
external: true
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true
volumes:
mariadb:
themes:

View File

@ -3,7 +3,9 @@ version: "3.8"
services:
app:
image: "jboss/keycloak:16.1.1"
image: "keycloak/keycloak:22.0.1"
entrypoint: >
bash -c "KEYCLOAK_ADMIN_PASSWORD=\"$$(cat /run/secrets/admin_password)\" KC_DB_PASSWORD=\"$$(cat /run/secrets/db_password)\" /opt/keycloak/bin/kc.sh start"
networks:
- proxy
- internal
@ -11,23 +13,24 @@ services:
- admin_password
- db_password
environment:
- DB_ADDR=db
- JBDC_PARAMS="useSSL=false"
- DB_DATABASE=keycloak
- DB_PASSWORD_FILE=/run/secrets/db_password
- DB_USER=keycloak
- DB_VENDOR=postgres
- KEYCLOAK_PASSWORD_FILE=/run/secrets/admin_password
- KEYCLOAK_USER=${ADMIN_USERNAME}
- PROXY_ADDRESS_FORWARDING=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
- KC_DB=mariadb
- KC_DB_URL_DATABASE=keycloak
- KC_DB_URL_HOST=db
- KC_HOSTNAME=${DOMAIN}
- KC_PROXY=edge
- KC_SPI_CONNECTIONS_JPA_LEGACY_MIGRATION_STRATEGY=update
- KEYCLOAK_ADMIN=${ADMIN_USERNAME}
- KEYCLOAK_WELCOME_THEME=${WELCOME_THEME}
# NOTE(3wc): disabled due to missing curl binary, see
# https://git.coopcloud.tech/coop-cloud/keycloak/issues/15
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:8080"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
volumes:
- "themes:/opt/jboss/keycloak/themes"
- "themes:/opt/keycloak/themes"
depends_on:
- mariadb
deploy:
@ -43,25 +46,31 @@ services:
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=4.0.1+16.1.1"
- "coop-cloud.${STACK_NAME}.version=6.1.0+22.0.1"
db:
image: postgres:11
networks:
- backend
secrets:
- db_password
image: "mariadb:11.0"
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
volumes:
- "postgres_data:/var/lib/postgresql/data"
- "mariadb:/var/lib/mysql"
networks:
- internal
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.path: "/tmp/dump.sql.gz"
backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz"
backupbot.backup.pre-hook: "sh -c 'mysqldump -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak | gzip > /tmp/dump.sql.gz'"
backupbot.restore.pre-hook: "sh -c 'cd /tmp && gzip -d dump.sql.gz'"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'mysql -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak < /tmp/dump.sql && rm -f /tmp/dump.sql'"
networks:
internal:
@ -82,4 +91,3 @@ secrets:
volumes:
mariadb:
themes:
postgres_data:

9
release/5.0.0+20.0.1 Normal file
View File

@ -0,0 +1,9 @@
You'll need to remove `/auth/` from your app SSO URLs, e.g.
https://foo.example.com/auth/realms/foo/protocol/openid-connect/auth
Would become:
https://foo.example.com/realms/foo/protocol/openid-connect/auth
-- decentral1se @ Autonomic

2
release/6.0.0+21.0.2 Normal file
View File

@ -0,0 +1,2 @@
Healthchecks are disabled, see
https://git.coopcloud.tech/coop-cloud/keycloak/issues/15