Create Module to manage Deployments
schurzi opened this issue · 5 comments
we need an additional module to manage deployments of configuration from Icinga Director to Icinga.
The module should be able to:
- trigger deploys
- report that a deploy is neccessary
- show what changes will be deployed
- roll back Deployments (?)
This seems to be possible with the director in version 1.8.0: Icinga/icingaweb2-module-director#2187
Yesterday I've started to use your modules and I found out, that I can create objects etc. But all modules only create them. None of them are deploying the changes. So I found this ticket.
Of course there should be a module that can do the deployment of changes.
The API from Director is at least able to do
- GET director/config/deployment-status - get current deployment status
- GET director/config/deployment-status?config_checksums= - to read the status of a specifc deployment
- POST director/config/deploy - trigger a deployment
But this ticket also talks about
- what changes are will be deployed - I see that in the WebUI, that this seems to be possible with some kind of diff, but I don't see a use case with automatic deployments with Ansible and I don't see a documentend API for that
- roll back deployments - I dont see an API call for that or a WebUI functionality.
Forthermore I like to question, if this should be only a separate module or should also icinga.py should optional(!) call the deployment trigger per module call?
Like:
- name: "Configure Zone {{ hostname }}"
t_systems_mms.icinga_director.icinga_zone:
url: "{{ endpoint }}"
url_username: "{{ username }}"
url_password: "{{ password }}"
state: "present"
object_name: "{{ hostname }}"
parent: "{{ parent }}"
trigger_deploy: true
There's an ongoing PR that we just worked on yesterday that will add a deploy-module.
what changes are will be deployed - I see that in the WebUI, that this seems to be possible with some kind of diff, but I don't see a use case with automatic deployments with Ansible and I don't see a documentend API for that
roll back deployments - I dont see an API call for that or a WebUI functionality.
These are just ideas, not necessarily to be implemented. :)
Forthermore I like to question, if this should be only a separate module or should also icinga.py should optional(!) call the deployment trigger per module call?
This will be a separate module. Every other module in Ansible is built this way. If you change something e.g. in nginx, you then use a notify-handler to trigger a restart.
The last comment is not 100% correct. Nginx is text file based, which need a service restart which could be a problem with service availability. Deploying a configuration in Icinga is stage-based. You dont need to restart the service...
I'm not sure, but when there is already a PR, I don't start over.