As per https://icinga.com/docs/icinga-director/latest/doc/75-Background-Daemon/ : "The Icinga Director Background Daemon is available (and mandatory) since v1.7.0. It is responsible for various background tasks, including fully automated Import, Sync & Config Deployment Tasks." Currently the Gentoo ebuild 1.8.0 does not support or install anything to start the Background Daemon, which results in a partially functional Director installation. Manually starting it with: # /usr/share/icingaweb2/bin/icingacli director daemon run Does start it successfully. Upstream ship a systemd config file in the directory /usr/share/icingaweb2/modules/director/contrib/systemd/icinga-director.service but there is no sysvinit file. We probably need a simple sysvinit file shipped with the package, as well as that and the systemd file installed into the correct location to start the daemon on boot.
Created attachment 760660 [details] icingaweb2-module-director-1.8.1.ebuild Here the ebuild from my local overlay for icingaweb2-module-director version 1.8.1 with - updated dependencies (especially php) - added dependencies for acct-group/icingaweb2 and acct-user/icingadirector - installation of the icinga-director.service systemd unit file
Created attachment 760661 [details] acct-user/icingadirector ebuild Here the icingadirector-0.ebuild from my local overlay which is needed by the icinga-director.service installed by icingaweb2-module-director-1.8.1.ebuild because the unit runs the /usr/share/icingaweb2/bin/icingacli director daemon run command as user icingadirector. In order to allow the icingadirector user to call /usr/share/icingaweb2/bin/icingacli one has to call chgrp icingaweb2 /usr/share/icingaweb2/bin/icingacli until the www-apps/icingaweb2 is patched to install the icingacli with group icingaweb2.
Created attachment 760662 [details] icingaweb2-module-incubator-0.11.0.ebuild Here the icingaweb2-module-incubator-0.11.0 ebuild from my local overlay. I added this after trying /usr/share/icingaweb2/bin/icingacli module enable director and getting Enabling module "director" although it has unmet dependencies Launching the run script /opt/icingaweb2/etc/enabledModules/director/run.php for module direct or failed with the following exception: Missing dependencies, please check On https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md the say The following Icinga modules must be installed and enabled: incubator (>=0.5.0) If you are using Icinga Web < 2.9.0, the following modules are also required ipl (>=0.3.0) reactbundle (>=0.7.0) After installing incubator I successfully anabled them /usr/share/icingaweb2/bin/icingacli module enable incubator /usr/share/icingaweb2/bin/icingacli module enable director /usr/share/icingaweb2/bin/icingacli module list MODULE VERSION STATE DESCRIPTION director 1.8.1 enabled Director - Config tool for Icinga 2 incubator 0.11.0 enabled Incubator provides bleeding-edge libraries monitoring 2.9.3 enabled Icinga monitoring module setup 2.9.3 enabled Setup module
thanks for the fixes (and general updates). I changed the uid of icingadirector to 231 as the one in the ebuild was already used by another package.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e4ffdbc2151d949e67915b32ec51613a40e453d commit 7e4ffdbc2151d949e67915b32ec51613a40e453d Author: Matthew Thode <prometheanfire@gentoo.org> AuthorDate: 2021-12-28 21:23:17 +0000 Commit: Matthew Thode <prometheanfire@gentoo.org> CommitDate: 2021-12-28 21:25:23 +0000 www-apps/icingaweb2-module-incubator: add 0.11.0 Bug: https://bugs.gentoo.org/802276 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> www-apps/icingaweb2-module-incubator/Manifest | 1 + .../icingaweb2-module-incubator-0.11.0.ebuild | 28 ++++++++++++++++++++++ www-apps/icingaweb2-module-incubator/metadata.xml | 8 +++++++ 3 files changed, 37 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=054fcbd12a115dc36b047d8426a83820d65bfa98 commit 054fcbd12a115dc36b047d8426a83820d65bfa98 Author: Matthew Thode <prometheanfire@gentoo.org> AuthorDate: 2021-12-28 21:21:00 +0000 Commit: Matthew Thode <prometheanfire@gentoo.org> CommitDate: 2021-12-28 21:25:22 +0000 www-apps/icingaweb2-module-director: 1.8.1 bump Bug: https://bugs.gentoo.org/802276 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> www-apps/icingaweb2-module-director/Manifest | 1 + .../icingaweb2-module-director-1.8.1.ebuild | 47 ++++++++++++++++++++++ .../icingaweb2-module-director-9999.ebuild | 31 +++++++++----- 3 files changed, 70 insertions(+), 9 deletions(-)
(In reply to Matthew Thode ( prometheanfire ) from comment #4) > thanks for the fixes (and general updates). I changed the uid of > icingadirector to 231 as the one in the ebuild was already used by another > package. Thank you for adding this to the tree. But I think the pkg_postinst() message I added in icingaweb2-module-director-1.8.1.ebuild is quite incomplete. We should either add a link to https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md or better elaborate what has to be done after installation. Maybe something like: If this is an initial installation you need to create an empty Icinga Director database: MySQL/MariaDB mysql -e "CREATE DATABASE director CHARACTER SET 'utf8'; CREATE USER director@localhost IDENTIFIED BY 'some-password'; GRANT ALL ON director.* TO director@localhost;" PostgreSQL psql -q -c "CREATE DATABASE director WITH ENCODING 'UTF8';" psql director -q -c "CREATE USER director WITH PASSWORD 'some-password'; GRANT ALL PRIVILEGES ON DATABASE director TO director; CREATE EXTENSION pgcrypto;" Hint: pgcrypto helps to boost performance, but is currently optional. In case you do not have it available on your platform and/or do not know how to solve this just leave away the 'CREATE EXTENSION' part. Web-based Configuration - Create a Database resource: In your web frontend please go to Configuration / Application / Resources and create a new database resource pointing to your newly created database. Please make sure that you choose utf8 as an encoding. - Enable the Director and the Incubator module: /usr/share/icingaweb2/bin/icingacli module enable incubator /usr/share/icingaweb2/bin/icingacli module enable director - Enable and start the system service: systemctl enable icinga-director.service systemctl start icinga-director.service Then you can proceed with running the kickstart wizard: Choose either Icinga Director directly from the main menu or navigate into Configuration / Modules / director and select the Configuration tab. Either way you'll reach the kickstart wizards. Follow the instructions, and you're all done!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cf828ed23a1999fda0541f41929e48368cbb57f commit 8cf828ed23a1999fda0541f41929e48368cbb57f Author: Matthew Thode <prometheanfire@gentoo.org> AuthorDate: 2021-12-29 17:10:59 +0000 Commit: Matthew Thode <prometheanfire@gentoo.org> CommitDate: 2021-12-29 17:10:59 +0000 www-apps/icingaweb2-module-director: add better doc links link to upstream docs for install/upgrade Bug: https://bugs.gentoo.org/802276 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> .../icingaweb2-module-director-9999.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Created attachment 868083 [details] files/icinga-director.initd This is a simple initd script. It works for me with icingaweb2-module-director-1.9.1::gentoo. The pidfile contains the correct number... # ps ax | grep director | grep -v grep 3595 ? Ss 0:04 icinga::director: running, db: connected ...and Icinga Web 2 > Icinga-Director > Service shows all infos PID Command 3595 /usr/share/icingaweb2/bin/icingacli director daemon run