Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable management of MKP packages with server role #714

Open
wants to merge 14 commits into
base: devel
Choose a base branch
from

Conversation

ra2xfael
Copy link
Contributor

This pull request tries to enable the installation and management of MKP packages specified by site. Packages can be downloaded or provided on the ansible controller and will be installed, enabled, disabled or removed from the sites.

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

CheckMK MKP packages installation and management is not possible with the server role.

What is the new behavior?

  • Download of mkp packages using HTTP(S)
  • Copying of mkp packages from the ansible controller
  • MKP packages can be installed, enabled, disabled and removed from specific sites.

@github-actions github-actions bot added documentation Improvements or additions to documentation role:server This affects the server role labels Jan 16, 2025
@robin-checkmk robin-checkmk self-assigned this Jan 16, 2025
@robin-checkmk
Copy link
Member

Thanks for this contribution @ra2xfael, looks pretty neat! 💪
Please try to satisfy the tests, as a review on our end might take some time.
But rest assured, we will get back to you when we can. ✌️

Copy link
Member

@robin-checkmk robin-checkmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I have this problem: In distributed monitoring, MKPs will be replicated from a central to the remote sites upon activating changes. So MKP management would only ever make sense on a central site in this scenario.
Now your changes do enable this, as MKP management can be configured on a per-site basis. I am just uncertain at this point, if we need to build safeguards or if providing documentation and maybe a warning will suffice.

Comment on lines +85 to +95
mkp_packages:
- name: 'mypackage'
version: 1.0
src: 'path'
url: 'download'
checksum: 'md5:download checksum'
installed: true
enabled: true

A dictionary of sites, containing the desired version, admin password and state.
MKP packages can be listed to be installed on the specific site. A source can be set on the ansible controller. Alternatively a url can be specified to download the mkp package from.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if this is getting to convoluted here, but I got no better idea, so I am just mentioning it.

@@ -56,3 +56,5 @@ checkmk_server_epel_gpg_check: 'true'

checkmk_server_cleanup: 'false'
checkmk_server_no_log: 'true'

checkmk_server_mkp_staging: '/tmp'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a global tmp dir variable, like in the agent role: __checkmk_agent_host_tmp_dir.
That should obviously be done in a dedicated PR ahead of this one. Would you want to take that on @ra2xfael?

But why make it configurable in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation role:server This affects the server role
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants