Merge ~xavpaice/charm-grafana:readme into charm-grafana:master

Proposed by Xav Paice
Status: Merged
Approved by: Xav Paice
Approved revision: 3ecce8c16a33f80ebe0d1298751974c962fd7f95
Merged at revision: 26fcde91289997e518537de9422763abb4a574bc
Proposed branch: ~xavpaice/charm-grafana:readme
Merge into: charm-grafana:master
Diff against target: 207 lines (+78/-41)
1 file modified
src/README.md (+78/-41)
Reviewer Review Type Date Requested Status
James Troup (community) Approve
Review via email: mp+388783@code.launchpad.net

Commit message

Update README.md for 20.08

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
James Troup (elmo) wrote :

LGTM

review: Approve
Revision history for this message
James Troup (elmo) wrote :

Typo

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 26fcde91289997e518537de9422763abb4a574bc

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/README.md b/src/README.md
index c9a1323..cb0ffb1 100644
--- a/src/README.md
+++ b/src/README.md
@@ -2,10 +2,12 @@
22
3This charm provides the latest stable version of Grafana.3This charm provides the latest stable version of Grafana.
44
5# Usage5## Usage
66
7 juju deploy grafana7```
8 juju add-relation prometheus:grafana-source grafana:grafana-source8juju deploy grafana
9juju add-relation prometheus:grafana-source grafana:grafana-source
10```
911
10Above will automatically configure prometheus as grafana datasource12Above will automatically configure prometheus as grafana datasource
1113
@@ -13,113 +15,148 @@ If admin password is not set using configuration option it is autogenerated.
1315
14To retrieve autogenerated password run:16To retrieve autogenerated password run:
1517
16 juju run-action --wait grafana/0 get-admin-password18```
19juju run-action --wait grafana/0 get-admin-password
20```
1721
18# Actions22To have dashboards delivered by charm relations, e.g. from Telegraf, add an
23extra relation as follows.
24
25```
26juju add-relation telegraf:dashboards grafana:dashboards
27```
28
29## Actions
1930
20This charm supports importing dashboards, simply run:31This charm supports importing dashboards, simply run:
2132
22 juju run-action --wait grafana/0 import-dashboard dashboard="$(base64 mydashboard.json)"33```
34juju run-action --wait grafana/0 import-dashboard dashboard="$(base64 mydashboard.json)"
35```
2336
24where mydashboard.json is a json file:37where mydashboard.json is a json file:
2538
26 { "dashboard": { exported-json-dashboard }, "overwrite": true }39```
40{ "dashboard": { exported-json-dashboard }, "overwrite": true }
41```
2742
28If you don't want to overwrite the dashboard, set overwrite to false.43If you don't want to overwrite the dashboard, set overwrite to false.
2944
30There is also an action to create an API key, run:45There is also an action to create an API key, run:
3146
32 juju run-action --wait grafana/0 create-api-key keyname=<name> keyrole=<role>47```
48juju run-action --wait grafana/0 create-api-key keyname=<name> keyrole=<role>
49```
3350
34where the keyrole is one of Viewer, Editor, Read Only Editor or Admin.51where the keyrole is one of Viewer, Editor, Read Only Editor or Admin.
3552
36## User Management Actions53### User Management Actions
3754
38Currently user management is only implemented to manipulate users in the default55Currently user management is only implemented to manipulate users in the default
39organisation.56organisation.
4057
41You can retrieve the admin password, via:58You can retrieve the admin password, via:
4259
43 juju run-action --wait grafana/0 get-admin-password60```
61juju run-action --wait grafana/0 get-admin-password
62```
4463
45You can create a user:64You can create a user:
4665
47 juju run-action -w grafana/0 create-user name="John Citizen" \66```
48 email="john@example.com" login="john" password="redacted" \67juju run-action -w grafana/0 create-user name="John Citizen" \
49 role="Viewer"68 email="john@example.com" login="john" password="redacted" \
69 role="Viewer"
70```
5071
51where the role is one of Viewer, Editor, Read Only Editor or Admin.72where the role is one of Viewer, Editor, Read Only Editor or Admin.
52This will create the user in the default organisation.73This will create the user in the default organisation.
5374
54To reset a user's password:75To reset a user's password:
5576
56 juju run-action --wait grafana/0 set-user-password \77```
57 login=john new-password=citizen278juju run-action --wait grafana/0 set-user-password \
79 login=john new-password=citizen2
80```
5881
59This again assumes the user is in the default organisation, if it82This again assumes the user is in the default organisation, if it
60isn't it won't find the user.83isn't it won't find the user.
6184
62If you need to change the user's role, run:85If you need to change the user's role, run:
6386
64 juju run-action --wait grafana/0 change-user-role login="john" \87```
88juju run-action --wait grafana/0 change-user-role login="john" \
65 new-role="Admin"89 new-role="Admin"
90```
6691
67To delete a user, you simply run:92To delete a user, you simply run:
6893
69 juju run-action --wait grafana/0 delete-user login=john94```
7095juju run-action --wait grafana/0 delete-user login=john
96```
7197
72## Upgrade action98### Upgrade action
7399
74To perform an upgrade after changing `snap_channel` an upgrade action must be run:100To perform an upgrade after changing `snap_channel` an upgrade action must be run:
75101
76 juju run-action --wait grafana/0 do-upgrade102```
103juju run-action --wait grafana/0 do-upgrade
104```
77105
78106## Auth proxy
79# Auth proxy
80107
81If deployed behind a reverse proxy, you can configure Grafana to let108If deployed behind a reverse proxy, you can configure Grafana to let
82it handle authentication by enabled auth-proxy.109it handle authentication by enabled auth-proxy.
83110
84 juju config grafana auth-proxy=true111```
112juju config grafana auth-proxy=true
113```
85114
86Check grafana [documentation](https://grafana.com/docs/auth/auth-proxy/#auth-proxy-authentication)115Check grafana [documentation](https://grafana.com/docs/auth/auth-proxy/#auth-proxy-authentication)
87on how to configure apache as the reverse proxy.116on how to configure apache as the reverse proxy.
88117
89Users will be created/signup automatically with "Viewer" permissions.118Users will be created/signup automatically with "Viewer" permissions.
90To change the default permissions of a user, use the change-user-role119To change the default permissions of a user, use the change-user-role
91action passing the openID identifier or the email if the user updated it 120action passing the openID identifier or the email if the user updated it
92as the "login":121as the "login":
93122
94 juju run-action --wait grafana/0 change-user-role \123```
95 login="user@company.com" new-role="Admin"124juju run-action --wait grafana/0 change-user-role \
125 login="user@company.com" new-role="Admin"
126```
96127
97If not all URL paths are behind the reverse proxy auth,128If not all URL paths are behind the reverse proxy auth,
98and `anonymous=true` is set, those paths will be accessible (view only) to129and `anonymous=true` is set, those paths will be accessible (view only) to
99non-authenticated users.130non-authenticated users.
100131
132## Development
101133
102# Development134After modifying code, you must assemble the charm:
103135
104Explicitly set `JUJU_REPOSITORY`:136```
137charm build
138```
105139
106 export JUJU_REPOSITORY=/path/to/charms140## Contact Information
107 mkdir -p $JUJU_REPOSITORY/layers
108141
109Branch code to142Author: Alvaro Uria <alvaro.uria@canonical.com>, Jacek Nykis <jacek.nykis@canonical.com>
110143
111 $JUJU_REPOSITORY/layers/layer-grafana/144Report bugs at: https://bugs.launchpad.net/charm-grafana
112145
113Modify146Location:
114147
115Assemble the charm:148* Composed grafana charm: cs:grafana
149* Charm code: https://code.launchpad.net/charm-grafana
116150
117 charm build151## Release information
118152
119# Contact Information153Release 20.08:
120154
121Author: Alvaro Uria <alvaro.uria@canonical.com>, Jacek Nykis <jacek.nykis@canonical.com>155* Note that in cs:grafana-36, the Grafana charm shipped a default dashboard for
122Report bugs at: https://bugs.launchpad.net/grafana-charm156 Telegraf. This is removed as of release 20.08, relying instead on the dashboard
123Location:157 delivered by the grafana:dashboard relation endpoint.
124 Composed grafana charm: cs:~prometheus-charmers/grafana158* Dashboard titles are now tagged with "[juju-{provider}]"
125 Grafana layer: https://code.launchpad.net/grafana-charm159* Folks upgrading to the current release will potentially need to add the
160 relation for dashboard import:
161
162 juju add-relation grafana:dashboards $application:dashboards

Subscribers

People subscribed via source and target branches

to all changes: