canonical / cos-lite-bundle

https://charmhub.io/cos-lite
Apache License 2.0
10 stars 10 forks source link

COS Lite bundle

CharmHub Badge Discourse Status

The lite flavor of Canonical Observability Stack, also called COS Lite, is a light-weight, highly-integrated, Juju-based observability suite running on Kubernetes.

This Juju bundle deploys the stack, consisting of the following interrelated charms:

This bundle is under development. Join us on Discourse and MatterMost!

The Vision

The Canonical Observability Stack is the go-to solution for monitoring Canonical appliances when the end user does not already have an established observability stack. COS Lite, being a flavor of the Canonical Observability Stack, is designed for:

With COS Lite now being generally available, we are now working on a highly-available, highly-scalable flavor. It will use many of the same components as COS Lite, plus some additional new ones, and provide the same overall user-experience, and focus on scalability, resilience and broad compatibility with Kubernetes distributions out there.

Usage

For traefik ingress to work, you may first need to enable the metallb microk8s addon. See the tutorial for full details.

The --trust option is needed by the charms in the cos-lite bundle to be able to patch their K8s services to:

Before deploying the bundle you will most likely want to create a dedicated model for it:

$ juju add-model cos
$ juju switch cos

Deploy from charmhub

You can deploy the bundle from charmhub with:

$ juju deploy cos-lite --trust

Deploy using this repo

To deploy the bundle from a local file:

# render bundle with "edge" charms
$ tox -e render-edge

$ juju deploy ./bundle.yaml --trust

Deploy for testing

tox -e render-edge
juju deploy ./bundle.yaml --trust \
  --overlay overlays/tls-overlay.yaml \
  --overlay overlays/testing-overlay.yaml

Deploy for testing with local charms

# generate and activate a virtual environment with dependencies
$ tox -e integration --notest
$ source .tox/integration/bin/activate

# render bundle, overriding charm paths
$ ./render_bundle.py bundle.yaml --channel=edge \
  --traefik=$(pwd)/../path/to/traefik.charm \
  --prometheus=$(pwd)/../path/to/prometheus.charm \
  --alertmanager=$(pwd)/../path/to/alertmanager.charm \
  --grafana=$(pwd)/../path/to/grafana.charm \
  --loki=$(pwd)/../path/to/loki.charm

# deploy rendered bundle
$ juju deploy ./bundle.yaml --trust

Overlays

We also make available some overlays for convenience:

In order to use the overlays above, you need to:

  1. Download the overlays (or clone the repository)
  2. Pass the --overlay <path-to-overlay-file-1> --overlay <path-to-overlay-file-2> ... arguments to the juju deploy command

For example, to deploy the COS Lite bundle with the offers overlay, you would do the following:

$ curl -L https://raw.githubusercontent.com/canonical/cos-lite-bundle/main/overlays/offers-overlay.yaml -O
$ juju deploy cos-lite --trust --overlay ./offers-overlay.yaml

To use COS Lite with machine charms, see cos-proxy (source).

Publishing

$ tox -e render-edge  # creates bundle.yaml
$ charmcraft pack
$ charmcraft upload cos-lite.zip
$ charmcraft release cos-lite --channel=edge --revision=4