]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-grafana: Add devel_mode switch 22/head
authorZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 20:07:58 +0000 (14:07 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 21:22:44 +0000 (15:22 -0600)
This will be set to False for production deployments.

Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-grafana/defaults/main.yml
ansible/roles/ceph-grafana/tasks/configure_grafana.yml
ansible/roles/ceph-grafana/tasks/install_packages.yml
ansible/roles/ceph-grafana/tasks/setup_repos.yml

index 817e2e7d9af16cd6ede1e503154b4adb92f61e95..ca033bbc6b618ac28eae4b3ceb13aecd6c4240ec 100644 (file)
@@ -1,6 +1,7 @@
 ---
 containerized_deployment: false
 use_epel: false
+devel_mode: true
 graphite:
   port: "{{ graphite_port | default('8080') }}"
   user: admin
index a0110dbc3cc4e2cca80628220cb75335b6143858..a25e01c34e9a5f738d77f0828a61f910ce793bde 100644 (file)
   notify: Restart Grafana
 
 - include: grafana_plugins.yml
+  when: devel_mode
 
 - name: Ship dashboard templates
   copy:
     src: files/dashboards
     dest: /tmp/
+  when: devel_mode
 
 - name: Ship dashUpdater.py
   copy:
     src: files/dashUpdater.py
     dest: /tmp/dashUpdater.py
+  when: devel_mode
 
 - name: Write dashboard.yml
   template:
@@ -89,6 +92,9 @@
     dest: /tmp/dashboard.yml
 
 - name: Push dashboards to Grafana
-  command: python dashUpdater.py -D ./dashboards
-  args:
-    chdir: /tmp
+  command: python /tmp/dashUpdater.py -c /tmp/dashboard.yml -D /tmp/dashboards
+  when: devel_mode
+
+- name: Push dashboards to Grafana
+  command: /usr/libexec/cephmetrics/dashUpdater.py -c /tmp/dashboard.yml -D /usr/share/cephmetrics/dashboards
+  when: not devel_mode
index 8e699d5767e19491799a4896fd5e958f7a899df0..95ea1af9230635d8135e58afc9c5cce8275dfcbf 100644 (file)
@@ -9,3 +9,10 @@
     - graphite-web
     - python-carbon
     - grafana
+  when: devel_mode
+
+- name: Install cephmetrics
+  package:
+    name: cephmetrics
+    state: latest
+  when: not devel_mode
index b7f0e2e9f68f365e3f11e6e9986e95cce7821d3b..11ba3d8f7a9e09f9d2773a7570f70387216f1db4 100644 (file)
@@ -5,6 +5,7 @@
     state: "{{ 'present' if use_epel else 'absent' }}"
   when:
     - ansible_pkg_mgr == "yum"
+    - devel_mode
 
 - name: Install chacra repo
   copy:
@@ -29,6 +30,7 @@
   when:
     - ansible_pkg_mgr == 'yum'
     - use_epel
+    - devel_mode
 
 - name: Remove Grafana repo
   file: