more deployment fixes. finalize keycloak auto initialization

This commit is contained in:
Alexandros Mandilaras 2024-05-16 17:32:46 +03:00
parent 560ba3a11a
commit 9d737a8fe0
8 changed files with 13 additions and 13 deletions

View File

@ -71,6 +71,7 @@ loading_icon 20 "Waiting for PostgreSQL to Initialize!"
docker-compose up -d opencdmp.keycloak docker-compose up -d opencdmp.keycloak
loading_icon 90 "Waiting for Keycloak to Startup!" loading_icon 90 "Waiting for Keycloak to Startup!"
docker exec -it opencdmp.keycloak /tmp/user_init.sh
docker-compose up -d docker-compose up -d

View File

@ -164,7 +164,7 @@ services:
test: ["CMD-SHELL", "sh -c 'pg_isready -U postgres -d opencdmp'"] test: ["CMD-SHELL", "sh -c 'pg_isready -U postgres -d opencdmp'"]
interval: 15s interval: 15s
timeout: 60s timeout: 60s
retries: 5 retries: 5
################################# ELASTICSEARCH ################################################# ################################# ELASTICSEARCH #################################################
@ -210,6 +210,7 @@ services:
- JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true" - JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true"
volumes: volumes:
- ./logs/keycloak:/tmp/logs - ./logs/keycloak:/tmp/logs
- ./keycloak/user_init.sh:/tmp/user_init.sh
- ./keycloak/imports/opencdmp-realm.json:/opt/keycloak/data/import/opencdmp-realm.json - ./keycloak/imports/opencdmp-realm.json:/opt/keycloak/data/import/opencdmp-realm.json
expose: expose:
- "8080" - "8080"

View File

@ -13,8 +13,6 @@ services:
condition: service_started condition: service_started
opencdmp.annotation: opencdmp.annotation:
condition: service_started condition: service_started
opencdmp.keycloak:
condition: service_started
############################## OPENDMP APP ################################# ############################## OPENDMP APP #################################
@ -35,8 +33,6 @@ services:
depends_on: depends_on:
opencdmp.postgres: opencdmp.postgres:
condition: service_started condition: service_started
opencdmp.keycloak:
condition: service_started
opencdmp.notification: opencdmp.notification:
container_name: opencdmp.notification container_name: opencdmp.notification
@ -44,8 +40,6 @@ services:
depends_on: depends_on:
opencdmp.postgres: opencdmp.postgres:
condition: service_started condition: service_started
opencdmp.keycloak:
condition: service_started
opencdmp.annotation: opencdmp.annotation:
container_name: opencdmp.annotation container_name: opencdmp.annotation
@ -53,8 +47,6 @@ services:
depends_on: depends_on:
opencdmp.postgres: opencdmp.postgres:
condition: service_started condition: service_started
opencdmp.keycloak:
condition: service_started
opencdmp.backend: opencdmp.backend:
condition: service_started condition: service_started

View File

@ -5,6 +5,7 @@ network.host: 0.0.0.0
discovery.type: single-node discovery.type: single-node
node.name: elasticsearch node.name: elasticsearch
ingest.geoip.downloader.enabled: false
xpack.license.self_generated.type: trial xpack.license.self_generated.type: trial
xpack.security.enabled: true xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true xpack.security.authc.api_key.enabled: true

View File

@ -809,8 +809,7 @@
} }
], ],
"realmRoles": [ "realmRoles": [
"default-roles-dmp-staging", "default-roles-dmp-staging"
"realm-admin"
], ],
"groups": [ "groups": [
"/opencdmp-app/role-user", "/opencdmp-app/role-user",

View File

@ -0,0 +1,4 @@
#!/bin/bash
/opt/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080/keycloak --realm master --user keycloak-admin --password admin --client admin-cli
/opt/keycloak/bin/kcadm.sh add-roles -r OpenCDMP --uusername dmp-keycloak-api --cclientid realm-management --rolename realm-admin

View File

@ -7,4 +7,5 @@ deposit:
issuer-url: ${IDP_ISSUER_URI_TOKEN} issuer-url: ${IDP_ISSUER_URI_TOKEN}
client-id: ${IDP_APIKEY_CLIENT_ID} client-id: ${IDP_APIKEY_CLIENT_ID}
client-secret: ${IDP_APIKEY_CLIENT_SECRET} client-secret: ${IDP_APIKEY_CLIENT_SECRET}
scope: ${IDP_APIKEY_SCOPE} scope: ${IDP_APIKEY_SCOPE}
maxInMemorySizeInBytes: 6554000

View File

@ -4,4 +4,5 @@ zenodo:
domain: https://argos.openaire.eu/ domain: https://argos.openaire.eu/
logo: /zenodo.jpg logo: /zenodo.jpg
depositConfiguration: depositConfiguration:
has-logo: false has-logo: false
useSharedStorage: false