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 10:13:53 UTC
[incubator-datalab] 01/01: [DATALAB-2674]: fixed how some variables are passed during notebook/cluster/project creation
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 acdaed57db60023ef643c7b786c206e2f2e2ea5d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 7 12:13:38 2022 +0200
[DATALAB-2674]: fixed how some variables are passed during notebook/cluster/project creation
---
.../src/general/scripts/gcp/common_prepare_notebook.py | 8 ++------
.../src/general/scripts/gcp/dataengine_prepare.py | 8 ++------
.../src/general/scripts/gcp/project_prepare.py | 7 ++-----
3 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
index 5925480..4b8c104 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
@@ -148,12 +148,8 @@ if __name__ == "__main__":
notebook_config['secondary_image_name'] = 'global/images/{}'.format(
notebook_config['secondary_image_name'].get('name'))
- if os.environ['gcp_os_login_enabled'] != 'FALSE':
- notebook_config['gcp_os_login_enabled'] = 'TRUE'
-
- if os.environ['gcp_block_project_ssh_keys'] != 'FALSE':
- notebook_config['gcp_block_project_ssh_keys'] = 'TRUE'
-
+ notebook_config['gcp_os_login_enabled'] = os.environ['gcp_os_login_enabled']
+ notebook_config['gcp_block_project_ssh_keys'] = os.environ['gcp_block_project_ssh_keys']
notebook_config['gpu_accelerator_type'] = 'None'
notebook_config['gpu_accelerator_count'] = 'None'
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
index a549dee..078f442 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
@@ -98,12 +98,8 @@ if __name__ == "__main__":
initial_user = 'ec2-user'
sudo_group = 'wheel'
- if os.environ['gcp_os_login_enabled'] != 'FALSE':
- data_engine['gcp_os_login_enabled'] = 'TRUE'
-
- if os.environ['gcp_block_project_ssh_keys'] != 'FALSE':
- data_engine['gcp_block_project_ssh_keys'] = 'TRUE'
-
+ data_engine['gcp_os_login_enabled'] = os.environ['gcp_os_login_enabled']
+ data_engine['gcp_block_project_ssh_keys'] = os.environ['gcp_block_project_ssh_keys']
data_engine['cluster_name'] = "{}-{}-{}-de-{}".format(data_engine['service_base_name'],
data_engine['project_name'],
data_engine['endpoint_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
index 2b594de..1ebbcae 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
@@ -503,11 +503,8 @@ if __name__ == "__main__":
project_conf['initial_user'] = 'ec2-user'
project_conf['sudo_group'] = 'wheel'
- if os.environ['gcp_os_login_enabled'] != 'FALSE':
- project_conf['gcp_os_login_enabled'] = 'TRUE'
-
- if os.environ['gcp_block_project_ssh_keys'] != 'FALSE':
- project_conf['gcp_block_project_ssh_keys'] = 'TRUE'
+ project_conf['gcp_os_login_enabled'] = os.environ['gcp_os_login_enabled']
+ project_conf['gcp_block_project_ssh_keys'] = os.environ['gcp_block_project_ssh_keys']
try:
project_conf['static_ip'] = \
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org