You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/03/12 10:00:53 UTC
[incubator-dlab] 05/15: [DLAB-1593]: added usage of domain name
during edge keycloak config for azure and aws
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1593
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 984d470250d125177ac29beeeea8e4dc730c207c
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Mar 6 17:40:40 2020 +0200
[DLAB-1593]: added usage of domain name during edge keycloak config for azure and aws
---
.../src/general/scripts/aws/edge_configure.py | 6 +++++-
.../src/general/scripts/azure/edge_configure.py | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
index 244cd63..298abb4 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
@@ -225,6 +225,10 @@ if __name__ == "__main__":
except:
traceback.print_exc()
raise Exception
+ if os.environ['conf_domain_name_enabled'] and 'conf_domain_name' in os.environ:
+ hostname_param = "--hostname {}.{}".format(os.environ['project_name'], os.environ['conf_domain_name'])
+ else:
+ hostname_param = ''
keycloak_params = "--service_base_name {} --keycloak_auth_server_url {} --keycloak_realm_name {} " \
"--keycloak_user {} --keycloak_user_password {} --keycloak_client_secret {} " \
"--edge_public_ip {} --hostname {} --project_name {} --endpoint_name {} ".format(
@@ -234,7 +238,7 @@ if __name__ == "__main__":
edge_conf['instance_hostname'], edge_conf['instance_hostname'], edge_conf['project_name'],
edge_conf['endpoint_name'])
try:
- local("~/scripts/{}.py {}".format('configure_keycloak', keycloak_params))
+ local("~/scripts/{}.py {} {}".format('configure_keycloak', keycloak_params, hostname_param))
except:
traceback.print_exc()
raise Exception
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
index 0949946..ce9d3cc 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
@@ -241,6 +241,10 @@ if __name__ == "__main__":
except:
traceback.print_exc()
raise Exception
+ if os.environ['conf_domain_name_enabled'] and 'conf_domain_name' in os.environ:
+ hostname_param = "--hostname {}.{}".format(os.environ['project_name'], os.environ['conf_domain_name'])
+ else:
+ hostname_param = ''
keycloak_params = "--service_base_name {} --keycloak_auth_server_url {} --keycloak_realm_name {} " \
"--keycloak_user {} --keycloak_user_password {} --keycloak_client_secret {} " \
"--edge_public_ip {} --project_name {} --endpoint_name {} ".format(
@@ -250,7 +254,7 @@ if __name__ == "__main__":
edge_conf['keycloak_client_secret'], edge_conf['instance_hostname'], edge_conf['project_name'],
edge_conf['endpoint_name'])
try:
- local("~/scripts/{}.py {}".format('configure_keycloak', keycloak_params))
+ local("~/scripts/{}.py {} {}".format('configure_keycloak', keycloak_params, hostname_param))
except:
traceback.print_exc()
raise Exception
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org