ansible-pcp
ansible-pcp copied to clipboard
Looks like the grafana role does not enable the PCP plugins
I have to add the following to /etc/sysconfig/grafana-server:
# Mod for PCP
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=performancecopilot-pcp-app,pcp-redis-datasource,pcp-vector-datasource,pcp-bpftrace-datasource,pcp-flamegraph-panel,pcp-breadcrumbs-panel,pcp-troubleshooting-panel
Additional info: This is only required for Grafana packages from sources other than the Fedora and RHEL package mirrors. For the Fedora and RHEL Grafana packages, this setting is set in the default Grafana configuration file in /etc/grafana/grafana.ini
This env var will override the corresponding setting in the grafana.ini config file. Afaics there are no downsides when ansible-pcp configures this setting it /etc/sysconfig/grafana-server, and on the plus side it will work with the unmodified upstream Grafana packages from grafana.com, so I'm +1 on this change.
We used the grafana and redis roles from ansible-pcp, how do we get them to use the RHEL package mirrors?
The playbook should have a check to ensure that line is present. Not sure having those images carry that line is appropriate.
We used the
grafanaandredisroles from ansible-pcp, how do we get them to use the RHEL package mirrors?
The playbook runs
- name: Install Grafana packages
package:
name: "{{ __grafana_packages + __grafana_packages_extra }}"
state: present
so it's using the distribution package manager and whatever is configured in /etc/yum.repos.d or /etc/apt/sources.list.d
So it'll work fine on regular Fedora, CentOS Stream or RHEL installations, but it won't work if you add for example the upstream grafana.com repository from https://grafana.com/docs/grafana/latest/installation/rpm/
The playbook should have a check to ensure that line is present.
:+1:
Not sure having those images carry that line is appropriate.
I agree, it's not the cleanest solution. It's a convenience feature to allow people running dnf install grafana-pcp and having everything set up. grafana-pcp modifying the grafana.ini or /etc/sysconfig/grafana-server is not a good idea imho, do you have other suggestions for the use case of not using ansible-pcp? When using ansible-pcp for managing the Grafana installation we can add a new task to update the /etc/sysconfig/grafana-server file.
Not sure having those images carry that line is appropriate.
I agree, it's not the cleanest solution. It's a convenience feature to allow people running
dnf install grafana-pcpand having everything set up.grafana-pcpmodifying thegrafana.inior/etc/sysconfig/grafana-serveris not a good idea imho, do you have other suggestions for the use case of not using ansible-pcp?
I am not sure what to do here, as this is a product policy decision. The RHEL-based product could certainly ship an RPM what does that, and then have it work with a RHEL-based product ansible playbook.
The upstream project playbook should work with the community project provided RPMs.
Seems like the project vs the product distinction could influence (one way or another) how this works going forward.
When using ansible-pcp for managing the Grafana installation we can add a new task to update the
/etc/sysconfig/grafana-serverfile.
Great.