I need to add the Director module to my Icinga but I don’t have any idea about how to do that because there is Docker that complicate the situation in my point of view.
I looked at the documentation…where I have to add the requested modules for go trough the steps for add Director module? I have to add them to some container? How?
How is the container icinga-core started?
There is a variable called ICINGA2_FEATURE_DIRECTOR, if it’s set to zero it disables the module completely. Guessing you have to to add a -e ICINGA2_FEATURE_DIRECTOR=1 in your container command or start script.
That is a heavily customized version of the original compose file. Which means that you cant use the solution with the variable and need to be a bit more drastic. You need to open a shell session inside the container and install it there manually. Since there is a special volume for modules
the Director installation should be persistent.
Download the director tar file in icinga-web-pnp-container/webroot_icingaweb2
The try running docker exec -it icinga-web-pnp bash (or similar) and go to /usr/share/icingaweb2 and follow the steps to complete the installation.
(Hope I got the container names right)
Good luck! Maintaining and upgrading this installation will not be an easy task.
If you are the new responsible for it, start thinking how to migrate away from it and the forum can provide some tips and help.
Here is a Dockerfile I have written which we are using in production - happy to hear if anyone has any suggestions as I am relatively new to Docker - it runs nginx, php and supervisor acts as a process manager.
FROM centos:latest
RUN yum install epel-release centos-release-scl -y
RUN yum install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm -y
RUN yum install icingaweb2 icingacli icingaweb2-selinux -y
RUN useradd -r -g icingaweb2 -d /var/lib/icingadirector -s /bin/false icingadirector
RUN install -d -o icingadirector -g icingaweb2 -m 0750 /var/lib/icingadirector
RUN yum install nginx php php-fpm php-curl php-process php-pcntl php-sockets python-pip -y
RUN yum install rh-php71-php-posix rh-php71-php-soap rh-php71-php-cli -y
RUN pip install --upgrade pip
RUN pip install supervisor
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
We expose a few directories as volumes in our docker-compose.yml to ensure settings are persistent.
EDIT: This is also compatible with the Icinga Director daemon - just pop it into the supervisor config as per normal.