fix circular dependency in heat for vLB 87/3687/1
authorMarco Platania <platania@research.att.com>
Tue, 25 Apr 2017 14:48:04 +0000 (10:48 -0400)
committerMarco Platania <platania@research.att.com>
Tue, 25 Apr 2017 14:48:04 +0000 (10:48 -0400)
Change-Id: I606d4d16b1dd48aaf1fdb81174c9edc1186daea2
Signed-off-by: Marco Platania <platania@research.att.com>
heat/vLB/base_vlb_rackspace.yaml
vnfs/vLB/scripts/v_lb_install.sh

index 5958545..f32bd29 100644 (file)
@@ -167,7 +167,6 @@ resources:
             __dcae_collector_ip__: { get_param: dcae_collector_ip }
             __dcae_collector_port__: { get_param: dcae_collector_port }
             __local_private_ipaddr__: { get_param: vlb_private_ip_0 }
-            __local_public_ipaddr__: { get_attr: [vlb_0, first_address] }
             __repo_url_blob__ : { get_param: repo_url_blob }
             __repo_url_artifacts__ : { get_param: repo_url_artifacts }
             __demo_artifacts_version__ : { get_param: demo_artifacts_version }
@@ -181,7 +180,6 @@ resources:
             echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
             echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
             echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
-            echo "__local_public_ipaddr__" > /opt/config/local_public_ipaddr.txt
             echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
             echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
             echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
index b5f6fd6..5b84f21 100644 (file)
@@ -45,6 +45,13 @@ chmod +x /opt/FDserver/dnsmembership.sh
 chmod +x /opt/FDserver/add_dns.sh
 chmod +x /opt/FDserver/remove_dns.sh
 
+# Create a file with public IP of the VM if it doesn't exist. This is for VMs directly attached to the external network.
+if [ ! -e /opt/config/local_public_ipaddr.txt ]
+then
+       IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+       echo $IP_ADDRESS > /opt/config/local_public_ipaddr.txt
+fi
+
 # Install VPP
 export UBUNTU="trusty"
 export RELEASE=".stable.1609"