community.zabbix
community.zabbix copied to clipboard
[DISCUSSION] Installation of Dependency Services
I am going through and cleaning up the Web role and realized that we have login in there to actually install NGINX, but not apache. In the readme examples though it shows the user having to install both PHP and apache prior to running the roles. So what is our answer? Do we want to install NGINX/Apahce/PHP, or simply configure it and leave the installation to the user? I'm ok either way but think we should be consistent.
Yes, the PHP part was there before there was such a thing as FPM. When FPM came, it was a bit troublesome to find something that could work on any deployment, because i did not wanted to force users to use specific roles from specific people. Like, geerlingguy has a lot of roles, but I didn't wanted to force people to use his role.. neither for the WEB, but also not for the databases. People should always use their preferred roles for something.
But we are some years further and probably there are some better roles out there now that can perfectly handle fpm/php.
Yes, the PHP part was there before there was such a thing as FPM. When FPM came, it was a bit troublesome to find something that could work on any deployment, because i did not wanted to force users to use specific roles from specific people. Like, geerlingguy has a lot of roles, but I didn't wanted to force people to use his role.. neither for the WEB, but also not for the databases. People should always use their preferred roles for something.
But we are some years further and probably there are some better roles out there now that can perfectly handle fpm/php.
So do we want to go ahead and install the web server of choice and PHP or leave that as a dependency for the role and remove the PHP install and just configure it?
Ideally I would say, installation of Apache/PHP/Nginx is all done with other roles (as it is their main focus) and the zabbix_web
role should only do the things specificaly to make Zabbix work, like placing vhost config file(s) on correct place. I think it is to much work to do all kinds of Apache/Nginx and PHP setups and keep that maintained as part of the zabbix_web
, while those are basically "dependencies" and not part of Zabbix itself.
Do understand, these are just my 2 cents. It all up 2 you all now :)
Ideally I would say, installation of Apache/PHP/Nginx is all done with other roles (as it is their main focus) and the
zabbix_web
role should only do the things specificaly to make Zabbix work, like placing vhost config file(s) on correct place.
Absolutely agree on this. It would keep zabbix_web role slim and simple. We could only have playbook examples in the docs with the roles recommended for complete Apache/PHP/Nginx setup.
Perfect. Totally agree and was the way I was gonna go until I saw us install PHP and wanted to double check.
Ideally I would say, installation of Apache/PHP/Nginx is all done with other roles (as it is their main focus) and the
zabbix_web
role should only do the things specificaly to make Zabbix work, like placing vhost config file(s) on correct place.Absolutely agree on this. It would keep zabbix_web role slim and simple. We could only have playbook examples in the docs with the roles recommended for complete Apache/PHP/Nginx setup.
yes indeed.. and we should have something as part of the CI jobs with molecule..
Also agree, roles should be simple purpose. CI is a different topic - we can test there with both apache and nginx, but we should not force them on the user.
i would say that a good role should have option to ship vhost configuration for apache, nginx or neither. Last being an option for someone that wants to use completely custom thing.
Agree. Ok will update accordingly
FYI, going to remove the stuff related to Let's Encrypt that was added as part of https://github.com/ansible-collections/community.zabbix/pull/304. But we'll update the example docs to show how to add it in there with geerlingguy as a suggested way.