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
1diff --git a/src/README.md b/src/README.md
2index c9a1323..cb0ffb1 100644
3--- a/src/README.md
4+++ b/src/README.md
5@@ -2,10 +2,12 @@
6
7 This charm provides the latest stable version of Grafana.
8
9-# Usage
10+## Usage
11
12- juju deploy grafana
13- juju add-relation prometheus:grafana-source grafana:grafana-source
14+```
15+juju deploy grafana
16+juju add-relation prometheus:grafana-source grafana:grafana-source
17+```
18
19 Above will automatically configure prometheus as grafana datasource
20
21@@ -13,113 +15,148 @@ If admin password is not set using configuration option it is autogenerated.
22
23 To retrieve autogenerated password run:
24
25- juju run-action --wait grafana/0 get-admin-password
26+```
27+juju run-action --wait grafana/0 get-admin-password
28+```
29
30-# Actions
31+To have dashboards delivered by charm relations, e.g. from Telegraf, add an
32+extra relation as follows.
33+
34+```
35+juju add-relation telegraf:dashboards grafana:dashboards
36+```
37+
38+## Actions
39
40 This charm supports importing dashboards, simply run:
41
42- juju run-action --wait grafana/0 import-dashboard dashboard="$(base64 mydashboard.json)"
43+```
44+juju run-action --wait grafana/0 import-dashboard dashboard="$(base64 mydashboard.json)"
45+```
46
47 where mydashboard.json is a json file:
48
49- { "dashboard": { exported-json-dashboard }, "overwrite": true }
50+```
51+{ "dashboard": { exported-json-dashboard }, "overwrite": true }
52+```
53
54 If you don't want to overwrite the dashboard, set overwrite to false.
55
56 There is also an action to create an API key, run:
57
58- juju run-action --wait grafana/0 create-api-key keyname=<name> keyrole=<role>
59+```
60+juju run-action --wait grafana/0 create-api-key keyname=<name> keyrole=<role>
61+```
62
63 where the keyrole is one of Viewer, Editor, Read Only Editor or Admin.
64
65-## User Management Actions
66+### User Management Actions
67
68 Currently user management is only implemented to manipulate users in the default
69 organisation.
70
71 You can retrieve the admin password, via:
72
73- juju run-action --wait grafana/0 get-admin-password
74+```
75+juju run-action --wait grafana/0 get-admin-password
76+```
77
78 You can create a user:
79
80- juju run-action -w grafana/0 create-user name="John Citizen" \
81- email="john@example.com" login="john" password="redacted" \
82- role="Viewer"
83+```
84+juju run-action -w grafana/0 create-user name="John Citizen" \
85+ email="john@example.com" login="john" password="redacted" \
86+ role="Viewer"
87+```
88
89 where the role is one of Viewer, Editor, Read Only Editor or Admin.
90 This will create the user in the default organisation.
91
92 To reset a user's password:
93
94- juju run-action --wait grafana/0 set-user-password \
95- login=john new-password=citizen2
96+```
97+juju run-action --wait grafana/0 set-user-password \
98+ login=john new-password=citizen2
99+```
100
101 This again assumes the user is in the default organisation, if it
102 isn't it won't find the user.
103
104 If you need to change the user's role, run:
105
106- juju run-action --wait grafana/0 change-user-role login="john" \
107+```
108+juju run-action --wait grafana/0 change-user-role login="john" \
109 new-role="Admin"
110+```
111
112 To delete a user, you simply run:
113
114- juju run-action --wait grafana/0 delete-user login=john
115-
116+```
117+juju run-action --wait grafana/0 delete-user login=john
118+```
119
120-## Upgrade action
121+### Upgrade action
122
123 To perform an upgrade after changing `snap_channel` an upgrade action must be run:
124
125- juju run-action --wait grafana/0 do-upgrade
126+```
127+juju run-action --wait grafana/0 do-upgrade
128+```
129
130-
131-# Auth proxy
132+## Auth proxy
133
134 If deployed behind a reverse proxy, you can configure Grafana to let
135 it handle authentication by enabled auth-proxy.
136
137- juju config grafana auth-proxy=true
138+```
139+juju config grafana auth-proxy=true
140+```
141
142 Check grafana [documentation](https://grafana.com/docs/auth/auth-proxy/#auth-proxy-authentication)
143 on how to configure apache as the reverse proxy.
144
145 Users will be created/signup automatically with "Viewer" permissions.
146 To change the default permissions of a user, use the change-user-role
147-action passing the openID identifier or the email if the user updated it
148+action passing the openID identifier or the email if the user updated it
149 as the "login":
150
151- juju run-action --wait grafana/0 change-user-role \
152- login="user@company.com" new-role="Admin"
153+```
154+juju run-action --wait grafana/0 change-user-role \
155+ login="user@company.com" new-role="Admin"
156+```
157
158 If not all URL paths are behind the reverse proxy auth,
159 and `anonymous=true` is set, those paths will be accessible (view only) to
160 non-authenticated users.
161
162+## Development
163
164-# Development
165+After modifying code, you must assemble the charm:
166
167-Explicitly set `JUJU_REPOSITORY`:
168+```
169+charm build
170+```
171
172- export JUJU_REPOSITORY=/path/to/charms
173- mkdir -p $JUJU_REPOSITORY/layers
174+## Contact Information
175
176-Branch code to
177+Author: Alvaro Uria <alvaro.uria@canonical.com>, Jacek Nykis <jacek.nykis@canonical.com>
178
179- $JUJU_REPOSITORY/layers/layer-grafana/
180+Report bugs at: https://bugs.launchpad.net/charm-grafana
181
182-Modify
183+Location:
184
185-Assemble the charm:
186+* Composed grafana charm: cs:grafana
187+* Charm code: https://code.launchpad.net/charm-grafana
188
189- charm build
190+## Release information
191
192-# Contact Information
193+Release 20.08:
194
195-Author: Alvaro Uria <alvaro.uria@canonical.com>, Jacek Nykis <jacek.nykis@canonical.com>
196-Report bugs at: https://bugs.launchpad.net/grafana-charm
197-Location:
198- Composed grafana charm: cs:~prometheus-charmers/grafana
199- Grafana layer: https://code.launchpad.net/grafana-charm
200+* Note that in cs:grafana-36, the Grafana charm shipped a default dashboard for
201+ Telegraf. This is removed as of release 20.08, relying instead on the dashboard
202+ delivered by the grafana:dashboard relation endpoint.
203+* Dashboard titles are now tagged with "[juju-{provider}]"
204+* Folks upgrading to the current release will potentially need to add the
205+ relation for dashboard import:
206+
207+ juju add-relation grafana:dashboards $application:dashboards

Subscribers

People subscribed via source and target branches

to all changes: