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/10/31 11:31:21 UTC

[incubator-dlab] branch DLAB-1160 created (now b3c39c6)

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

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


      at b3c39c6  [DLAB-1160] Fixed Custom AMI creation[Azure]

This branch includes the following new commits:

     new b3c39c6  [DLAB-1160] Fixed Custom AMI creation[Azure]

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


[incubator-dlab] 01/01: [DLAB-1160] Fixed Custom AMI creation[Azure]

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

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

commit b3c39c6b99293882e3c20e2489ea32dd87cbd71e
Author: Demyan Mysakovets <de...@gmail.com>
AuthorDate: Thu Oct 31 13:31:07 2019 +0200

    [DLAB-1160] Fixed Custom AMI creation[Azure]
---
 .../src/general/scripts/azure/common_create_notebook_image.py    | 9 +++++----
 .../src/general/scripts/azure/common_prepare_notebook.py         | 5 ++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
index 45baea2..73c17c3 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
@@ -36,7 +36,8 @@ if __name__ == "__main__":
         image_conf['user_name'] = os.environ['edge_user_name'].replace('_', '-')
         image_conf['project_name'] = os.environ['project_name'].lower().replace('_', '-')
         image_conf['project_tag'] = os.environ['project_name'].replace('_', '-')
-        image_conf['endpoint_tag'] = os.environ['project_name'].replace('_', '-')
+        image_conf['endpoint_name'] = os.environ['endpoint_name'].replace('_', '-')
+        image_conf['endpoint_tag'] = os.environ['endpoint_name'].replace('_', '-')
         image_conf['instance_name'] = os.environ['notebook_instance_name']
         image_conf['application'] = os.environ['application']
         image_conf['dlab_ssh_user'] = os.environ['conf_os_user']
@@ -56,9 +57,9 @@ if __name__ == "__main__":
 
         instance_hostname = AzureMeta().get_private_ip_address(image_conf['resource_group_name'],
                                                                image_conf['instance_name'])
-        edge_instance_name = '{0}-{1}-{2}-edge'.format(notebook_config['service_base_name'],
-                                                       notebook_config['project_name'],
-                                                       notebook_config['endpoint_name'])
+        edge_instance_name = '{0}-{1}-{2}-edge'.format(image_conf['service_base_name'],
+                                                       image_conf['project_name'],
+                                                       image_conf['endpoint_name'])
         edge_instance_hostname = AzureMeta().get_private_ip_address(image_conf['resource_group_name'],
                                                                     edge_instance_name)
         keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
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 37bba7d..bbe8803 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
@@ -102,7 +102,10 @@ if __name__ == "__main__":
             notebook_config['service_base_name'],
             notebook_config['endpoint_name'],
             notebook_config['application'])
-        notebook_config['notebook_image_name'] = (lambda x: os.environ['notebook_image_name'].lower().replace('_', '-') if (x != 'None' and x != '')
+        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 != '')
             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'])]


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