Add default recipe which installs and starts consul as a service #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in a nutshell:
default
recipe now installs consul, specifying binary vs source based on an attribute (default is binary).default
recipe now includes theservice
recipe, which creates and starts a consul service. The service can be configured as bootstrap (single host and default), server, or client.servers
attribute which is an array of servers to connect to on startup. This will allow a wrapper cookbook or role to configure a cluster of consul servers easily. Note that we don't want consul to restart when this list changes, so the init script template does not trigger a restart. We could probably make this smarter by writing a list of hosts to another file which doesn't trigger restart and having the init script read from it. I'm not aware of a good way to test this with test-kitchen.Other notes:
binary
orsource
suites, as the tests are defined only for thedefault
suite.kitchen verify
before PR:kitchen verify
after PR: