Charmed Ceph and COS-lite Howto
Overview
Integrating COS-Lite with Charmed Ceph enhances monitoring and alerting capabilities. This integration leverages two features:
- Metrics Scraping: COS-Lite can scrape metrics from Charmed Ceph, allowing for monitoring of Ceph’s performance and health.
- Alert Rules Transmission: Charmed Ceph can transmit alert rules to COS-Lite. This ensures that COS-Lite can alert administrators about potential issues within the Ceph cluster.
The integration is performed via the metrics-endpoint
relation. This relation is established between Prometheus in COS-Lite, and the ceph-mon
charm in Charmed Ceph. Through this relation, COS-Lite can receive both metrics and alert rules from Ceph.
Architecture
-
Charmed Ceph: Consists of machine charms deployed within the Ceph Model, operating on physical or virtual machines to manage the Ceph storage cluster
-
COS-lite: Utilizes Kubernetes (k8s) operators for deployment and management
-
Deployment Environment for COS-lite: For the purpose of this integration, COS-lite is assumed to be deployed within a MicroK8s model
-
Cross-Model Relationship: Integration requires establishing a cross-model relationship between the Ceph model and the COS-lite model
Deployment
Prerequisites
For the purposes of this howto, a Juju controller, MicroK8s installation and Charmed Ceph installation are assumed.
For details on installing Charmed Ceph see the Charmed Ceph documentation
Deploying COS-lite
Detailed instructions for deploying COS-lite can be found here. In short, the COS-lite bundle should be installed into a MicroK8s model, and the requisite cross-model offers must be configured.
For convenience, it’s suggested to utilize the included offers overlay for COS-lite:
$ juju add-model cos-model k8s-cloud # Add a model for COS-lite into microk8s
# Download the offers overlay
$ curl -L https://raw.githubusercontent.com/canonical/cos-lite-bundle/main/overlays/offers-overlay.yaml -O
# Deploy the cos-lite bundle from charmhub, and utilize the offers overlay
$ juju deploy cos-lite --trust --overlay ./offers-overlay.yaml
Relating COS-lite and Ceph
To perform the cross-model relation between COS-lite and Ceph, consume the prometheus-scrape offer from your Ceph model, and relate to ceph-mon
$ juju switch ceph-model # Switch to your ceph machine model
# Consume the offer from the cos-model. Adjust user and model names
# as necessary
$ juju consume admin/cos-model.prometheus-scrape cos-prometheus
# Relate to ceph-mon
$ juju relate ceph-mon:metrics-endpoint cos-prometheus:metrics-endpoint
This relation should inform Prometheus (in the COS-lite model) to scrape the metrics-endpoint on the ceph-mon application. Also, ceph-mon will transmit alerting rules to Prometheus over this relation.
Metrics and Alert Rules
Documentation about available metrics and default alert rules for Ceph can be found on discourse
Alert rules are implemented as a resource for the ceph-mon charm. This resource can be configured; to upload a new set of rules do:
juju attach ceph-mon alert-rules=./my-prom-alerts.yaml.rules
See the ceph-mon charmhub page for details on the ceph-mon charm, including a download link for the default alert rules.