This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DLAB-2003 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 734a5acd6dee66eda20c08a95bca95f33cb0a89e Author: leonidfrolov <frolovl...@gmail.com> AuthorDate: Thu Aug 20 18:50:46 2020 +0300 [DLAB-2003]: added hostname usage during keycloak client creation --- .../src/general/scripts/aws/edge_configure.py | 8 ++++++-- .../src/general/scripts/azure/edge_configure.py | 8 ++++++-- .../src/general/scripts/gcp/edge_configure.py | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py index 2a809f6..9f19c17 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py @@ -241,14 +241,18 @@ if __name__ == "__main__": except: traceback.print_exc() raise Exception + if os.environ['conf_letsencrypt_enabled'] == 'true' and 'conf_letsencrypt_domain_name' in os.environ: + edge_conf['edge_hostname'] = '{}.{}'.format(edge_conf['project_name'], os.environ['conf_letsencrypt_domain_name']) + else: + edge_conf['edge_hostname'] = '' 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( + "--edge_public_ip {} --hostname {} --project_name {} --endpoint_name {} --hostname {} ".format( edge_conf['service_base_name'], os.environ['keycloak_auth_server_url'], os.environ['keycloak_realm_name'], os.environ['keycloak_user'], os.environ['keycloak_user_password'], edge_conf['keycloak_client_secret'], edge_conf['instance_hostname'], edge_conf['instance_hostname'], edge_conf['project_name'], - edge_conf['endpoint_name']) + edge_conf['endpoint_name'], edge_conf['edge_hostname']) try: local("~/scripts/{}.py {}".format('configure_keycloak', keycloak_params)) except: diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py index 997d38f..7859068 100644 --- a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py +++ b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py @@ -241,14 +241,18 @@ if __name__ == "__main__": except: traceback.print_exc() raise Exception + if os.environ['conf_letsencrypt_enabled'] == 'true' and 'conf_letsencrypt_domain_name' in os.environ: + edge_conf['edge_hostname'] = '{}.{}'.format(edge_conf['project_name'], os.environ['conf_letsencrypt_domain_name']) + else: + edge_conf['edge_hostname'] = '' 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( + "--edge_public_ip {} --project_name {} --endpoint_name {} --hostname {} ".format( edge_conf['service_base_name'], os.environ['keycloak_auth_server_url'], os.environ['keycloak_realm_name'], os.environ['keycloak_user'], os.environ['keycloak_user_password'], edge_conf['keycloak_client_secret'], edge_conf['instance_hostname'], edge_conf['project_name'], - edge_conf['endpoint_name']) + edge_conf['endpoint_name'], edge_conf['edge_hostname']) try: local("~/scripts/{}.py {}".format('configure_keycloak', keycloak_params)) except: diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py index 7b2286d..939ab53 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py @@ -248,14 +248,19 @@ if __name__ == "__main__": except: traceback.print_exc() raise Exception + + if os.environ['conf_letsencrypt_enabled'] == 'true' and 'conf_letsencrypt_domain_name' in os.environ: + edge_conf['edge_hostname'] = '{}.{}'.format(edge_conf['project_name'], os.environ['conf_letsencrypt_domain_name']) + else: + edge_conf['edge_hostname'] = '' 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 {} " \ + "--edge_public_ip {} --project_name {} --endpoint_name {} --hostname {} " \ .format(edge_conf['service_base_name'], os.environ['keycloak_auth_server_url'], os.environ['keycloak_realm_name'], os.environ['keycloak_user'], os.environ['keycloak_user_password'], edge_conf['keycloak_client_secret'], edge_conf['instance_hostname'], edge_conf['project_name'], - edge_conf['endpoint_name']) + edge_conf['endpoint_name'], edge_conf['edge_hostname']) try: local("~/scripts/{}.py {}".format('configure_keycloak', keycloak_params)) except: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org