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/06 14:43:17 UTC

[incubator-dlab] branch DLAB-1593 created (now f292b6b)

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

lfrolov pushed a change to branch DLAB-1593
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at f292b6b  [DLAB-1593]: added domain name for ssn on gcp

This branch includes the following new commits:

     new 916518b  [DLAB-1593]: added arguments
     new f292b6b  [DLAB-1593]: added domain name for ssn on gcp

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[incubator-dlab] 01/02: [DLAB-1593]: added arguments

Posted by lf...@apache.org.
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 916518b95f0cccf7a5dcd0292a81297974352550
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Mar 6 13:29:49 2020 +0200

    [DLAB-1593]: added arguments
---
 infrastructure-provisioning/scripts/deploy_dlab.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/infrastructure-provisioning/scripts/deploy_dlab.py b/infrastructure-provisioning/scripts/deploy_dlab.py
index 40b1485..f276136 100644
--- a/infrastructure-provisioning/scripts/deploy_dlab.py
+++ b/infrastructure-provisioning/scripts/deploy_dlab.py
@@ -143,6 +143,10 @@ parser.add_argument('--conf_stepcerts_root_ca', type=str, default='', help='Step
 parser.add_argument('--conf_stepcerts_kid', type=str, default='', help='Step KID')
 parser.add_argument('--conf_stepcerts_kid_password', type=str, default='', help='Step KID password')
 parser.add_argument('--conf_stepcerts_ca_url', type=str, default='', help='Step CA URL')
+parser.add_argument('--conf_domain_name_enabled', type=str, default='false',
+                    help='IF true, nginx will be configured to use subdomain in specified domain name as service_name')
+parser.add_argument('--conf_domain_name', type=str, default='',
+                    help='Previously registered Domain name. N.B. if used all DNS records must be created by the user manually')
 parser.add_argument('--action', required=True, type=str, default='', choices=['build', 'deploy', 'create', 'terminate'],
                     help='Available options: build, deploy, create, terminate')
 args = parser.parse_args()


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


[incubator-dlab] 02/02: [DLAB-1593]: added domain name for ssn on gcp

Posted by lf...@apache.org.
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 f292b6b5d221d9b4bdb00e2bf6b102b1b341644d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Mar 6 16:42:44 2020 +0200

    [DLAB-1593]: added domain name for ssn on gcp
---
 .../src/general/scripts/gcp/ssn_configure.py       | 43 +++++++++++++++++++---
 .../src/ssn/scripts/configure_ssn_node.py          |  3 ++
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index 1fcbd03..7cdc60b 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -121,7 +121,12 @@ if __name__ == "__main__":
     try:
         instance_hostname = GCPMeta().get_instance_public_ip_by_name(ssn_conf['instance_name'])
         if os.environ['conf_stepcerts_enabled'] == 'true':
-            step_cert_sans = ' --san {0} --san {1}'.format(GCPMeta().get_instance_public_ip_by_name(
+            if os.environ['conf_domain_name_enabled'] and 'conf_domain_name' in os.environ:
+                step_cert_sans = ' --san {0} --san {1} --san ssn.{2}'.format(GCPMeta().get_instance_public_ip_by_name(
+                ssn_conf['instance_name']), get_instance_private_ip_address('ssn', ssn_conf['instance_name']),
+                os.environ['conf_domain_name'])
+            else:
+                step_cert_sans = ' --san {0} --san {1}'.format(GCPMeta().get_instance_public_ip_by_name(
                 ssn_conf['instance_name']), get_instance_private_ip_address('ssn', ssn_conf['instance_name']))
         else:
             step_cert_sans = ''
@@ -266,10 +271,6 @@ if __name__ == "__main__":
 
         cloud_params = [
             {
-                'key': 'KEYCLOAK_REDIRECT_URI',
-                'value': "https://{0}/".format(instance_hostname)
-            },
-            {
                 'key': 'KEYCLOAK_REALM_NAME',
                 'value': os.environ['keycloak_realm_name']
             },
@@ -402,6 +403,38 @@ if __name__ == "__main__":
                 'value': ""
             }
         ]
+        if os.environ['conf_domain_name_enabled'] and 'conf_domain_name' in os.environ:
+            cloud_params.append(
+                {
+                    'key': 'KEYCLOAK_REDIRECT_URI',
+                    'value': "https://{0}/*,https://ssn.{1}/*".format(instance_hostname, os.environ['conf_domain_name'])
+                })
+            cloud_params.append(
+                {
+                    'key': 'DOMAIN_NAME_ENABLED',
+                    'value': os.environ['conf_domain_name_enabled']
+                })
+            cloud_params.append(
+                {
+                    'key': 'DOMAIN_NAME',
+                    'value': 'os.environ['conf_domain_name']'
+                })
+        else:
+            cloud_params.append(
+                {
+                    'key': 'KEYCLOAK_REDIRECT_URI',
+                    'value': "https://{0}/*".format(instance_hostname)
+                })
+            cloud_params.append(
+                {
+                    'key': 'DOMAIN_NAME_ENABLED',
+                    'value': 'false'
+                })
+            cloud_params.append(
+                {
+                    'key': 'DOMAIN_NAME',
+                    'value': ''
+                })
         if os.environ['conf_stepcerts_enabled'] == 'true':
             cloud_params.append(
                 {
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index 42a6a09..fb22bbe 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -231,6 +231,9 @@ if __name__ == "__main__":
         set_hostname(os.environ['ssn_subdomain'], os.environ['ssn_hosted_zone_name'])
         args.hostname = "{0}.{1}".format(os.environ['ssn_subdomain'], os.environ['ssn_hosted_zone_name'])
 
+    if os.environ['conf_domain_name_enabled'] and 'conf_domain_name' in os.environ:
+        args.hostname = "ssn.{}".format(os.environ['conf_domain_name'])
+
     print("Installing nginx as frontend.")
     ensure_nginx(args.dlab_path)
 


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