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

Topic/refactor grafana agent #154

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ohdearaugustin
Copy link
Contributor

Complete rewrite of grafana_agent role.
Fix #148

Copy link
Collaborator

@gardar gardar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Can you please also add molecule scenarios? (You can take inspiration from the grafana server role)

Also would be nice if you could follow the PEP8 style guide for the variable names, that is to prefix internal variables with underscores.
It helps when reading the code to know if it's a internal variable or a variable that can be overwritten.
It's common that variables in /vars are prefixed with a single underscore _ and then variables that are set at the play level (via register:, etc.) are prefixed with two underscores __

@ohdearaugustin
Copy link
Contributor Author

I have already molecule scenarios, but didn't pushed them because the setup is with systemd in docker and kind of unstable. aka can crash your host system^^

@gardar
Copy link
Collaborator

gardar commented Feb 20, 2024

Using docker/podman images with systemd in molecule is quite common actually so that shouldn't be an issue.
But actually you don't even need to define your own platform as they are already defined for the collection here: https://github.com/grafana/grafana-ansible-collection/blob/main/.config/molecule/config.yml

@ohdearaugustin
Copy link
Contributor Author

@gardar yeah I realized that after I implemented my own. I will try to use the one already in place.

@ohdearaugustin
Copy link
Contributor Author

ohdearaugustin commented Feb 27, 2024

@gardar I just tried the already includes molecule. Somehow it always get's stuck at the Gathering Facts for over 10 mins. Did you also ever had those problems? Or maybe any idea what that could be.

Edit: Maybe a bit more context is useful I use docker on Arch and molecule with sudo.

@gardar
Copy link
Collaborator

gardar commented Feb 27, 2024

There are different reasons I've seen that happen, do you have the molecule docker driver installed? and are the containers running?

@gardar
Copy link
Collaborator

gardar commented Apr 10, 2024

@ohdearaugustin can you please rebase?

@ohdearaugustin
Copy link
Contributor Author

Should be rebased now. Didn't yet implement the manual install, just didn't had time unfortunately.

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

Successfully merging this pull request may close these issues.

Grafana Agent - Repo Install
2 participants