-
Notifications
You must be signed in to change notification settings - Fork 183
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
Support for multi-instances per host #113
Comments
Yes! I support this. I am actually in the process of hacking this into the module. maybe we can collaborate. |
Absolutely, maybe rolling out small changes into a dev branch? Sent from my iPhone
|
@rhoml do you have a branch already that i can chekout? |
I'd prefer having an $instance parameter in the main class which the config class could read, parse and deploy using a resource defined type. Pseudo code:
(Update) Or even:
|
@spo0nman No I don't have any working branch atm, been busy. @arioch yeah, I'd like to see something similar to elastic/puppet-elasticsearch https://github.com/elastic/puppet-elasticsearch/blob/master/manifests/instance.pp |
@arioch how would we make sure that all the instances are individually configurable? e.g if redis::config is the top layer, and multiple instances on a single host will need instance specific overrides for max_memory etc. |
@spo0nman by using Instances could have their own directory structure, f.i. |
@arioch the updated one looks good. let me write something around this idea. |
Hi, small update: I have a decent working version now with these changes. I had to make a few changes to accomplish this. I have a rather large patch, I'll commit it to my fork for your review tomorrow. |
Hello! I have pushed[1] my changes to my fork. It is a large change, I took the idea of @arioch and created a define called redis::instance, which is called multiple times from redis::config. I added a new variable called instances, this is expected to be a hash of the form:
The defile allows us to 'overload' common redis::variables for all the instances and 'import' sane defaults from params.pp. It also allows us to overload defaults for all the instances on a host for example redis::maxmemory: is default 2gb for the host but is increased in instance_1. The commit has a lot more details. for multiple instances we need multiple redis-server processes, so i decided to decorate the process name with instance) name. hieradata/redis.yaml
A somewhat related but maybe unrelated feature in the commit is the sentinel_discover: since sentinel is not configured alone, we can use sentinel::discover_master flag to ask the "members" about an instance master. discover_master is set to false by default, in that case redis_host is used. (if you guys feel this is not good, we can take it out, but I use this in my infra and find it very useful.) more details on this in the commit comment. |
@petems I am currently struggling with sparklemotion/nokogiri#1445 and could not run the rake tests on my changes. As soon as I have rake running. I will run the tests. |
Hi @spo0nman! I'm looking over your changes, I think some would change the intentions of this module and what falls under it's scope, but others I think could be broken up into individual features that could be merged. I should have some cycles to look through stuff in december, hopefully I can merge it for you then! 👍 |
@petems sounds good. Let's sync up in December and I can separate out the unnecessary. |
This is now merged as part of #200 class { '::redis':
default_install => false,
}
redis::instance {'redis1':
port => '7777',
}
redis::instance {'redis2':
port => '8888',
} Ta-dah! 😄 |
Is there a way to do this?:
Using this style we are getting error:
|
@demueller that should just be: class { '::redis':
default_install => false,
}
redis::instance {'redis1':
port => '7777',
}
redis::instance {'redis2':
port => '8888',
} |
It is a common practice to have more than one instance of redis per host. We should move the config.pp into a define type so we can create multiple instances pointing into different ports.
Thoughts?
The text was updated successfully, but these errors were encountered: