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 2019/09/06 13:05:36 UTC
[incubator-dlab] branch develop updated: [Azure]: Any notebook is
not created successfully fixed [Azure]: Shared AMis for both per project
and per endpoint
This is an automated email from the ASF dual-hosted git repository.
dmysakovets pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 24f7420 [Azure]: Any notebook is not created successfully fixed [Azure]: Shared AMis for both per project and per endpoint
new 727cdb9 Merge pull request #290 from bodnarmykola/DLAB-748
24f7420 is described below
commit 24f742020cc08a982fcb3c4fcdcfe202c41d11f5
Author: Mykola_Bodnar1 <bo...@gmail.com>
AuthorDate: Fri Sep 6 15:41:28 2019 +0300
[Azure]: Any notebook is not created successfully fixed
[Azure]: Shared AMis for both per project and per endpoint
---
.../src/general/scripts/azure/common_prepare_notebook.py | 7 +------
.../src/general/scripts/azure/dataengine_prepare.py | 8 ++++++--
.../src/general/scripts/azure/deeplearning_configure.py | 8 ++++++--
.../src/general/scripts/azure/jupyter_configure.py | 8 ++++++--
.../src/general/scripts/azure/rstudio_configure.py | 10 +++++++---
.../src/general/scripts/azure/tensor_configure.py | 8 ++++++--
.../src/general/scripts/azure/zeppelin_configure.py | 8 ++++++--
7 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
index c289a2d..0c80e1b 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
@@ -93,12 +93,7 @@ if __name__ == "__main__":
os.environ['endpoint_name'],
os.environ['project_name'],
os.environ['application'])
- notebook_config['notebook_image_name'] = (
- lambda x: '{0}-{1}-{2}-{3}'.format(notebook_config['service_base_name'],
- os.environ['project_name'],
- os.environ['application'],
- os.environ['notebook_image_name'].lower().replace('_', '-')) if (
- x != 'None' and x != '')
+ notebook_config['notebook_image_name'] = (lambda x: os.environ['notebook_image_name'].lower().replace('_', '-') if (x != 'None' and x != '')
else notebook_config['expected_image_name'])(str(os.environ.get('notebook_image_name')))
print('Searching pre-configured images')
notebook_config['image_name'] = os.environ['azure_{}_image_name'.format(os.environ['conf_os_family'])]
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
index f1b9917..cd8886f 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
@@ -46,6 +46,7 @@ if __name__ == "__main__":
data_engine = dict()
data_engine['user_name'] = os.environ['edge_user_name'].lower().replace('_', '-')
data_engine['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ data_engine['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
data_engine['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
data_engine['endpoint_tag'] = os.environ['endpoint_name'].lower().replace('_', '-')
print('Generating infrastructure names and tags')
@@ -103,8 +104,11 @@ if __name__ == "__main__":
os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
data_engine['primary_disk_size'] = '32'
data_engine['image_type'] = 'default'
- data_engine['expected_image_name'] = '{}-{}-notebook-image'.format(data_engine['service_base_name'],
- os.environ['application'])
+ data_engine['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ data_engine['service_base_name'],
+ data_engine['endpoint_name'],
+ data_engine['project_name'],
+ os.environ['application'])
data_engine['notebook_image_name'] = (lambda x: os.environ['notebook_image_name'] if x != 'None'
else data_engine['expected_image_name'])(str(os.environ.get('notebook_image_name')))
diff --git a/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py b/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
index a090b03..9a3590f 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
@@ -50,14 +50,18 @@ if __name__ == "__main__":
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['user_name'] = os.environ['edge_user_name'].lower().replace('_', '-')
notebook_config['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ notebook_config['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
notebook_config['endpoint_tag'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['user_keyname'] = os.environ['project_name']
notebook_config['instance_name'] = '{}-{}-nb-{}'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
notebook_config['exploratory_name'])
- notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
- os.environ['application'])
+ notebook_config['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ notebook_config['service_base_name'],
+ notebook_config['endpoint_name'],
+ notebook_config['project_name'],
+ os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
notebook_config['project_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py b/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
index 3698b68..2e4892e 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
@@ -49,14 +49,18 @@ if __name__ == "__main__":
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['user_name'] = os.environ['edge_user_name'].replace('_', '-')
notebook_config['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ notebook_config['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
notebook_config['endpoint_tag'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['user_keyname'] = os.environ['project_name']
notebook_config['instance_name'] = '{}-{}-nb-{}'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
notebook_config['exploratory_name'])
- notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
- os.environ['application'])
+ notebook_config['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ notebook_config['service_base_name'],
+ notebook_config['endpoint_name'],
+ notebook_config['project_name'],
+ os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
notebook_config['project_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
index 2785272..198f0ee 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
@@ -50,17 +50,21 @@ if __name__ == "__main__":
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['user_name'] = os.environ['edge_user_name'].lower().replace('_', '-')
notebook_config['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ notebook_config['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
notebook_config['endpoint_tag'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['user_keyname'] = os.environ['project_name']
notebook_config['instance_name'] = '{0}-{1}-nb-{2}'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
notebook_config['exploratory_name'])
- notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
- os.environ['application'])
+ notebook_config['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ notebook_config['service_base_name'],
+ notebook_config['endpoint_name'],
+ notebook_config['project_name'],
+ os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
- notebook_config['user_name'])
+ notebook_config['project_name'])
notebook_config['dlab_ssh_user'] = os.environ['conf_os_user']
notebook_config['tags'] = {"Name": notebook_config['instance_name'],
"SBN": notebook_config['service_base_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py b/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
index 160392d..5972920 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
@@ -52,14 +52,18 @@ if __name__ == "__main__":
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['user_name'] = os.environ['edge_user_name'].lower().replace('_', '-')
notebook_config['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ notebook_config['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
notebook_config['endpoint_tag'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['user_keyname'] = os.environ['project_name']
notebook_config['instance_name'] = '{}-{}-nb-{}'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
notebook_config['exploratory_name'])
- notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
- os.environ['application'])
+ notebook_config['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ notebook_config['service_base_name'],
+ notebook_config['endpoint_name'],
+ notebook_config['project_name'],
+ os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
notebook_config['project_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py b/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
index daa386e..72ae26e 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
@@ -52,13 +52,17 @@ if __name__ == "__main__":
notebook_config['user_keyname'] = os.environ['project_name']
notebook_config['user_name'] = os.environ['edge_user_name'].lower().replace('_', '-')
notebook_config['project_name'] = os.environ['project_name'].lower().replace('_', '-')
+ notebook_config['endpoint_name'] = os.environ['endpoint_name'].lower().replace('_', '-')
notebook_config['project_tag'] = os.environ['project_name'].lower().replace('_', '-')
notebook_config['endpoint_tag'] = os.environ['endpoint_name'].replace('_', '-')
notebook_config['instance_name'] = '{}-{}-nb-{}'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
notebook_config['exploratory_name'])
- notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
- os.environ['application'])
+ notebook_config['expected_image_name'] = '{0}-{1}-{2}-{3}-notebook-image'.format(
+ notebook_config['service_base_name'],
+ notebook_config['endpoint_name'],
+ notebook_config['project_name'],
+ os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
notebook_config['project_name'])
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org