-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add initial FreeBSD support #210
Conversation
manifests/params.pp
Outdated
$lib_dir = '/usr/local/lib/icinga2' | ||
$constants = { | ||
'PluginDir' => "${lib_dir}/nagios/plugins", | ||
'PluginContribDir' => "${lib_dir}/nagios/plugins", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be wrong in terms of another ports location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right @lazyfrosch, that does look wrong.
What files are supposed to live in the PluginContribDir
? In the monitoring-plugins port, I see /usr/local/libexec/nagios
where the check_*
scripts live, and in the icinga2
port I see /usr/local/share/icinga2/include/plugins-contrib.d/
which contains a bunch of config files that define commands and such. I'll adjust accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant both PluginDir statements, from what I understand of ports (not a FreeBSD user) the location would be:
/usr/local/libexec/nagios/....
We should validate the paths of net-mgmt/monitoring-plugins
, maybe also test the module on FreeBSD...
PluginContribDir
is meant for other plugins, that are not included in monitoring-plugins.
But by default the path is set to the same: https://github.com/Icinga/icinga2/blob/8fd454fbb1457a34031a53baa16d2bacc77bba1b/etc/icinga2/constants.conf.cmake#L17
@lazyfrosch Thank you for the review. I've just pushed what I believe are the correct paths for those constants. Reading over the I'm still working to get a functional deployment in my environment, so I cannot as yet confirm that this is working, but I believe what I have here is correct. |
We should make sure it's actually working on FreeBSD before merging 😉 |
I've made a few more updates around the IDO package installation. FreeBSD doesn't have these packages, and the modules are included with the |
Is this module intended to be supported on Windows for the master portion of Icinga, or just the agent? I've added the IDO packages to what was installed by default in the windows section, but I suspect this is not actually the desired change. If only the agent is intended to be supported on Windows, I'll set those packages to undef, and the tests should (might) pass. |
Master/satellite instances on Windows generally remain unsupported by Icinga 2 itself, only the clients are meant to be installed on Windows. Might need an addition to the Readme file if not already existing. |
Without this change, there is no support for FreeBSD. Here we add the basic params data, and update the unit tests for the icinga2 class to ensure that we have the expected results. Also here, we extend the metadata to include FreeBSD so that the unit tests are run.
Thank you @dnsmichi, I've set the windows packages for the IDO modules to Also, I can confirm this module works on FreeBSD with this change. I've converted all my internal manifests to use this module for one of my environments. Review welcome. |
I created a vbox for FreeBSD 10.3: Can you add everything necessary for integration testing to the If you are short in time, I can give it a try (not a freebsd user). Just let me know how we should proceed. I'll create another box for FreeBSD 11.0 when this is working |
@bobapple Thank you for the note. I've not used serverspec, but looking over the code and patterns, I believe I've put the items in place correctly. Let me know if something needs to be adjusted. |
Vagrant does not support mounting directories via VBox Guest Additions. This commits provides a workaround to use RSync instead.
Looks good already. Apparently Vagrant does not support mounting a directory with VBox Guest Additions on FreeBSD. We can workaround this by using RSync for BSD machines. I patched this in your branch, hope this is fine with you. There is currently no repo management for FreeBSD, can you add this as well? |
@bobapple thanks for the review. The icinga2 package is in the default repo, so nothing special is required. Users can build and host their own repo (as I do), but the configuration of such should belong outside this module. |
Thanks folks! |
Without this change, there is no support for FreeBSD. Here we add the
basic params data, and update the unit tests for the icinga2 class to
ensure that we have the expected results. Also here, we extend the
metadata to include FreeBSD so that the unit tests are run.