Git Product home page Git Product logo

grafana-operator-1's Introduction

Grafana Charm

Description

This is the Grafana charm for Kubernetes using the Operator Framework.

Usage

Initial setup (ensure microk8s is a clean slate with microk8s.reset or a fresh install with snap install microk8s --classic:

microk8s.enable dns storage registry dashboard
juju bootstrap microk8s mk8s
juju add-model lma
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath

Deploy Grafana on its own:

git clone [email protected]:canonical/grafana-operator.git
cd grafana-operator
charmcraft build
juju deploy ./grafana.charm --resource grafana-image=grafana/grafana:7.2.1

View the dashboard in a browser:

  1. juju status to check the IP of the of the running Grafana application
  2. Navigate to http://IP_ADDRESS:3000
  3. Log in with the default credentials username=admin, password=admin.

Add Prometheus as a datasource:

git clone [email protected]:canonical/prometheus-operator.git
cd prometheus-operator
charmcraft build
juju deploy ./prometheus.charm
juju add-relation grafana prometheus
watch -c juju status --color  # wait for things to settle down

Once the deployed charm and relation settles, you should be able to see Prometheus data propagating to the Grafana dashboard.

High Availability Grafana

This charm is written to support a high-availability Grafana cluster, but a database relation is required (MySQL or Postgresql).

If HA is not required, there is no need to add a database relation.

NOTE: HA should not be considered for production use.

...

Developing

Create and activate a virtualenv, and install the development requirements,

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt

Testing

Just run run_tests:

./run_tests

grafana-operator-1's People

Contributors

dstathis avatar justinmclark avatar mthaddon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.