This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-1469 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1469 by this push: new 7177e3b [DLAB-1469]: Fixed issue with result file 7177e3b is described below commit 7177e3b32aa3b7a106d3e42fe5e100ad76b9ff98 Author: Oleh Martushevskyi <oleh_martushevs...@epam.com> AuthorDate: Wed Jan 22 13:38:10 2020 +0200 [DLAB-1469]: Fixed issue with result file --- .../src/general/scripts/gcp/common_prepare_notebook.py | 4 ++++ .../src/general/scripts/gcp/dataengine-service_prepare.py | 3 +++ .../src/general/scripts/gcp/dataengine_prepare.py | 4 ++++ 3 files changed, 11 insertions(+) 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 4814c52..ae66e80 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py @@ -128,6 +128,10 @@ if __name__ == "__main__": notebook_config['network_tag'] = '{0}-{1}-ps'.format(notebook_config['service_base_name'], notebook_config['project_name']) + with open('/root/result.json', 'w') as f: + data = {"notebook_name": notebook_config['instance_name'], "error": ""} + json.dump(data, f) + additional_tags = os.environ['tags'].replace("': u'", ": ").replace("', u'", ", ").replace("{u'", "" ).replace("'}", "") print('Additional tags will be added: {}'.format(additional_tags)) diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py index 91a8535..c6dfa98 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py @@ -140,6 +140,9 @@ if __name__ == "__main__": ssh_admin_pubkey = key.publickey().exportKey("OpenSSH") dataproc_cluster['config']['gceClusterConfig']['metadata']['ssh-keys'] = '{0}:{1}\n{0}:{2}'.format(dataproc_conf['dlab_ssh_user'], ssh_user_pubkey, ssh_admin_pubkey) dataproc_cluster['config']['gceClusterConfig']['tags'][0] = dataproc_conf['cluster_tag'] + with open('/root/result.json', 'w') as f: + data = {"hostname": dataproc_conf['cluster_name'], "error": ""} + json.dump(data, f) try: logging.info('[Creating Dataproc Cluster]') diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py index d0cf7ea..b221578 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py @@ -134,6 +134,10 @@ if __name__ == "__main__": print('Pre-configured secondary image found. Using: {}'.format(data_engine['secondary_image_name'].get('name'))) data_engine['secondary_image_name'] = 'global/images/{}'.format(data_engine['secondary_image_name'].get('name')) + with open('/root/result.json', 'w') as f: + data = {"hostname": data_engine['cluster_name'], "error": ""} + json.dump(data, f) + data_engine['gpu_accelerator_type'] = 'None' if os.environ['application'] in ('tensor', 'tensor-rstudio', 'deeplearning'): data_engine['gpu_accelerator_type'] = os.environ['gcp_gpu_accelerator_type'] --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org