CORD-871: Migrate monitoring service to new CORD build infrastructure - phase1
Usage of Monitoring Service build commands in new build system:
----------------------------------------------
Add the below alias to your bashrc file and source it.
CiaB platform-install brings up monitoring-service synchronizer by default.
Once the synchronizer is completely operational, run 'cord-monitoringservice' on your terminal.
alias deploy-monitoringservice="pushd /opt/cord/build/platform-install; ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml onboard-monitoringservice-playbook.yml"
alias instantiate-monitoringservice="pushd /opt/cord/build/platform-install; ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml instantiate-monitoringservice-playbook.yml"
alias generate-install-infra-agents-config=“ansible-playbook -i /etc/maas/ansible/pod-inventory --extra-vars=@/opt/cord/build/genconfig/config.yml monitoringagent-infra-install-config.yml"
alias install-infra-agents=“ansible-playbook -i /opt/cord_profile/monitoringagent_install.hosts monitoringagent-infra-install.yml"
alias generate-enable-infra-monitoring-config=“ansible-playbook -i /etc/maas/ansible/pod-inventory --extra-vars=@/opt/cord/build/genconfig/config.yml monitoringservice-enable-inframonitoring-config.yml"
alias enable-infra-monitoring=“ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml monitoringservice-enable-inframonitoring.yml"
alias test-monitoringservice-initial=“ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml monitoringservice-test-initial.yaml"
alias test-monitoringservice-inframetrics=“ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml monitoringservice-test-inframetrics.yaml"
alias test-monitoringservice-vsgmetrics=“ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml monitoringservice-test-vsgmetrics.yaml"
alias test-monitoringservice-exampleservicemetrics=“ansible-playbook -i inventory/rcord --extra-vars @../genconfig/config.yml monitoringservice-test-exampleservicemetrics.yaml"
alias cord-monitoringservice="echo \"*******NOTE:Ensure monitoring service synchronizer is completely up and running********\"; instantiate-monitoringservice; test-monitoringservice-initial"
alias install-inframonitoring-agent="generate-install-infra-agents-config; install-infra-agents"
alias enable-inframonitoring="generate-enable-infra-monitoring-config; enable-infra-monitoring; test-monitoringservice-inframetrics"
Change-Id: I9895dd1107de50e9817325f750f0608d9eb72be5
diff --git a/roles/monitoringservice-enable-inframonitoring/tasks/main.yml b/roles/monitoringservice-enable-inframonitoring/tasks/main.yml
new file mode 100644
index 0000000..defdb5c
--- /dev/null
+++ b/roles/monitoringservice-enable-inframonitoring/tasks/main.yml
@@ -0,0 +1,8 @@
+---
+# monitoringservice-enable-inframonitoring/tasks/main.yml
+
+- name: Run TOSCA to enable infra monitoring
+ command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/inframonitoring.yaml"
+ tags:
+ - skip_ansible_lint # TOSCA loading should be idempotent
+