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

Make it possible to install sentinel independently #389

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomsajan
Copy link

Pull Request (PR) description

This PR introduces the possibility to install redis::sentinel standalone, without redis::server. It comes in handy when you need your sentinels to be for example on a different node than your redis server.

The change itself is a pretty straightforward, I am just adding a require_redis parameter, that makes the requirement of redis class conditional. The default value is true, which includes the redis and it is therefore backward compatible with the current setup.

The only downside of this approach I see currently is that in case someone needs a standalone redis-sentinel from a managed repository, the repository must be added manually as the redis::preinstall is no longer included (as was previously with the redis class)

This Pull Request (PR) fixes the following issues

  • installation of standalone sentinel (no open issue for this one, so far)

Thank you for any input :)

@tomsajan
Copy link
Author

tomsajan commented Feb 17, 2021

Regarding the puppet5/ubuntu 20.04 tests, the errors don't look like they were caused by my changes...

Copy link
Member

@ghoneycutt ghoneycutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me though it needs the addition of tests that show the presence or absence of the redis class based on the new require_redis parameter.

README.md Outdated
@@ -133,6 +133,15 @@ class { '::redis::sentinel':
}
```

If installation without redis-server is desired, set `require_redis` parameter to false, i.e
```puppet
class { '::redis::sentinel':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit - drop the leading :: so it reads redis::sentinel

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks for the tests suggestion. I will take a look at it :)

@vox-pupuli-tasks
Copy link

Dear @tomsajan, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@gizmo15
Copy link

gizmo15 commented Mar 9, 2023

Hi,

Can i help to push this PR?
I have this need at work.

thanks

@ekohl
Copy link
Member

ekohl commented Mar 9, 2023

@gizmo15 it's probably best to submit your own PR.

@tomsajan
Copy link
Author

tomsajan commented Mar 9, 2023

Thanks for taking interest in this. To be honest, this slipped from my mind. I'll try to make it work.
What is required from this to be accepted? I suppose

  • rebase to current upstream
  • drop leading :: and add tests as suggested by @ghoneycutt ?
    I may have need some helm with the tests, as I didn't do it yet in puppet, but I will take a look a try my best

@tomsajan
Copy link
Author

tomsajan commented Mar 9, 2023

Hi, so I merged it to the current master.
Could someone advise me please on how to pass the CI tests? Static tests reports outdated reference.md, but I adjusted it as good as I was able and it still complains. :(

Not sure though on how to tackle tests to verify the presence or absence of the redis class...

Also, this MR still has the labe merge-conflicts, although there are non now.

Thanks and have a great day :)

@ekohl
Copy link
Member

ekohl commented Mar 10, 2023

I would recommend to rebase it on master. We don't like it when a PR merges in master. Though I think the bot may not be able to remove the label.

@flepoutre
Copy link

Hello, any news about this PR ?
Thanks.

@yakatz
Copy link
Member

yakatz commented Aug 5, 2024

It doesn't appear it was ever updated as requested during the review, so it can't be merged as-is. The original author would have to update it, or someone else could create a new pull request based on it.

@tomsajan
Copy link
Author

tomsajan commented Aug 5, 2024

Let me give it a try for a day or two :)

@tomsajan tomsajan force-pushed the standalone_sentinel branch from d82cdb5 to a290a1b Compare August 5, 2024 21:16
@tomsajan tomsajan force-pushed the standalone_sentinel branch from a290a1b to 79d3493 Compare August 5, 2024 21:26
@tomsajan
Copy link
Author

tomsajan commented Aug 5, 2024

So I squashed my changes and rebased it all to current master.
During the rebase I renamed the option to contain_redis because now contain is used instead of require.
There are still some tests that fail.

I am not sure I will be able to test this code as I don't use puppet anymore in my infrastructure, but I will try to come up with something tomorrow.

@flepoutre
Copy link

@tomsajan Hello, thanks for your feedback. I don't really understand the Puppet CI error 🤷‍♂️
Do you have any idea please ?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants