Add grafana playbook and machine #69

Merged
erdnaxe merged 5 commits from grafana into master 3 years ago
Collaborator
There is no content yet.
jeltz reviewed 3 years ago
@ -0,0 +11,4 @@
apt_key:
url: https://packages.grafana.com/gpg.key
state: present
validate_certs: false
jeltz commented 3 years ago
Owner

Perhaps it would be better to download once and for all the GPG key and store it in the repo?

At least, it seems important to set validate_certs: true.

Perhaps it would be better to download once and for all the GPG key and store it in the repo? At least, it seems important to set `validate_certs: true`.
erdnaxe marked this conversation as resolved
@ -0,0 +30,4 @@
retries: 3
until: apt_result is succeeded
- name: Configure Grafana
jeltz commented 3 years ago
Owner

I personally don't like this way of partially configuring applications via Ansible.

I strongly prefer a template to deploy the entire grafana.ini file.

I find it much more readable (and more consistent for configuration files in a format that doesn't have a module like ini_file).
Furthermore, it guarantees the totality of the application's behaviour, and avoids having inconsistent configurations.

Nevertheless, I welcome pro-ini_file arguments.

I personally don't like this way of partially configuring applications via Ansible. I strongly prefer a `template` to deploy the entire `grafana.ini` file. I find it much more readable (and more consistent for configuration files in a format that doesn't have a module like `ini_file`). Furthermore, it guarantees the totality of the application's behaviour, and avoids having inconsistent configurations. Nevertheless, I welcome pro-`ini_file` arguments.
Poster
Collaborator

Pro-ini_file arguments:

  • Grafana configuration files evolve fast, it garantees that we are not replacing it with an older version.
  • Even if the targetted format is not supported by an Ansible module, you can always revert to lineinfile module which is able to replace a line with constraints.
  • Keeping small changes to the original file garantee better readability during APT upgrades.

Personnaly I hate ini_file and template. I would much rather prefer to not touch the sane defaults and just place an extra file with the configuration that is specific to Aurore. Because Grafana was not packaged by a Debian maintainer, it does not have the usual patch to add a conf.d directory to drop extra configuration.

Taking that into account, I would go for these choice (we need to discuss that):

  • For well-packaged software, let's just place files in conf.d or site-enabled folders without touching any other files if possible.
  • For packages that have their configuration moving fast (e.g. Gitlab, Grafana), let's use lineinfile or a specialized equivalent.
  • For stable packages that does not have .d folders, let's commit the original configuration as a template.
Pro-ini_file arguments: * Grafana configuration files evolve fast, it garantees that we are not replacing it with an older version. * Even if the targetted format is not supported by an Ansible module, you can always revert to `lineinfile` module which is able to replace a line with constraints. * Keeping small changes to the original file garantee better readability during APT upgrades. Personnaly I hate `ini_file` and `template`. I would much rather prefer to not touch the sane defaults and just place an extra file with the configuration that is specific to Aurore. Because Grafana was not packaged by a Debian maintainer, it does not have the usual patch to add a `conf.d` directory to drop extra configuration. Taking that into account, I would go for these choice (we need to discuss that): * For well-packaged software, let's just place files in `conf.d` or `site-enabled` folders without touching any other files if possible. * For packages that have their configuration moving fast (e.g. Gitlab, Grafana), let's use `lineinfile` or a specialized equivalent. * For stable packages that does not have `.d` folders, let's commit the original configuration as a template.
@ -0,0 +94,4 @@
value: "{{ grafana.database.user }}"
- section: database
option: password
value: "{{ grafana.database.password }}"
jeltz commented 3 years ago
Owner

Where are Grafana logs sent?

It seems to be /var/log/grafana.log, when it should be either syslog or journald.

Where are Grafana logs sent? It seems to be `/var/log/grafana.log`, when it should be either syslog or journald.
Poster
Collaborator

It's also in journal, see sudo journalctl -xe -u grafana-server. Should I ask grafana to NOT log into /var/log/grafana/grafana.log?

It's also in journal, see `sudo journalctl -xe -u grafana-server`. Should I ask grafana to NOT log into `/var/log/grafana/grafana.log`?
erdnaxe marked this conversation as resolved
erdnaxe force-pushed grafana from 90a6e6acf0 to fdfed1a05a 3 years ago
erdnaxe added 1 commit 3 years ago
erdnaxe merged commit 00d63cf082 into master 3 years ago
The pull request has been merged as 00d63cf082.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: aurore/ansible#69
Loading…
There is no content yet.