From d26bbeef65b7aeb6a0a3bf4ce3364657e81454c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Juan=20Miguel=20Olmo=20Mart=C3=ADnez?= Date: Fri, 12 Feb 2021 14:09:17 +0100 Subject: [PATCH] mgr/cephadm: Put together default container images references MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Placed all in the same location in order to make easy downstream modifications and future changes Signed-off-by: Juan Miguel Olmo Martínez (cherry picked from commit ce246479443a64b292c7cff2a662161c8a598e09) Conflicts: src/cephadm/cephadm --- src/cephadm/cephadm | 15 +++++++++++---- src/pybind/mgr/cephadm/module.py | 18 +++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index b0fe25b21c986..9f71b6c4bd3ce 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1,7 +1,14 @@ #!/usr/bin/python3 +# Default container images ----------------------------------------------------- DEFAULT_IMAGE = 'docker.io/ceph/daemon-base:latest-pacific-devel' DEFAULT_IMAGE_IS_MASTER = False +DEFAULT_PROMETHEUS_IMAGE = "docker.io/prom/prometheus:v2.18.1" +DEFAULT_NODE_EXPORTER_IMAGE = "docker.io/prom/node-exporter:v0.18.1" +DEFAULT_GRAFANA_IMAGE = "docker.io/ceph/ceph-grafana:6.7.4" +DEFAULT_ALERT_MANAGER_IMAGE = "docker.io/prom/alertmanager:v0.20.0" +# ------------------------------------------------------------------------------ + LATEST_STABLE_RELEASE = 'pacific' DATA_DIR = '/var/lib/ceph' LOG_DIR = '/var/log/ceph' @@ -225,7 +232,7 @@ class Monitoring(object): components = { "prometheus": { - "image": "docker.io/prom/prometheus:v2.18.1", + "image": DEFAULT_PROMETHEUS_IMAGE, "cpus": '2', "memory": '4GB', "args": [ @@ -238,7 +245,7 @@ class Monitoring(object): ], }, "node-exporter": { - "image": "docker.io/prom/node-exporter:v0.18.1", + "image": DEFAULT_NODE_EXPORTER_IMAGE, "cpus": "1", "memory": "1GB", "args": [ @@ -246,7 +253,7 @@ class Monitoring(object): ], }, "grafana": { - "image": "docker.io/ceph/ceph-grafana:6.7.4", + "image": DEFAULT_GRAFANA_IMAGE, "cpus": "2", "memory": "4GB", "args": [], @@ -258,7 +265,7 @@ class Monitoring(object): ], }, "alertmanager": { - "image": "docker.io/prom/alertmanager:v0.20.0", + "image": DEFAULT_ALERT_MANAGER_IMAGE, "cpus": "2", "memory": "2GB", "args": [ diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 3f01f6a63a316..2822d8580264f 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -86,6 +86,14 @@ Host * CEPH_TYPES = set(CEPH_UPGRADE_ORDER) +# Default container images ----------------------------------------------------- +DEFAULT_IMAGE = 'docker.io/ceph/ceph' +DEFAULT_PROMETHEUS_IMAGE = 'docker.io/prom/prometheus:v2.18.1' +DEFAULT_NODE_EXPORTER_IMAGE = 'docker.io/prom/node-exporter:v0.18.1' +DEFAULT_GRAFANA_IMAGE = 'docker.io/ceph/ceph-grafana:6.7.4' +DEFAULT_ALERT_MANAGER_IMAGE = 'docker.io/prom/alertmanager:v0.20.0' +# ------------------------------------------------------------------------------ + class CephadmCompletion(orchestrator.Completion[T]): def evaluate(self) -> None: @@ -182,28 +190,28 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, ), Option( 'container_image_base', - default='docker.io/ceph/ceph', + default=DEFAULT_IMAGE, desc='Container image name, without the tag', runtime=True, ), Option( 'container_image_prometheus', - default='docker.io/prom/prometheus:v2.18.1', + default=DEFAULT_PROMETHEUS_IMAGE, desc='Prometheus container image', ), Option( 'container_image_grafana', - default='docker.io/ceph/ceph-grafana:6.7.4', + default=DEFAULT_GRAFANA_IMAGE, desc='Prometheus container image', ), Option( 'container_image_alertmanager', - default='docker.io/prom/alertmanager:v0.20.0', + default=DEFAULT_ALERT_MANAGER_IMAGE, desc='Prometheus container image', ), Option( 'container_image_node_exporter', - default='docker.io/prom/node-exporter:v0.18.1', + default=DEFAULT_NODE_EXPORTER_IMAGE, desc='Prometheus container image', ), Option( -- 2.39.5