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/10 08:59:41 UTC
[incubator-dlab] branch DLAB-1593 updated: [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
The following commit(s) were added to refs/heads/DLAB-1593 by this push:
new 9d64028 [DLAB-1593]: added usage of domain name during edge keycloak config for azure and aws
9d64028 is described below
commit 9d64028231261c9e41231cf271babf8bbbd4e551
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 4d414b1..9edb802 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
@@ -220,6 +220,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 {} " \
@@ -228,7 +232,7 @@ if __name__ == "__main__":
os.environ['keycloak_user_password'],
keycloak_client_secret, edge_conf['edge_public_ip'], instance_hostname, os.environ['project_name'], os.environ['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 fd2f940..eeddbfd 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
@@ -291,6 +291,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 {} " \
@@ -299,7 +303,7 @@ if __name__ == "__main__":
os.environ['keycloak_user_password'],
keycloak_client_secret, edge_conf['edge_public_ip'], os.environ['project_name'], os.environ['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