-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature Request: sensu_bonsai_asset #133
Comments
@kmf thanks for opening this feature request. I want to make sure I understand the request and the value it brings before I dive too much into the feasability. I see we already have a generic Internally at my org we use it like so: node['CUSTOM_NAMESPACE']['sensu-go']['namespaces'].each do |namespace|
# do non asset things across all namespace
...
# create assets from attributes
node['CUSTOM_NAMESPACE']['sensu-go']['assets'].each do |asset, property|
sensu_asset asset do
url property['url']
sha512 property['checksum']
namespace namespace
end
end
end In our attributes we are defining a hash of assets to deploy# NOTE: pared down the list of assets to save screen real estate
default['CUSTOM_NAMESPACE']['sensu-go']['assets'] = {
'sensu-ruby-runtime' => {
url: 'https://assets.bonsai.sensu.io/102d2b8c9dc264b98fa7973bf7657e9216bfb0a8/sensu-ruby-runtime_0.1.0_ruby-2.4.4_debian_linux_amd64.tar.gz',
checksum: '956806ab6a1d12a3bdb476c2b5fb9b047db4394eafd6d5956554909db0f1b0367d9139c1f63b2ed966d3f5364e356adb424cc112888e09d2af316869d1a7ccb3',
},
'sensu-slack-handler' => {
url: 'https://assets.bonsai.sensu.io/55861a7587f59a7e2ad960703f0ec44699a2be64/sensu-slack-handler_1.3.2_linux_amd64.tar.gz',
checksum: 'eaaecf4609d872fd01b914c98ae5f09089ce773fa651dca368f4c804b44dae239fa4c39898967c6d04db087a5ae4aa5a1e84f87b32c99bf63448531629fb12cc',
},
'sensu-plugins-http' => {
url: 'https://assets.bonsai.sensu.io/33783747d3af1939808944c2253c262d9d5b3fb7/sensu-plugins-http_6.0.0_debian_linux_amd64.tar.gz',
checksum: 'bfa025fcda806a36673e252f693635ea9283f7ba9e1ddcfa3c541fdf7ab96e6d90746e44e3377b7d973cdc7cb3c851114ce886fd9d8ec532d7371b7a3f237fa2',
},
'sensu-deregistration-handler' => {
url: 'https://assets.bonsai.sensu.io/4c486c532fce60f46f6493e81e6affc4dbfeb43c/sensu-deregistration-handler_0.1.0_linux_amd64.tar.gz',
checksum: 'f76669c3ee1ffdafaa251e1412bc6f2ff2aecc6854654061695a0623e336ea01e3cdcb8d17de0bdc98c644569363416724af406996c764a11f06c0f9953fa07a',
}
} We could probably create a "wrapper" resource that could build the asset but I suspect that we would need to realistically force each of the same bits but could construct the URL. For example to use bonsai_asset 'sensu-deregistration-handler' do
version '0.1.0'
platform 'linux'
arch 'amd64'
end It's tempting to assume we can use |
This functionality |
Gotch, from what I read here https://docs.sensu.io/sensu-go/latest/plugins/assets/ it seems the URL is a required field in the spec. I suspect the |
Bumping this since it seems really useful. It's a lot to keep track of all the URLs/SHAs especially if an asset has multiple builds. Also pointing out it seems there's a |
Would love to use an asset like this
The text was updated successfully, but these errors were encountered: