You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dm...@apache.org on 2020/04/02 10:38:26 UTC

[incubator-dlab] branch odahu-integration updated: [odahu-integration] Fixed domain issue and cluster name

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

dmysakovets pushed a commit to branch odahu-integration
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/odahu-integration by this push:
     new 92fc0ac  [odahu-integration] Fixed domain issue and cluster name
92fc0ac is described below

commit 92fc0acdf056802f546777f8baab5b2a327fe276
Author: Demyan Mysakovets <de...@gmail.com>
AuthorDate: Thu Apr 2 13:38:06 2020 +0300

    [odahu-integration] Fixed domain issue and cluster name
---
 .../src/general/scripts/gcp/odahu_deploy.py                      | 9 +++++----
 .../src/general/scripts/gcp/odahu_resume.py                      | 9 +++++----
 .../src/general/scripts/gcp/odahu_suspend.py                     | 9 +++++----
 .../src/general/scripts/gcp/odahu_terminate.py                   | 9 +++++----
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/odahu_deploy.py b/infrastructure-provisioning/src/general/scripts/gcp/odahu_deploy.py
index 75c6917..6beef79 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/odahu_deploy.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/odahu_deploy.py
@@ -51,9 +51,10 @@ if __name__ == "__main__":
     odahu_conf['cidr'] = os.environ['odahu_cidr']
     odahu_conf['service_base_name'] = (os.environ['conf_service_base_name']).lower().replace('_', '-')
     odahu_conf['project_name'] = (os.environ['project_name']).lower().replace('_', '-')
-    odahu_conf['cluster_name'] = (os.environ['odahu_cluster_name']).lower().replace('_', '-')
-    odahu_conf['bucket_name'] = "{}-tfstate".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
-    odahu_conf['static_address_name'] = "{}-nat-gw".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['cluster_name'] = "{}-{}".format((os.environ['conf_service_base_name']).lower().replace('_', '-'),
+                                                (os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['bucket_name'] = "{}-tfstate".format(odahu_conf['cluster_name'])
+    odahu_conf['static_address_name'] = "{}-nat-gw".format(odahu_conf['cluster_name'])
     try:
         if os.environ['gcp_vpc_name'] == '':
             raise KeyError
@@ -125,7 +126,7 @@ if __name__ == "__main__":
                     "data_bucket": "{}-data-bucket".format(odahu_conf['cluster_name']),
 
                     "dns": {
-                        "domain": "{}".format(odahu_conf['root_domain']),
+                        "domain": "odahu.{}.{}".format(odahu_conf['cluster_name'], odahu_conf['root_domain']),
                         "gcp_project_id": "{}".format(odahu_conf['project_id']),
                         "provider": "gcp",
                         "zone_name": "{}".format(odahu_conf['dns_zone_name']),
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/odahu_resume.py b/infrastructure-provisioning/src/general/scripts/gcp/odahu_resume.py
index e6fe634..ffddc19 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/odahu_resume.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/odahu_resume.py
@@ -53,9 +53,10 @@ if __name__ == "__main__":
     odahu_conf['cidr'] = os.environ['odahu_cidr']
     odahu_conf['service_base_name'] = (os.environ['conf_service_base_name']).lower().replace('_', '-')
     odahu_conf['project_name'] = (os.environ['project_name']).lower().replace('_', '-')
-    odahu_conf['cluster_name'] = (os.environ['odahu_cluster_name']).lower().replace('_', '-')
-    odahu_conf['bucket_name'] = "{}-tfstate".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
-    odahu_conf['static_address_name'] = "{}-nat-gw".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['cluster_name'] = "{}-{}".format((os.environ['conf_service_base_name']).lower().replace('_', '-'),
+                                                (os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['bucket_name'] = "{}-tfstate".format(odahu_conf['cluster_name'])
+    odahu_conf['static_address_name'] = "{}-nat-gw".format(odahu_conf['cluster_name'])
     try:
         if os.environ['gcp_vpc_name'] == '':
             raise KeyError
@@ -127,7 +128,7 @@ if __name__ == "__main__":
                 "data_bucket": "{}-data-bucket".format(odahu_conf['cluster_name']),
 
                 "dns": {
-                    "domain": "{}".format(odahu_conf['root_domain']),
+                    "domain": "odahu.{}.{}".format(odahu_conf['cluster_name'], odahu_conf['root_domain']),
                     "gcp_project_id": "{}".format(odahu_conf['project_id']),
                     "provider": "gcp",
                     "zone_name": "{}".format(odahu_conf['dns_zone_name']),
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/odahu_suspend.py b/infrastructure-provisioning/src/general/scripts/gcp/odahu_suspend.py
index c5a23f6..f38b4b5 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/odahu_suspend.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/odahu_suspend.py
@@ -51,9 +51,10 @@ if __name__ == "__main__":
     odahu_conf['cidr'] = os.environ['odahu_cidr']
     odahu_conf['service_base_name'] = (os.environ['conf_service_base_name']).lower().replace('_', '-')
     odahu_conf['project_name'] = (os.environ['project_name']).lower().replace('_', '-')
-    odahu_conf['cluster_name'] = (os.environ['odahu_cluster_name']).lower().replace('_', '-')
-    odahu_conf['bucket_name'] = "{}-tfstate".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
-    odahu_conf['static_address_name'] = "{}-nat-gw".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['cluster_name'] = "{}-{}".format((os.environ['conf_service_base_name']).lower().replace('_', '-'),
+                                                (os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['bucket_name'] = "{}-tfstate".format(odahu_conf['cluster_name'])
+    odahu_conf['static_address_name'] = "{}-nat-gw".format(odahu_conf['cluster_name'])
     try:
         if os.environ['gcp_vpc_name'] == '':
             raise KeyError
@@ -125,7 +126,7 @@ if __name__ == "__main__":
                     "data_bucket": "{}-data-bucket".format(odahu_conf['cluster_name']),
 
                     "dns": {
-                        "domain": "{}".format(odahu_conf['root_domain']),
+                        "domain": "odahu.{}.{}".format(odahu_conf['cluster_name'], odahu_conf['root_domain']),
                         "gcp_project_id": "{}".format(odahu_conf['project_id']),
                         "provider": "gcp",
                         "zone_name": "{}".format(odahu_conf['dns_zone_name']),
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/odahu_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/odahu_terminate.py
index 4fa4686..f48b064 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/odahu_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/odahu_terminate.py
@@ -52,9 +52,10 @@ if __name__ == "__main__":
     odahu_conf['cidr'] = os.environ['odahu_cidr']
     odahu_conf['service_base_name'] = (os.environ['conf_service_base_name']).lower().replace('_', '-')
     odahu_conf['project_name'] = (os.environ['project_name']).lower().replace('_', '-')
-    odahu_conf['cluster_name'] = (os.environ['odahu_cluster_name']).lower().replace('_', '-')
-    odahu_conf['bucket_name'] = "{}-tfstate".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
-    odahu_conf['static_address_name'] = "{}-nat-gw".format((os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['cluster_name'] = "{}-{}".format((os.environ['conf_service_base_name']).lower().replace('_', '-'),
+                                                (os.environ['odahu_cluster_name']).lower().replace('_', '-'))
+    odahu_conf['bucket_name'] = "{}-tfstate".format(odahu_conf['cluster_name'])
+    odahu_conf['static_address_name'] = "{}-nat-gw".format(odahu_conf['cluster_name'])
     try:
         if os.environ['gcp_vpc_name'] == '':
             raise KeyError
@@ -126,7 +127,7 @@ if __name__ == "__main__":
                 "data_bucket": "{}-data-bucket".format(odahu_conf['cluster_name']),
 
                 "dns": {
-                    "domain": "{}".format(odahu_conf['root_domain']),
+                    "domain": "odahu.{}.{}".format(odahu_conf['cluster_name'], odahu_conf['root_domain']),
                     "gcp_project_id": "{}".format(odahu_conf['project_id']),
                     "provider": "gcp",
                     "zone_name": "{}".format(odahu_conf['dns_zone_name']),


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