This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-1467 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1467 by this push: new b39ee4c [DLAB-1467]: Added terraform scripts for deploying DLab endpoint b39ee4c is described below commit b39ee4cc8251f7e6bcfbd0a068f74dcd3f862a77 Author: Oleh Martushevskyi <oleh_martushevs...@epam.com> AuthorDate: Tue Feb 4 15:54:38 2020 +0200 [DLAB-1467]: Added terraform scripts for deploying DLab endpoint --- .../terraform/bin/deploy/endpoint_fab.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py index 0b9c5b6..0c5cc6b 100644 --- a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py +++ b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py @@ -128,12 +128,13 @@ def ensure_step_certs(): except: public_ip_address = None elif args.cloud_provider == 'azure': - local_ip_address = conn.sudo('curl -s ' - 'http://169.254.169.254/latest/meta-data/local-ipv4').stdout.replace('\n', - '') + local_ip_address = conn.sudo('curl -s -H Metadata:true "http://169.254.169.254/metadata/' + 'instance?api-version=2017-08-01&format=json" | jq -r ".network.' + 'interface[].ipv4.ipAddress[].privateIpAddress"').stdout try: - public_ip_address = conn.sudo('curl -s http://169.254.169.254/latest/meta-data/' - 'public-ipv4').stdout.replace('\n', '') + public_ip_address = conn.sudo('curl -s -H Metadata:true "http://169.254.169.254/metadata/' + 'instance?api-version=2017-08-01&format=json" | jq -r ".network.' + 'interface[].ipv4.ipAddress[].publicIpAddress"').stdout except: public_ip_address = None else: @@ -229,7 +230,7 @@ def ensure_docker_endpoint(): .stdout.rstrip("\n\r")) conn.sudo("sed -i 's|DNS_IP_RESOLVE|\"dns\": [\"{0}\"],|g' {1}/tmp/daemon.json" .format(dns_ip_resolve, args.dlab_path)) - elif args.cloud_provider == "gcp": + elif args.cloud_provider == "gcp" or args.cloud_provider == "azure": dns_ip_resolve = "" conn.sudo('sed -i "s|DNS_IP_RESOLVE||g" {1}/tmp/daemon.json' .format(dns_ip_resolve, args.dlab_path)) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org