-
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
Instance service improvements #222
Instance service improvements #222
Conversation
This makes sense. Can you fix up the specs? They seem to be Ubuntu only errors, so it's probably something to do with the Debian init file |
$redis_config_extension = ".${title}" | ||
$redis_file_name_orig = "${config_file_orig}${redis_config_extension}" | ||
$redis_file_name = "${config_file}${redis_config_extension}" | ||
$redis_server_name = "redis-server-${name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to be really pedandtic we could change it to be redis
on RedHat and redis-server
on Debian to follow convention, but I don't care that much
manifests/instance.pp
Outdated
$redis_file_name = sprintf('%s/%s.%s', dirname($config_file), $redis_server_name, 'conf') | ||
} | ||
|
||
$_real_log_file = $log_file ? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed, we could simply set the log_file in the instance default declaration, then set the default to be ${log_dir}/redis-server-${name}.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I initially did it, but some Travis test where failing because the ${log_dir} didn't get replaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, you can't refer to other parameters in parameters.
Ok, leave it like this for now, there's probably a cleaner solution somehow
@petems It took more attempts than I care to admit, but all tests are passing. |
@kwevers Your work is appreciated! Can you squash the commits down to one? We can leave the redis vs redis-server thing, if someone using redis with multiple instances wants to change it they can open a PR, not super important, still works the same functionally 👍 |
21b1cfe
to
0e38eeb
Compare
@petems I've rebased it to a few different commits so the different changes are still separated. |
0e38eeb
to
c8fe119
Compare
LGTM! |
* Add parameter info * Base default instance log_file path on user defined log_dir * Rename Redis instance config files and services * Updating Ruby Version for Travis
Some small fixes to align manifest documentation and file path inheritance
The last commit reworks the naming convention for non default instances:
The service name could be useful for people running multiple apps on the same server with for example dedicated JBoss and Redis instances.
In this way they could have a service jboss-server-app1 and redis-server-app1 instead of a non ambiguous service app1
We could drop the -server part to shorten the names if required.