Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Grafana & Influxdb versions #379

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ansible/roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
# limitations under the License.
#

grafana_rpm: grafana-2.5.0-1.x86_64.rpm
grafana_checksum: "sha256:ada02f1d4cdaa6397ef1c2e013200d0e8f30675205092a817e81d47ea17f47ad"
grafana_rpm: grafana-7.2.1-1.x86_64.rpm
grafana_checksum: "sha512:1b6fec0464ac2cd2b9e1ea600ec24f6bfa81d8ce309eb90741a6563cc6bbb6ff4f083412928e3ca5516f23ee9920a8afeea90bcbcd0fc214611ae8429d524329"
10 changes: 5 additions & 5 deletions ansible/roles/grafana/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
method: POST
body: "{{ item }}"
body_format: json
status_code: 200,500
status_code: 200,500,409
ctubbsii marked this conversation as resolved.
Show resolved Hide resolved
register: uresult
retries: 3
until: "uresult.status == 500 or uresult.status == 200"
until: "uresult.status == 500 or uresult.status == 200 or uresult.status == 409"
with_items:
- '{"name":"cluster_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"direct", "isDefault":true, "database":"cluster_metrics", "user":"fluo", "password":"secret"}'
- '{"name":"fluo_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"direct", "isDefault":true, "database":"fluo_metrics", "user":"fluo", "password":"secret"}'
- '{"name":"accumulo_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"direct", "isDefault":true, "database":"accumulo_metrics", "user":"accumulo", "password":"secret"}'
- '{"name":"cluster_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"server", "isDefault":true, "database":"cluster_metrics", "user":"fluo", "password":"secret"}'
- '{"name":"fluo_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"server", "isDefault":true, "database":"fluo_metrics", "user":"fluo", "password":"secret"}'
- '{"name":"accumulo_metrics", "type":"influxdb", "url":"http://{{ groups["metrics"][0] }}:8086", "access":"server", "isDefault":true, "database":"accumulo_metrics", "user":"accumulo", "password":"secret"}'
6 changes: 4 additions & 2 deletions ansible/roles/grafana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@
- name: "download grafana rpm"
get_url:
args:
url: https://grafanarel.s3.amazonaws.com/builds/{{ grafana_rpm }}
url: https://dl.grafana.com/oss/release/{{ grafana_rpm }}
dest: /tmp/{{ grafana_rpm }}
checksum: "{{ grafana_checksum }}"
force: no
- name: "Import GPG key for CentOS 8.0 and later"
become: true
rpm_key:
key: https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana-old
key: https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
state: present
when: ansible_facts['distribution_version'] is version('8.0', '>=')
- name: "ensure grafana is installed"
yum: name=/tmp/{{ grafana_rpm }} state=present
- name: "configure grafana"
template: src=grafana.ini dest=/etc/grafana/grafana.ini
- name: "config file to load dashboards into Grafana"
template: src=dashboards.yaml dest=/etc/grafana/provisioning/dashboards
- name: "ensure dashboards directory exists"
file: path=/etc/grafana/dashboards state=directory owner=grafana group=grafana
- name: "add cluster dashboard configuration"
Expand Down
11 changes: 11 additions & 0 deletions ansible/roles/grafana/templates/dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# # config file version
apiVersion: 1

providers:
- name: 'Muchos Dashboard'
orgId: 1
folder: 'Muchos Dashboard'
folderUid: ''
type: file
options:
path: /etc/grafana/dashboards
Loading