You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2022/02/07 09:51:41 UTC

[incubator-datalab] branch DATALAB-2674 created (now 384d245)

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

lfrolov pushed a change to branch DATALAB-2674
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.


      at 384d245  [DATALAB-2674]: fixed how some variables are passed during ssn creation

This branch includes the following new commits:

     new 384d245  [DATALAB-2674]: fixed how some variables are passed during ssn creation

The 1 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@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org


[incubator-datalab] 01/01: [DATALAB-2674]: fixed how some variables are passed during ssn creation

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2674
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 384d245a3b4205e6fe52af6d3c26c8976f12873c
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 7 11:51:27 2022 +0200

    [DATALAB-2674]: fixed how some variables are passed during ssn creation
---
 infrastructure-provisioning/src/general/conf/datalab.ini    |  6 +++---
 .../src/general/scripts/gcp/ssn_prepare.py                  | 13 +++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/infrastructure-provisioning/src/general/conf/datalab.ini b/infrastructure-provisioning/src/general/conf/datalab.ini
index 9ae94fa..c5bac75 100644
--- a/infrastructure-provisioning/src/general/conf/datalab.ini
+++ b/infrastructure-provisioning/src/general/conf/datalab.ini
@@ -229,11 +229,11 @@ datalake_enable = false
 ### Names of the firewall rules for SSN
 # firewall_rules =
 ### True if os login is enabled for instances
-# os_login_enabled =
+os_login_enabled = FALSE
 ### True if block_project_ssh_keys is enabled for instances
-# block_project_ssh_keys =
+block_project_ssh_keys = FALSE
 ### True if versioning is enabled for buckets
-# bucket_enable_versioning =
+bucket_enable_versioning = false
 ### GCP region name for whole DataLab provisioning
 region = us-west1
 ### GCP zone name for whole DataLab provisioning
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
index f4fba87..97aa8cf 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
@@ -71,6 +71,13 @@ if __name__ == "__main__":
                                        "sbn": ssn_conf['service_base_name'],
                                        os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         ssn_conf['allowed_ip_cidr'] = os.environ['conf_allowed_ip_cidr']
+
+        if os.environ['gcp_os_login_enabled'] != 'FALSE':
+            ssn_conf['gcp_os_login_enabled'] = 'TRUE'
+
+        if os.environ['gcp_block_project_ssh_keys'] != 'FALSE':
+            ssn_conf['gcp_block_project_ssh_keys'] = 'TRUE'
+
     except Exception as err:
         datalab.fab.append_result("Failed to generate variables dictionary.", str(err))
         sys.exit(1)
@@ -251,12 +258,6 @@ if __name__ == "__main__":
             GCPActions.remove_vpc(ssn_conf['vpc_name'])
         sys.exit(1)
 
-    if os.environ['gcp_os_login_enabled'] != 'FALSE':
-        ssn_conf['gcp_os_login_enabled'] = 'TRUE'
-
-    if os.environ['gcp_block_project_ssh_keys'] != 'FALSE':
-        ssn_conf['gcp_block_project_ssh_keys'] = 'TRUE'
-
     if os.environ['conf_os_family'] == 'debian':
         ssn_conf['initial_user'] = 'ubuntu'
         ssn_conf['sudo_group'] = 'sudo'

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