-
Notifications
You must be signed in to change notification settings - Fork 184
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 redisget() #179
Add redisget() #179
Conversation
Add the redisget() function which can get a value for a specified key from a specified redis URL.
@ghoneycutt This is very cool! Let me have a look, I might add and acceptance test also, but otherwise this seems like an awesome addition 👍 |
Thanks, glad you like it. These tests were a pain :> Could you please tag a new release? |
Add the redisget() function which can get a value for a specified key from a specified redis URL.
Will do when the acceptance tests are merged 👍 |
@ghoneycutt BTW do you have some example usecases of how you're using this right now in your Puppet code you can share? It'd be a good bit of background for the README, also thinking about adding a |
@petems How does this work with the Forge? Do you have publish access on my account? |
I have a CD pipeline for a piece of software that records the version of a successful build in our source of truth (Redis). To know what version should be installed, I use redisget() similar to the example in the README and use that in my package resource. Another use case is similar to Consul for service discovery. You can set that information in Redis using a process outside of Puppet and then have Puppet query that to know what information to use in your configuration. A more detailed piece of code might look like class profile::myapp {
$redis_url = hiera('redis_url')
$version = redisget("version.myapp.${::environment}", $redis_url)
package { 'myapp':
ensure => $version,
}
} |
I don't have a use case for Puppet to set data in Redis as I'm using Redis as source of truth to be queried. I don't really see a use case to write data there with Puppet. Suggest holding off on writing additional functions until someone actually needs them, even if they are trivial to implement. |
Yep, all makes sense 👍 I'll hold fire until someone asks for something like that, but seems like a cool usecase 😄 |
// , This doesn't break compatibility with CEntOS 6's Ruby 1.8.7, correct? |
@v6 I'm using it in a Puppet v3 / Ruby 1.8.7 environment |
Add the redisget() function which can get a value for a specified key from a specified redis URL.
Add the redisget() function which can get a value for a specified key
from a specified redis URL.