Sensu Go plugin distribution model

hey,
Just to be clear, you do not have to use assets. In fact there are some workloads where people want assets disabled entirely…and that’s fine…the Sensu agent actually has a tunable to disable asset downloading entirely to support that use case. And really everything that is an asset is just a tarball that you can install and unpack manually as part of CM if you want really tight control over what is install on the system and where.

sensu-install is a thin wrapper over rubygem, so even if it goes a way at some unspecified time in the future you’ll still be able to use the gem tool. sensu-install only supports Sensu plugins written in ruby and packaged and published as gems. How long you’ll be able to use those gems depends on how much forward momentum contributors have to maintain the plugins you are using. There’s no effort to to prevent gem installed ruby plugins from working. Some of those gems, especially the handler plugins might need to be updated to work with the Sensu Go event json, but we tried to anticipate that by providing wrapper logic to convert the event json back to what the handler expects…as a forward compatible change in the lastest sensu-plugin gem.

However, much of the newer work is around plugins written in golang and statically cross compiled instead of Ruby as the static Golang binaries work really well for a larger cross section of workloads, including sensu agent sidecar containers. The Ruby stuff, just because it relies on the heavy Ruby environment to be present…doesn’t fit well in the containerized workloads so much. Ironically, the sudo issues aren’t a big deal in that workload generally either because right now the agent is run as root in the official Sensu container right now.

Previously it was possible to rely heavily on Ruby’s handling of shared libraries, but assets even though more complicated provide a way to support a wider range of languages. They aren’t just binaries, but can also include libraries… we can’t just dump all of that into the same path… because different assets may require different compiled versions of the same library.

All of that being said, there’s certainty room to improve assets. I put in this straw proposal to extend assets to optionally allow for predictable binary installs awhile ago.
https://github.com/sensu/sensu-go/issues/3046