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

[DISCUSSION] Installation of Dependency Services

Open pyrodie18 opened this issue 2 years ago • 9 comments

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.

pyrodie18 avatar Aug 20 '22 18:08 pyrodie18

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.

dj-wasabi avatar Aug 20 '22 19:08 dj-wasabi

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?

pyrodie18 avatar Aug 21 '22 16:08 pyrodie18

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 :)

dj-wasabi avatar Aug 21 '22 17:08 dj-wasabi

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.

mu1f407 avatar Aug 21 '22 18:08 mu1f407

Perfect. Totally agree and was the way I was gonna go until I saw us install PHP and wanted to double check.

pyrodie18 avatar Aug 21 '22 19:08 pyrodie18

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

dj-wasabi avatar Aug 21 '22 20:08 dj-wasabi

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.

D3DeFi avatar Aug 23 '22 12:08 D3DeFi

Agree. Ok will update accordingly

pyrodie18 avatar Aug 23 '22 13:08 pyrodie18

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.

pyrodie18 avatar Aug 28 '22 15:08 pyrodie18