From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- monitoring/grafana/build/Makefile | 84 +++++++++++++++++++++ monitoring/grafana/build/README.md | 37 +++++++++ monitoring/grafana/screenshots/ceph-cluster1.png | Bin 0 -> 201798 bytes monitoring/grafana/screenshots/ceph-cluster2.png | Bin 0 -> 204800 bytes monitoring/grafana/screenshots/host-details.png | Bin 0 -> 214033 bytes .../grafana/screenshots/host-details.resized.png | Bin 0 -> 833169 bytes monitoring/grafana/screenshots/host_overview.png | Bin 0 -> 403994 bytes monitoring/grafana/screenshots/mds-performance.png | Bin 0 -> 52682 bytes monitoring/grafana/screenshots/osd-performance.png | Bin 0 -> 137137 bytes monitoring/grafana/screenshots/osd_overview.png | Bin 0 -> 358872 bytes monitoring/grafana/screenshots/pool-details.png | Bin 0 -> 123041 bytes monitoring/grafana/screenshots/pool-overview.png | Bin 0 -> 102273 bytes monitoring/grafana/screenshots/rgw-detail.png | Bin 0 -> 277302 bytes monitoring/grafana/screenshots/rgw-overview.png | Bin 0 -> 296415 bytes 14 files changed, 121 insertions(+) create mode 100755 monitoring/grafana/build/Makefile create mode 100644 monitoring/grafana/build/README.md create mode 100644 monitoring/grafana/screenshots/ceph-cluster1.png create mode 100644 monitoring/grafana/screenshots/ceph-cluster2.png create mode 100644 monitoring/grafana/screenshots/host-details.png create mode 100644 monitoring/grafana/screenshots/host-details.resized.png create mode 100644 monitoring/grafana/screenshots/host_overview.png create mode 100644 monitoring/grafana/screenshots/mds-performance.png create mode 100644 monitoring/grafana/screenshots/osd-performance.png create mode 100644 monitoring/grafana/screenshots/osd_overview.png create mode 100644 monitoring/grafana/screenshots/pool-details.png create mode 100644 monitoring/grafana/screenshots/pool-overview.png create mode 100644 monitoring/grafana/screenshots/rgw-detail.png create mode 100644 monitoring/grafana/screenshots/rgw-overview.png (limited to 'monitoring/grafana') diff --git a/monitoring/grafana/build/Makefile b/monitoring/grafana/build/Makefile new file mode 100755 index 000000000..64f619990 --- /dev/null +++ b/monitoring/grafana/build/Makefile @@ -0,0 +1,84 @@ + +GRAFANA_VERSION ?= 8.3.5-1 +PIECHART_VERSION ?= "1.6.2" +STATUS_PANEL_VERSION ?= "1.0.11" +DASHBOARD_DIR := "../../ceph-mixin/dashboards_out" +DASHBOARD_PROVISIONING := "ceph-dashboard.yml" +IMAGE := "docker.io/redhat/ubi8:8.5" +PKGMGR := "dnf" +GF_CONFIG := "/etc/grafana/grafana.ini" +# clip off "- from the end of GRAFANA_VERSION +CONTAINER_VERSION := $(shell /bin/echo $(GRAFANA_VERSION) | /bin/sed 's/-.*//') + +ARCH ?= x86_64 +ifeq "$(ARCH)" "arm64" + override ARCH := aarch64 +endif + +LOCALTAG=ceph-grafana:$(CONTAINER_VERSION)-$(ARCH) +TAG=ceph/ceph-grafana:$(CONTAINER_VERSION)-$(ARCH) + +# Build a grafana instance - preconfigured for use within Ceph's dashboard UI + +build : + echo "Creating base container" + $(eval CONTAINER := $(shell sudo buildah from ${IMAGE})) + # Using upstream grafana build + curl -fLO https://dl.grafana.com/oss/release/grafana-${GRAFANA_VERSION}.${ARCH}.rpm + sudo buildah copy $(CONTAINER) grafana-${GRAFANA_VERSION}.${ARCH}.rpm /tmp/grafana-${GRAFANA_VERSION}.${ARCH}.rpm + sudo buildah run $(CONTAINER) ${PKGMGR} install -y --setopt install_weak_deps=false --setopt=tsflags=nodocs /tmp/grafana-${GRAFANA_VERSION}.${ARCH}.rpm + sudo buildah run $(CONTAINER) ${PKGMGR} clean all + sudo buildah run $(CONTAINER) rm -f /tmp/grafana*.rpm + sudo buildah run $(CONTAINER) grafana-cli plugins install grafana-piechart-panel ${PIECHART_VERSION} + sudo buildah run $(CONTAINER) grafana-cli plugins install vonage-status-panel ${STATUS_PANEL_VERSION} + sudo buildah run $(CONTAINER) mkdir -p /etc/grafana/dashboards/ceph-dashboard + sudo buildah copy $(CONTAINER) ${DASHBOARD_DIR}/*.json /etc/grafana/dashboards/ceph-dashboard + + @/bin/echo -e "\ +apiVersion: 1 \\n\ +providers: \\n\ +- name: 'Ceph Dashboard' \\n\ + torgId: 1 \\n\ + folder: 'ceph-dashboard' \\n\ + type: file \\n\ + disableDeletion: false \\n\ + updateIntervalSeconds: 3 \\n\ + editable: false \\n\ + options: \\n\ + path: '/etc/grafana/dashboards/ceph-dashboard'" >> ${DASHBOARD_PROVISIONING} + + + sudo buildah copy $(CONTAINER) ${DASHBOARD_PROVISIONING} /etc/grafana/provisioning/dashboards/${DASHBOARD_PROVISIONING} + + # expose tcp/3000 for grafana + sudo buildah config --port 3000 $(CONTAINER) + + # set working dir + sudo buildah config --workingdir /usr/share/grafana $(CONTAINER) + + # set environment overrides from the default locations in /usr/share + sudo buildah config --env GF_PATHS_LOGS="/var/log/grafana" $(CONTAINER) + sudo buildah config --env GF_PATHS_PLUGINS="/var/lib/grafana/plugins" $(CONTAINER) + sudo buildah config --env GF_PATHS_PROVISIONING="/etc/grafana/provisioning" $(CONTAINER) + sudo buildah config --env GF_PATHS_DATA="/var/lib/grafana" $(CONTAINER) + + # entrypoint + sudo buildah config --entrypoint "grafana-server --config=${GF_CONFIG}" $(CONTAINER) + + # finalize + sudo buildah config --label maintainer="Paul Cuzner " $(CONTAINER) + sudo buildah config --label description="Ceph Grafana Container" $(CONTAINER) + sudo buildah config --label summary="Grafana Container configured for Ceph mgr/dashboard integration" $(CONTAINER) + sudo buildah commit --format docker --squash $(CONTAINER) $(LOCALTAG) + +push: + sudo podman tag ${LOCALTAG} quay.io/${TAG} + # sudo podman has issues with auth.json; just override it + sudo podman login --authfile=auth.json -u $(CONTAINER_REPO_USERNAME) -p $(CONTAINER_REPO_PASSWORD) quay.io + sudo podman push --authfile=auth.json --format v2s2 quay.io/${TAG} + +clean: + sudo podman rmi ${LOCALTAG} || true + sudo podman rmi quay.io/${TAG} || true + rm -f grafana-*.rpm* auth.json + rm -f ${DASHBOARD_PROVISIONING} diff --git a/monitoring/grafana/build/README.md b/monitoring/grafana/build/README.md new file mode 100644 index 000000000..f77a40abc --- /dev/null +++ b/monitoring/grafana/build/README.md @@ -0,0 +1,37 @@ +# Building the ceph-grafana container image +From Nautilus onwards, grafana is embedded into the mgr/dashboard UI and uses two discrete grafana plugins to provide visualisations within the UI. To better support disconnected installs, and provide a more tested configuration you may use the Makefile, in this directory, to (re)generate the grafana containers based on each Ceph release. + +The versions of grafana, and the plugins are defined in the script so testing can be done against a known configuration. + +## Container +The current implementation uses buildah with a CentOS8 base image. + +## Dependencies +Ensure you have the following dependencies installed on your system, before attempting to build the image(s) +- podman or docker +- buildah +- jq +- make + +## Build Process +The Makefile supports the following invocations; +``` +# make <-- create container with dashboards from master +# make all +# make ceph_version=octopus +# make ceph_version=nautilus +``` + +Once complete, a ```make all``` execution will provide the following containers on your system. +``` +# podman images +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/ceph/ceph-grafana master 606fa5444fc6 14 minutes ago 497 MB +localhost/ceph-grafana master 606fa5444fc6 14 minutes ago 497 MB +localhost/ceph-grafana octopus 580b089c14e7 15 minutes ago 497 MB +localhost/ceph/ceph-grafana octopus 580b089c14e7 15 minutes ago 497 MB +localhost/ceph-grafana nautilus 3c91712dd26f 17 minutes ago 497 MB +localhost/ceph/ceph-grafana nautilus 3c91712dd26f 17 minutes ago 497 MB +registry.centos.org/centos 8 29d8fb6c94af 30 hours ago 223 MB + +``` diff --git a/monitoring/grafana/screenshots/ceph-cluster1.png b/monitoring/grafana/screenshots/ceph-cluster1.png new file mode 100644 index 000000000..4c59bd273 Binary files /dev/null and b/monitoring/grafana/screenshots/ceph-cluster1.png differ diff --git a/monitoring/grafana/screenshots/ceph-cluster2.png b/monitoring/grafana/screenshots/ceph-cluster2.png new file mode 100644 index 000000000..18a64d2dd Binary files /dev/null and b/monitoring/grafana/screenshots/ceph-cluster2.png differ diff --git a/monitoring/grafana/screenshots/host-details.png b/monitoring/grafana/screenshots/host-details.png new file mode 100644 index 000000000..bf963a9c7 Binary files /dev/null and b/monitoring/grafana/screenshots/host-details.png differ diff --git a/monitoring/grafana/screenshots/host-details.resized.png b/monitoring/grafana/screenshots/host-details.resized.png new file mode 100644 index 000000000..f18ea23a5 Binary files /dev/null and b/monitoring/grafana/screenshots/host-details.resized.png differ diff --git a/monitoring/grafana/screenshots/host_overview.png b/monitoring/grafana/screenshots/host_overview.png new file mode 100644 index 000000000..e47afa471 Binary files /dev/null and b/monitoring/grafana/screenshots/host_overview.png differ diff --git a/monitoring/grafana/screenshots/mds-performance.png b/monitoring/grafana/screenshots/mds-performance.png new file mode 100644 index 000000000..317cd8b19 Binary files /dev/null and b/monitoring/grafana/screenshots/mds-performance.png differ diff --git a/monitoring/grafana/screenshots/osd-performance.png b/monitoring/grafana/screenshots/osd-performance.png new file mode 100644 index 000000000..9bb7af44e Binary files /dev/null and b/monitoring/grafana/screenshots/osd-performance.png differ diff --git a/monitoring/grafana/screenshots/osd_overview.png b/monitoring/grafana/screenshots/osd_overview.png new file mode 100644 index 000000000..9e0c1fe68 Binary files /dev/null and b/monitoring/grafana/screenshots/osd_overview.png differ diff --git a/monitoring/grafana/screenshots/pool-details.png b/monitoring/grafana/screenshots/pool-details.png new file mode 100644 index 000000000..1f300cdab Binary files /dev/null and b/monitoring/grafana/screenshots/pool-details.png differ diff --git a/monitoring/grafana/screenshots/pool-overview.png b/monitoring/grafana/screenshots/pool-overview.png new file mode 100644 index 000000000..ffdd28ea6 Binary files /dev/null and b/monitoring/grafana/screenshots/pool-overview.png differ diff --git a/monitoring/grafana/screenshots/rgw-detail.png b/monitoring/grafana/screenshots/rgw-detail.png new file mode 100644 index 000000000..64356ad31 Binary files /dev/null and b/monitoring/grafana/screenshots/rgw-detail.png differ diff --git a/monitoring/grafana/screenshots/rgw-overview.png b/monitoring/grafana/screenshots/rgw-overview.png new file mode 100644 index 000000000..d6efaf797 Binary files /dev/null and b/monitoring/grafana/screenshots/rgw-overview.png differ -- cgit v1.2.3