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

Added join_cluster param to have consul join a cluster after (re)starting service #21

Merged
merged 4 commits into from
Sep 24, 2014

Conversation

tylerwalts
Copy link
Contributor

For our use case we are bootstrapping environments and needed a way to designate certain roles to act as servers, and to have them all join the cluster based on a DNS deployment convention. This PR does 2 things:

  1. To be able to elect a leader, added the bootstrap_expect config as a simple integer cast in config.json.erb, until a more advanced approach can be implemented as described in PR 13.
  2. Added a param, join_cluster and an exec resource that subscribes to the consul service to re-join the cluster after any service restart.

@@ -10,4 +10,14 @@
enable => $consul::service_enable,
}

if ($consul::join_cluster != 'UNSET') {
exec { 'join consul cluster':
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you run bundle exec rake lint ? line up the =>'s for style

@tylerwalts
Copy link
Contributor Author

How do you like the new test?

@solarkennedy
Copy link
Contributor

#21 (comment)

@tylerwalts
Copy link
Contributor Author

@solarkennedy
Copy link
Contributor

! :)

solarkennedy added a commit that referenced this pull request Sep 24, 2014
Added join_cluster param to have consul join a cluster after (re)starting service
@solarkennedy solarkennedy merged commit 12bf17b into voxpupuli:master Sep 24, 2014
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