*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 9e4b562e authored by Wörister, Florian's avatar Wörister, Florian
Browse files

Merge branch 'fw/cleanup' into 'master'

Fw/cleanup

See merge request fairdata/crdm-keycloak-setup!4
parents 8db8ac96 987ab60b
No related branches found
No related tags found
1 merge request!4Fw/cleanup
Pipeline #99346 passed
stages:
- staging
- production
deploy_staging:
stage: staging
environment: staging
script:
- ssh gitlab-ci@s162.dl.hpc.tuwien.ac.at "cd crdm-keycloak-setup && docker-compose down"
- ssh gitlab-ci@s162.dl.hpc.tuwien.ac.at "rm -rf ./crdm-keycloak-setup"
- cd ..
- scp -r "crdm-keycloak-setup" "gitlab-ci@s162.dl.hpc.tuwien.ac.at:./crdm-keycloak-setup"
- ssh gitlab-ci@s162.dl.hpc.tuwien.ac.at "cp -r /home/gitlab-ci/cert /home/gitlab-ci/crdm-keycloak-setup/"
- ssh gitlab-ci@s162.dl.hpc.tuwien.ac.at "cp -r /home/gitlab-ci/.env /home/gitlab-ci/crdm-keycloak-setup/.env"
- ssh gitlab-ci@s162.dl.hpc.tuwien.ac.at " cd crdm-keycloak-setup && docker-compose up --build -d"
rules:
- if: '$CI_COMMIT_BRANCH == "staging"'
deploy_production:
stage: production
environment: production
......
# CRDM Keycloak Setup
Docker Setup for the Keycloak instance of the "Center for Research Data management"
\ No newline at end of file
Docker Setup for the Keycloak instance of the "Center for Research Data management". This keycloak service maintains a
separate realm for the main and the test instance of invenio.
# Exportin Realms
To export all realms of the keycloak instance the lines 52-54 have to be uncommented in the docker-compose file. After
restarting (`docker-compose down && docker-compose up -d`) keycloak all realms are exported to `export/realms-export.json`.
# Importing Realms
To import realms into a new keycloak instance first place your dump file (`realms-export.json`) into the export folder.
Next, execute the `import-realms.sh` script which erases all existing data on the keycloak instance and then imports the
provided realm-dump.
\ No newline at end of file
embed-server --server-config=standalone-ha.xml --std-out=echo
/subsystem=logging/json-formatter=JSON/:add
/subsystem=logging/console-handler=CONSOLE/:write-attribute(name=named-formatter,value=JSON)
stop-embedded-server
\ No newline at end of file
......@@ -17,6 +17,11 @@ services:
POSTGRES_DB: keycloak
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
logging:
driver: gelf
options:
gelf-address: "udp://s63.dl.hpc.tuwien.ac.at:12201"
tag: "keycloak_db"
keycloak:
image: quay.io/keycloak/keycloak:latest
......@@ -35,9 +40,21 @@ services:
- "443:8443"
depends_on:
- postgres
logging:
driver: gelf
options:
gelf-address: "udp://s63.dl.hpc.tuwien.ac.at:12201"
tag: "keycloak_app"
volumes:
- keycloak_data:/opt/jboss/keycloak/standalone/data
- ./cert/:/etc/x509/https
- ./cli/json-logging.cli:/opt/jboss/startup-scripts/json-logging.cli
# - ./export/:/opt/export/
# command:
# - "-b 0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/opt/export/realms-export.json -Dkeycloak.migration.strategy=IGNORE_EXISTING -Dkeycloak.profile.feature.upload_scripts=enabled"
# - "-b 0.0.0.0 -Dkeycloak.migration.action=export -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/opt/export/realms-export.json -Dkeycloak.profile.feature.upload_scripts=enabled"
networks:
default:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1450
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment