]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-prometheus: Rename container to 'prometheus' 160/head
authorZack Cerza <zack@redhat.com>
Wed, 18 Apr 2018 03:44:06 +0000 (21:44 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 18 Apr 2018 19:06:51 +0000 (13:06 -0600)
This change requires some manual steps:
- docker rename cephmetrics-prometheus prometheus
- mv /etc/systemd/system/cephmetrics-prometheus.service
  /etc/systemd/system/prometheus.service
- systemctl daemon-reload
And finally, rerun the playbook.

Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-grafana/tasks/configure_grafana.yml
ansible/roles/ceph-prometheus/files/cephmetrics-prometheus.service [deleted file]
ansible/roles/ceph-prometheus/files/prometheus.service [new file with mode: 0644]
ansible/roles/ceph-prometheus/handlers/main.yml
ansible/roles/ceph-prometheus/tasks/main.yml
ansible/roles/ceph-prometheus/tasks/setup_container.yml

index f1ba0bdd61c6c242a2bee695065b80bd16e2af69..8b17c6a11eaf87cc11ba5a5d33c7eb101d095c23 100644 (file)
@@ -80,7 +80,7 @@
       {
         "name":"{{ grafana.datasource }}",
         "type":"prometheus",
-        "url":"http://cephmetrics-prometheus:9090",
+        "url":"http://prometheus:9090",
         "access":"proxy",
         "basicAuth":false,
         "isDefault":true
diff --git a/ansible/roles/ceph-prometheus/files/cephmetrics-prometheus.service b/ansible/roles/ceph-prometheus/files/cephmetrics-prometheus.service
deleted file mode 100644 (file)
index 4af2c4b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=cephmetrics-prometheus
-After=docker.service
-
-[Service]
-EnvironmentFile=-/etc/environment
-ExecStart=/usr/bin/docker start --attach cephmetrics-prometheus
-ExecStop=-/usr/bin/docker stop cephmetrics-prometheus
-Restart=always
-RestartSec=10s
-TimeoutStartSec=120
-TimeoutStopSec=15
-
-[Install]
-WantedBy=multi-user.target
diff --git a/ansible/roles/ceph-prometheus/files/prometheus.service b/ansible/roles/ceph-prometheus/files/prometheus.service
new file mode 100644 (file)
index 0000000..ff2c87d
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=prometheus
+After=docker.service
+
+[Service]
+EnvironmentFile=-/etc/environment
+ExecStart=/usr/bin/docker start --attach prometheus
+ExecStop=-/usr/bin/docker stop prometheus
+Restart=always
+RestartSec=10s
+TimeoutStartSec=120
+TimeoutStopSec=15
+
+[Install]
+WantedBy=multi-user.target
index e1b7dfd35a00a883c9b780c2dfafffedd176a2ec..421bea57704311656174f601987d3109c11a9495 100644 (file)
@@ -3,7 +3,7 @@
   # We use the systemd module here so we can use the daemon_reload feature,
   # since we're shipping the .service file ourselves
   systemd:
-    name: cephmetrics-prometheus
+    name: prometheus
     daemon_reload: true
     enabled: true
     state: restarted
index c0cc0d09d2a7a3859440045b6e10ec47986cc13d..8a9a572c8cbc76c915e4baa3b627c7b73ec5e7a6 100644 (file)
@@ -29,7 +29,7 @@
 
 - name: Ship systemd service
   copy:
-    src: cephmetrics-prometheus.service
+    src: prometheus.service
     dest: "/etc/systemd/system/"
     owner: root
     group: root
index 25822d730c7296abc74cc8a2412ba3cdeefcbfa9..7e6811620652ddd2792a3da08364ccd9aecc4169 100644 (file)
@@ -8,7 +8,7 @@
 
 - name: Start docker container
   docker_container:
-    name: cephmetrics-prometheus
+    name: prometheus
     image: "{{ prometheus.container_name }}:{{ prometheus.version }}"
     command: "--config.file=/prometheus/prometheus.yml"
     restart_policy: no