You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/07/22 13:16:25 UTC

[incubator-dlab] branch DLAB-terraform updated: fixed issue with configuring Keycloak

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-terraform by this push:
     new aa874ba  fixed issue with configuring Keycloak
aa874ba is described below

commit aa874bafd0a211999c7eadb0203f61fb4f124d3d
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Mon Jul 22 16:16:16 2019 +0300

    fixed issue with configuring Keycloak
---
 .../aws/ssn-helm-charts/main/files/keycloak_values.yaml  | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/files/keycloak_values.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/files/keycloak_values.yaml
index 2bac0fd..fddf4c6 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/files/keycloak_values.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/files/keycloak_values.yaml
@@ -37,14 +37,12 @@ startupScripts:
     }
 
     check_realm () {
-            RUN=`/opt/jboss/keycloak/bin/kcadm.sh get realms/dlab > /dev/null && echo "true" || echo "false"
+            RUN=`/opt/jboss/keycloak/bin/kcadm.sh get realms/dlab > /dev/null && echo "true" || echo "false"`
     }
 
     configure_keycloak () {
         # Create Realm
-        /opt/jboss/keycloak/bin/kcadm.sh create realms -f - << EOF
-        { "realm": "dlab", "enabled": true }
-        EOF
+        /opt/jboss/keycloak/bin/kcadm.sh create realms -s realm=dlab -s enabled=true
 
         # Get realm ID
         dlab_realm_id=`/opt/jboss/keycloak/bin/kcadm.sh get realms/dlab | jq -r '.id'`
@@ -74,9 +72,8 @@ startupScripts:
         -s 'config."always.read.value.from.ldap"=["false"]' -s 'config."is.mandatory.in.ldap"=["false"]'
 
         # Create client
-        /opt/jboss/keycloak/bin/kcadm.sh create clients -r dlab -f - << EOF
-        { "clientId": "dlab-ui", "enabled": true, "redirectUris": ["http://dlab-ui:58080/"] }
-        EOF
+        /opt/jboss/keycloak/bin/kcadm.sh create clients -r dlab -s clientId=dlab-ui -s enabled=true -s \
+        'redirectUris=["http://dlab-ui:58080/"]'
     }
 
     main_func () {
@@ -84,7 +81,7 @@ startupScripts:
         count=0
         while auth
         do
-        if [[ $RUN == "false" ]] && [[ $count < 120 ]];
+        if [[ $RUN == "false" ]] && (( $count < 120 ));
         then
             echo "Waiting for Keycloak..."
             sleep 5
@@ -114,6 +111,3 @@ startupScripts:
     }
 
     main_func &
-
-
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org