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

Looks like the grafana role does not enable the PCP plugins #27

Open
portante opened this issue Jan 28, 2022 · 4 comments
Open

Looks like the grafana role does not enable the PCP plugins #27

portante opened this issue Jan 28, 2022 · 4 comments

Comments

@portante
Copy link
Contributor

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
@andreasgerstmayr
Copy link
Member

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.

@portante
Copy link
Contributor Author

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.

@andreasgerstmayr
Copy link
Member

We used the grafana and redis roles 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.

👍

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.

@portante
Copy link
Contributor Author

portante commented Feb 1, 2022

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?

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-server file.

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants