Change method for getting floating IP addr 23/323/1
authorwrider <lji@research.att.com>
Wed, 12 Jun 2019 13:27:43 +0000 (09:27 -0400)
committerwrider <lji@research.att.com>
Wed, 12 Jun 2019 13:27:53 +0000 (09:27 -0400)
Previous method fo rgetting floating IP address is OpenStack specific,
not working for virtualization platforms such as VirtualBox.  Switching
to a more generic method.

Change-Id: I65ba0f3ad7c105a24a399cf40040806f36c821bf
Signed-off-by: wrider <lji@research.att.com>
ric-infra/00-Kubernetes/bin/gen-cloud-init.sh

index b0270c4..61603ba 100755 (executable)
@@ -126,7 +126,8 @@ sed -e "s/__k8s_cni_version__/${INFRA_CNI_VERSION}/g" "$filename" > tmp && mv tm
 sed -e "s/__helm_version__/${INFRA_HELM_VERSION}/g" "$filename" > tmp && mv tmp "$filename"
 sed -e "s/__k8s_mst_private_ip_addr__/\$(hostname -I)/g" "$filename" > tmp && mv tmp "$filename"
 sed -e "s/__host_private_ip_addr__/\$(hostname -I)/g" "$filename" > tmp && mv tmp "$filename"
-sed -e "s/__k8s_mst_floating_ip_addr__/\$(ec2metadata --public-ipv4)/g" "$filename" > tmp && mv tmp "$filename" 
+#sed -e "s/__k8s_mst_floating_ip_addr__/\$(ec2metadata --public-ipv4)/g" "$filename" > tmp && mv tmp "$filename" 
+sed -e "s/__k8s_mst_floating_ip_addr__/\$(curl ifconfig.co)/g" "$filename" > tmp && mv tmp "$filename" 
 sed -e "s/__stack_name__/\$(hostname)/g" "$filename" > tmp && mv tmp "$filename"
 #echo "__mtu__" > /opt/config/mtu.txt
 #echo "__cinder_volume_id__" > /opt/config/cinder_volume_id.txt