From a66cdf12d388357962803496b7f04974f248a7b0 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 17 Apr 2018 21:44:06 -0600 Subject: [PATCH] ceph-prometheus: Rename container to 'prometheus' 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 --- ansible/roles/ceph-grafana/tasks/configure_grafana.yml | 2 +- .../{cephmetrics-prometheus.service => prometheus.service} | 6 +++--- ansible/roles/ceph-prometheus/handlers/main.yml | 2 +- ansible/roles/ceph-prometheus/tasks/main.yml | 2 +- ansible/roles/ceph-prometheus/tasks/setup_container.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename ansible/roles/ceph-prometheus/files/{cephmetrics-prometheus.service => prometheus.service} (53%) diff --git a/ansible/roles/ceph-grafana/tasks/configure_grafana.yml b/ansible/roles/ceph-grafana/tasks/configure_grafana.yml index f1ba0bd..8b17c6a 100644 --- a/ansible/roles/ceph-grafana/tasks/configure_grafana.yml +++ b/ansible/roles/ceph-grafana/tasks/configure_grafana.yml @@ -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/prometheus.service similarity index 53% rename from ansible/roles/ceph-prometheus/files/cephmetrics-prometheus.service rename to ansible/roles/ceph-prometheus/files/prometheus.service index 4af2c4b..ff2c87d 100644 --- a/ansible/roles/ceph-prometheus/files/cephmetrics-prometheus.service +++ b/ansible/roles/ceph-prometheus/files/prometheus.service @@ -1,11 +1,11 @@ [Unit] -Description=cephmetrics-prometheus +Description=prometheus After=docker.service [Service] EnvironmentFile=-/etc/environment -ExecStart=/usr/bin/docker start --attach cephmetrics-prometheus -ExecStop=-/usr/bin/docker stop cephmetrics-prometheus +ExecStart=/usr/bin/docker start --attach prometheus +ExecStop=-/usr/bin/docker stop prometheus Restart=always RestartSec=10s TimeoutStartSec=120 diff --git a/ansible/roles/ceph-prometheus/handlers/main.yml b/ansible/roles/ceph-prometheus/handlers/main.yml index e1b7dfd..421bea5 100644 --- a/ansible/roles/ceph-prometheus/handlers/main.yml +++ b/ansible/roles/ceph-prometheus/handlers/main.yml @@ -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 diff --git a/ansible/roles/ceph-prometheus/tasks/main.yml b/ansible/roles/ceph-prometheus/tasks/main.yml index c0cc0d0..8a9a572 100644 --- a/ansible/roles/ceph-prometheus/tasks/main.yml +++ b/ansible/roles/ceph-prometheus/tasks/main.yml @@ -29,7 +29,7 @@ - name: Ship systemd service copy: - src: cephmetrics-prometheus.service + src: prometheus.service dest: "/etc/systemd/system/" owner: root group: root diff --git a/ansible/roles/ceph-prometheus/tasks/setup_container.yml b/ansible/roles/ceph-prometheus/tasks/setup_container.yml index 25822d7..7e68116 100644 --- a/ansible/roles/ceph-prometheus/tasks/setup_container.yml +++ b/ansible/roles/ceph-prometheus/tasks/setup_container.yml @@ -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 -- 2.47.3