Get charmed Grafana up and running
To deploy Grafana using this operator you would need a juju microk8s controller bootstrapped.
Deploy Grafana
juju deploy --trust grafana-k8s grafana # stable channel
--trust
is required because the charm needs to modify grafana’s K8s resources.
Wait until the status settles to active/idle
.
Verify deployment
Confirm the pebble service is running
juju exec --unit grafana/0 -- \
PEBBLE_SOCKET=/charm/containers/grafana/pebble.socket \
pebble plan
Obtain the admin password
juju run grafana/0 get-admin-password
# Or, programmatically,
juju run grafana/0 get-admin-password --format json \
| jq -r '."grafana/0".results."admin-password"'
Query grafana endpoints
juju ssh --container grafana grafana/0 \
curl localhost:3000
This should return Found
.
List all dashboards:
juju ssh --container grafana grafana/0 \
curl --user admin:$PASSWORD
https://localhost:3000/api/search