This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DLAB-1628 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 02f647f46baf39f69e23f23b751e53be2c8444ac Author: leonidfrolov <[email protected]> AuthorDate: Tue Mar 17 17:57:03 2020 +0200 [DLAB-1628]: added replace _ - for bucket names --- .../scripts/aws/common_notebook_configure_dataengine-service.py | 3 ++- .../src/general/scripts/aws/common_stop_notebook.py | 3 ++- .../src/general/scripts/aws/common_terminate_notebook.py | 3 ++- .../src/general/scripts/aws/dataengine-service_configure.py | 2 +- .../src/general/scripts/aws/dataengine-service_prepare.py | 2 +- .../src/general/scripts/aws/dataengine-service_terminate.py | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py index a29049a..1d0df4f 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py +++ b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py @@ -61,7 +61,8 @@ if __name__ == "__main__": notebook_config['endpoint_name'] = os.environ['endpoint_name'] notebook_config['bucket_name'] = '{0}-{1}-{2}-bucket'.format(notebook_config['service_base_name'], notebook_config['project_name'], - notebook_config['endpoint_name']).lower() + notebook_config['endpoint_name'] + ).lower().replace('_', '-') notebook_config['cluster_name'] = dlab.meta_lib.get_not_configured_emr(notebook_config['tag_name'], notebook_config['notebook_name'], True) notebook_config['notebook_ip'] = dlab.meta_lib.get_instance_ip_address( diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py index 1d331a6..679d4eb 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py +++ b/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py @@ -105,7 +105,8 @@ if __name__ == "__main__": notebook_config['endpoint_name'] = os.environ['endpoint_name'] notebook_config['bucket_name'] = '{0}-{1}-{2}-bucket'.format(notebook_config['service_base_name'], notebook_config['project_name'], - notebook_config['endpoint_name']).lower() + notebook_config['endpoint_name'] + ).lower().replace('_', '-') notebook_config['tag_name'] = notebook_config['service_base_name'] + '-tag' notebook_config['key_path'] = os.environ['conf_key_dir'] + '/' + os.environ['conf_key_name'] + '.pem' diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py index d93c66c..c199089 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py +++ b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py @@ -84,7 +84,8 @@ if __name__ == "__main__": notebook_config['endpoint_name'] = os.environ['endpoint_name'] notebook_config['bucket_name'] = '{0}-{1}-{2}-bucket'.format(notebook_config['service_base_name'], notebook_config['project_name'], - notebook_config['endpoint_name']).lower() + notebook_config['endpoint_name'] + ).lower().replace('_', '-') notebook_config['tag_name'] = notebook_config['service_base_name'] + '-tag' try: diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py index f0d36e5..9e9fb40 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py @@ -204,7 +204,7 @@ if __name__ == "__main__": emr_conf['computational_name'], args.uuid) emr_conf['bucket_name'] = '{0}-{1}-{2}-bucket'.format(emr_conf['service_base_name'], emr_conf['project_name'], - emr_conf['endpoint_name']).lower() + emr_conf['endpoint_name']).lower().replace('_', '-') tag = {"Key": "{}-tag".format(emr_conf['service_base_name']), "Value": "{}-{}-{}-subnet".format( emr_conf['service_base_name'], emr_conf['project_name'], emr_conf['endpoint_name'])} emr_conf['subnet_cidr'] = dlab.meta_lib.get_subnet_by_tag(tag) diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py index 42c357d..7dd94d9 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py @@ -114,7 +114,7 @@ if __name__ == "__main__": emr_conf['computational_name'], args.uuid) emr_conf['bucket_name'] = '{0}-{1}-{2}-bucket'.format(emr_conf['service_base_name'], emr_conf['project_name'], - emr_conf['endpoint_name']).lower() + emr_conf['endpoint_name']).lower().replace('_', '-') emr_conf['configurations'] = '[]' if 'emr_configurations' in os.environ: emr_conf['configurations'] = os.environ['emr_configurations'] diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py index e66ec7c..e9551e3 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py +++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py @@ -79,7 +79,7 @@ if __name__ == "__main__": emr_conf['project_name'] = os.environ['project_name'] emr_conf['endpoint_name'] = os.environ['endpoint_name'] emr_conf['bucket_name'] = '{0}-{1}-{2}-bucket'.format(emr_conf['service_base_name'], emr_conf['project_name'], - emr_conf['endpoint_name']).lower() + emr_conf['endpoint_name']).lower().replace('_', '-') emr_conf['key_path'] = os.environ['conf_key_dir'] + '/' + os.environ['conf_key_name'] + '.pem' emr_conf['tag_name'] = emr_conf['service_base_name'] + '-tag' --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
