Initial commit of PassiveTest

Change-Id: Idcd9a0c72df5eae6b4eedc544e473ebc9763ccdb
diff --git a/install_monitoring_plugin.sh b/install_monitoring_plugin.sh
new file mode 100644
index 0000000..b2dc91c
--- /dev/null
+++ b/install_monitoring_plugin.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+#set -x 
+NODE=$( bash -c "source ~/service-profile/cord-pod/admin-openrc.sh; nova list --all-tenants 2>&1 | grep -m 1 ceilometer | cut -d ' ' -f 2 | xargs -I{} nova show {} 2>&1 | grep -m 1 hypervisor | tr -s ' ' | cut -d ' ' -f 4")
+
+INSTANCE_IP=$( bash -c "source ~/service-profile/cord-pod/admin-openrc.sh; nova list --all-tenants 2>&1 | grep -m 1 ceilometer | cut -d ' ' -f 2 | xargs -I{} nova show {} 2>&1 | grep -m 1 management | tr -s ' ' | cut -d ' ' -f 5")
+
+cat <<EOF > install_monitoring_agent.config
+[ssh_connection]
+ssh_args = -o "ProxyCommand ssh -q -i ~/service-profile/cord-pod/node_key -o StrictHostKeyChecking=no ubuntu@$NODE nc $INSTANCE_IP 22"
+scp_if_ssh = True
+pipelining = True
+
+[defaults]
+host_key_checking = False
+timeout = 30
+EOF
+
+ANSIBLE_CONFIG=install_monitoring_agent.config ansible-playbook -vvv -i /etc/maas/ansible/pod-inventory ~/xos_services/PassiveTest/install_monitoring_plugin.yaml -e instance_ip="$INSTANCE_IP" -e instance_host="$NODE"
+