Add output values for k8s IP addresses 05/45905/2
authorGary Wu <gary.i.wu@huawei.com>
Thu, 3 May 2018 14:29:53 +0000 (07:29 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Thu, 3 May 2018 15:10:50 +0000 (08:10 -0700)
Change-Id: I546da00d39c68dc5c1b5dc233ed102c29174bdc3
Issue-ID: INT-381
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
deployment/heat/onap-oom/onap-oom.yaml
deployment/heat/onap-oom/scripts/deploy.sh
deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
test/ete/scripts/install_openstack_cli.sh

index 44bf799..c290e17 100644 (file)
@@ -383,3 +383,31 @@ outputs:
     description: The IP address of the rancher instance
     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
 
+  k8s_1_vm_ip:
+    description: The IP address of the k8s_1 instance
+    value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
+
+  k8s_2_vm_ip:
+    description: The IP address of the k8s_2 instance
+    value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
+
+  k8s_3_vm_ip:
+    description: The IP address of the k8s_3 instance
+    value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
+
+  k8s_4_vm_ip:
+    description: The IP address of the k8s_4 instance
+    value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
+
+  k8s_5_vm_ip:
+    description: The IP address of the k8s_5 instance
+    value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
+
+  k8s_6_vm_ip:
+    description: The IP address of the k8s_6 instance
+    value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
+
+  k8s_7_vm_ip:
+    description: The IP address of the k8s_7 instance
+    value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
+
index a283682..8ab79a2 100755 (executable)
@@ -49,5 +49,7 @@ for n in $(seq 1 10); do
 done
 ROBOT_POD=$(ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$RANCHER_IP 'sudo su -c "kubectl --namespace onap get pods"' | grep robot | sed 's/ .*//')
 LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$RANCHER_IP "sudo su -c \"kubectl exec $ROBOT_POD --namespace onap -- ls -1t /share/logs | head -1\"")
-wget --user=robot --password=robot -r -np -nH --cut-dirs=2 -R "index.html*" -P $WORKSPACE/archives/ http://$RANCHER_IP:30209/logs/$LOG_DIR/
+
+K8S_IP=$(openstack stack output show onap-oom k8s_1_vm_ip -c output_value -f value)
+wget --user=robot --password=robot -r -np -nH --cut-dirs=2 -R "index.html*" -P $WORKSPACE/archives/ http://$K8S_IP:30209/logs/$LOG_DIR/
 exit 0
index 922c7cc..19e7b60 100755 (executable)
@@ -56,3 +56,13 @@ for VM_NUM in $(seq $NUM_K8S_VMS); do
 done
 
 cat $PARTS_DIR/onap-oom-3.yaml
+
+for VM_NUM in $(seq $NUM_K8S_VMS); do
+    K8S_VM_NAME=k8s_$VM_NUM
+    cat <<EOF
+  ${K8S_VM_NAME}_vm_ip:
+    description: The IP address of the ${K8S_VM_NAME} instance
+    value: { get_attr: [${K8S_VM_NAME}_floating_ip, floating_ip_address] }
+
+EOF
+done
index 8f15296..842034e 100755 (executable)
@@ -24,10 +24,10 @@ else
     ONAP_VENV=$(mktemp -d --suffix=_onap_venv)
     virtualenv ${ONAP_VENV}
     source ${ONAP_VENV}/bin/activate
-    
+
     pip install --upgrade pip
-    pip install openstacksdk==0.9.19 python-openstackclient python-heatclient python-designateclient
-    
+    pip install python-openstackclient python-heatclient python-designateclient
+
     echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties
 fi
 echo "ONAP_VENV=${ONAP_VENV}"