community.zabbix icon indicating copy to clipboard operation
community.zabbix copied to clipboard

Refactor zabbix proxy

Open eb4x opened this issue 3 months ago • 9 comments

SUMMARY

Continuing the refactor, this time for zabbix-proxy

This PR consists of a lot of iterative commits, they should all be (somewhat) self-explanatory, doing a "single self-contained" change and a rationale for it. If one of the changes are not to anyones liking, comment on it and we can either improve upon it or take it out.

This is a considerably big refactor of the zabbix_proxy role. I'm not expecting it to break for existing installations and whatever overrides have been provided. It's not intended to "fix" any issues, just clean up the tasks and make the experience somewhat more consistent.

Big changes include moving package installation out of the os_family tasks, which are otherwise responsible for setting up the repo. So the installation happens in main.yml, and the dependencies for db-variants are installed in the mysql/postgresql/sqlite3 task files.

Arguably the repo-setup should be it's own role, as it's repeated out for every single role.

ISSUE TYPE
  • Refactor Pull Request
COMPONENT NAME

zabbix_proxy

ADDITIONAL INFORMATION

I'd like for this refactor to retain all its commits and messages, and not become a squash merge. One thing I sorely missed during this refactor was the ability to find a log as to why things were done in a certain way.

eb4x avatar Mar 25 '24 13:03 eb4x

I think this is pretty complete. Not quite sure about the when: zabbix_proxy_database_creation | bool constructions. You kinda want them there if you're passing variables from the command line. I've brought some changes spotted here over to PR #1193 for zabbix-server.

I'll get to zabbix-web next.

eb4x avatar Mar 25 '24 14:03 eb4x

Hmm, the CentOS one we can probably fix by forcing python3?

I'll have to do some digging when it comes to the ubuntu fails.

eb4x avatar Mar 26 '24 10:03 eb4x

Apologies for the hold up, been busy trying to get my own actions-runner working so I can get these results myself, as currently I'm currently just testing against a few select platforms and using images generated from Dockerfiles, so we can atleast have python3 in centos7. (A platform we might just drop sometime after summer?)

I'm currently experimenting with running a kind kubernetes cluster, and the actions-runner-controller, and had some marginal success getting it to run atleast :sweat_smile:

I'll get back to this once I have gotten repeatable tests.

eb4x avatar Apr 13 '24 07:04 eb4x