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

Investigate getting sensu_gem working on windows #700

Closed
jeffmccune opened this issue Jun 29, 2017 · 2 comments
Closed

Investigate getting sensu_gem working on windows #700

jeffmccune opened this issue Jun 29, 2017 · 2 comments
Assignees

Comments

@jeffmccune
Copy link
Collaborator

This task came up in the discussion of #699 (review)

Moving it here for prioritization and decision. The major issues with windows brought up in #646 have been address in #699 so it's unclear if getting sensu_gem working on windows is necessary or not.

@jeffmccune
Copy link
Collaborator Author

Plan to grab this one on Tuesday.

@jeffmccune
Copy link
Collaborator Author

jeffmccune commented Jul 18, 2017

Closing this issue, sensu_gem works fine with vagrant up win2012r2-client. The sensu_gem provider uses the fully qualified path to sensu's embedded gem command, which is robust. Here's what I did to test the behavior:

diff --git a/tests/sensu-client-windows.pp b/tests/sensu-client-windows.pp
index d7b4441..41ac2d8 100644
--- a/tests/sensu-client-windows.pp
+++ b/tests/sensu-client-windows.pp
@@ -1,9 +1,17 @@
 # Note: Check http://repositories.sensuapp.org/msi/ for the latest version.
-class { '::sensu':
-  version           => '0.29.0-11',
-  rabbitmq_password => 'correct-horse-battery-staple',
-  rabbitmq_host     => '192.168.56.10',
-  rabbitmq_vhost    => '/sensu',
-  subscriptions     => 'all',
-  client_address    => $facts['networking']['ip'],
+node default {
+  class { '::sensu':
+    version           => '0.29.0-11',
+    rabbitmq_password => 'correct-horse-battery-staple',
+    rabbitmq_host     => '192.168.56.10',
+    rabbitmq_vhost    => '/sensu',
+    subscriptions     => 'all',
+    client_address    => $facts['networking']['ip'],
+  }
+  # (#700) Install a plugin using sensu_gem package provider on windows.
+  sensu::plugin { 'sensu-plugins-windows':
+    type         => 'package',
+    pkg_version  => 'installed',
+    pkg_provider => 'sensu_gem',
+  }
 }

Results:

==> win2012r2-client: Notice: Scope(Class[Sensu::Package]): Managing a local windows user is not implemented on windows
==> win2012r2-client: Notice: Compiled catalog for win2012r2-client.main.jeffmccune.net in environment production in 1.08 seconds
==> win2012r2-client: Info: Applying configuration version '1500407356'
==> win2012r2-client: Notice: /Stage[main]/Main/Node[default]/Sensu::Plugin[sensu-plugins-windows]/Package[sensu-plugins-windows]/ensure: created
==> win2012r2-client: Notice: Applied catalog in 7.89 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant