Skip to content
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

Merged
merged 4 commits into from
Aug 8, 2017

Conversation

kwevers
Copy link
Contributor

@kwevers kwevers commented Jul 13, 2017

Some small fixes to align manifest documentation and file path inheritance

The last commit reworks the naming convention for non default instances:

  • makes sure the config file name ends on .conf(.puppet) instead of the instance name.
  • include redis in the service name

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.

@petems
Copy link
Member

petems commented Jul 13, 2017

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}"
Copy link
Member

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

$redis_file_name = sprintf('%s/%s.%s', dirname($config_file), $redis_server_name, 'conf')
}

$_real_log_file = $log_file ? {
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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

@kwevers
Copy link
Contributor Author

kwevers commented Jul 13, 2017

@petems It took more attempts than I care to admit, but all tests are passing.
Should I look into the redis vs redis-server issue or is it good enough as is?

@petems
Copy link
Member

petems commented Jul 13, 2017

@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 👍

@kwevers kwevers force-pushed the instance_service_improvements branch 3 times, most recently from 21b1cfe to 0e38eeb Compare July 13, 2017 14:05
@kwevers
Copy link
Contributor Author

kwevers commented Jul 13, 2017

@petems I've rebased it to a few different commits so the different changes are still separated.

@kwevers kwevers force-pushed the instance_service_improvements branch from 0e38eeb to c8fe119 Compare July 17, 2017 11:57
@petems
Copy link
Member

petems commented Aug 8, 2017

LGTM!

@petems petems merged commit 7293d8a into voxpupuli:master Aug 8, 2017
@kwevers kwevers deleted the instance_service_improvements branch August 9, 2017 07:40
cegeka-jenkins pushed a commit to cegeka/puppet-redis that referenced this pull request Feb 16, 2021
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants