sensu / sensu-puppet

Sensu Puppet module.
https://github.com/sensu/sensu-puppet
MIT License
165 stars 290 forks source link

v3 - Support sensu-go #901

Closed ghoneycutt closed 5 years ago

ghoneycutt commented 6 years ago

What's needed to support sensu-go

For an item to be checked, it needs the following if applicable.

treydock commented 6 years ago

@ghoneycutt Where is environment documented? Also may not need to do anything for event, looks like entirely informational and nothing that can be changed with sensuctl.

treydock commented 6 years ago

@ghoneycutt Nevermind about environment, found under RBAC section.

treydock commented 6 years ago

@ghoneycutt Any references for extension? Also do we want to add a type for event? event seems like something sent by checks or on a more ad-hoc basis.

ghoneycutt commented 6 years ago

I think extension is just for v1 of sensu as it is not listed in the v2 docs

ghoneycutt commented 6 years ago

@treydock Event's can be deleted and resolved, so we should have a type/provider for them.

treydock commented 6 years ago

@ghoneycutt Can check off EL6 and Ubuntu 14.04. The tests for Ubuntu 18.04 work in Docker and Vagrant is fixed with #915.

treydock commented 6 years ago

@ghoneycutt For the config type, the only things it can change in sensuctl is default organization, environment and output format. AFAICT our use of sensuctl create -f bypasses default organization and environment so those are defaulted in the individual types.

I do notice that right now if a system in provisioned and the password changed later, sensuctl configure won't get re-run.

ghoneycutt commented 6 years ago

@treydock Added documentation with puppet-strings to the list.

https://puppet.com/docs/puppet/5.5/puppet_strings_style.html#resource-types

treydock commented 6 years ago

May need to add extension back, it appears to be something that can be managed with sensuctl.

ghoneycutt commented 6 years ago

Put it back on the list.

treydock commented 6 years ago

@ghoneycutt No explicit checkbox for README update. Do we want to move examples and other documentation to puppet-strings where possible or also put examples in README?

ghoneycutt commented 6 years ago

Added a README button. It should conform to their template.

https://puppet.com/docs/puppet/5.5/modules_documentation.html

The first example should be the minimal installation and a single check.

ghoneycutt commented 6 years ago

@treydock could you double check the buttons above. Are we missing anything that needs to be done? Things that are done that can be checked off?

treydock commented 6 years ago

Items that can be checked off:

Items with open PRs:

While debugging ubuntu-18.04 in Vagrant I noticed still some code in tests directory from sensu1 that needs to be cleaned up.

ghoneycutt commented 6 years ago

I can't get EL6 going.

Installing Virtualbox Guest Additions 5.2.12 - guest version is unknown
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.12 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-2.6.32-696.28.1.el6.x86_64
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-2.6.32-696.28.1.el6.x86_64
An error occurred during installation of VirtualBox Guest Additions 5.2.12. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-2.6.32-696.28.1.el6.x86_64
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> el6-agent: Checking for guest additions in VM...
    el6-agent: No guest additions were detected on the base box for this VM! Guest
    el6-agent: additions are required for forwarded ports, shared folders, host only
    el6-agent: networking, and more. If SSH fails on this machine, please install
    el6-agent: the guest additions and repackage the box to continue.
    el6-agent:
    el6-agent: This is not an error message; everything may continue to work properly,
    el6-agent: in which case you may ignore this message.
==> el6-agent: Setting hostname...
==> el6-agent: Configuring and enabling network interfaces...
    el6-agent: SSH address: 127.0.0.1:2200
    el6-agent: SSH username: vagrant
    el6-agent: SSH auth method: private key
==> el6-agent: Mounting shared folders...
    el6-agent: /vagrant => /Users/gh/git/sensu-puppet
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=500,gid=500 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device
ghoneycutt commented 6 years ago

ubuntu 14 gives

==> ubuntu1404-agent: Running provisioner: shell...
    ubuntu1404-agent: Running: inline script
    ubuntu1404-agent: Error: Could not run: Could not find file /vagrant/tests/sensu-agent-sensu_gem.pp
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
treydock commented 6 years ago

@ghoneycutt Issue with el6 in Vagrant appears to be fact box doesn't ship with latest kernel and when the guest addition logic adds kernel-headers it adds the latest available kernel headers and not the ones for kernel running on the box. Logging into the box, updating kernel, and reloading fixes the box.

The issue with Ubuntu 14.04 box is issue with Vagrantfile I've opened PR #934

treydock commented 6 years ago

@ghoneycutt Need a checkbox to add ensure => absent support to sensu_asset. This is opened here: https://github.com/sensu/sensu-go/issues/988

treydock commented 6 years ago

sensu-go appears to be adding cli support to manage backend cluster members. Should probably add checkbox for cluster management.

treydock commented 6 years ago

@ghoneycutt config can be checked off via #938. Need a checkbox to add ensure => absent support to sensu_asset. This is opened here: sensu/sensu-go#988. The provider for sensu_asset supports delete but it causes errors when invoked, the acceptance tests explicitly skip testing the deletion of assets. Only change necessary for sensu_asset is removing the skip here: https://github.com/sensu/sensu-puppet/blob/sensu2/spec/acceptance/sensu_asset_spec.rb#L54

treydock commented 5 years ago

@ghoneycutt Can check off extension provider code is cleaned up via #1013 .

treydock commented 5 years ago

@ghoneycutt User type is done but lacks ensure => absent similar to assets: https://github.com/sensu/sensu-go/issues/2540