-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from johnbellone/install-resource
Adds custom resource for installing Consul.
- Loading branch information
Showing
22 changed files
with
457 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# TODO | ||
- Fix the helpers and clean up the where it injects into DSL. | ||
- Add custom resource (and multiple providers) for maintaining the Consul client. | ||
- Use the InSpec instead of ServerSpec. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# | ||
# Cookbook: consul | ||
# License: Apache 2.0 | ||
# | ||
# Copyright 2014-2016, Bloomberg Finance L.P. | ||
# | ||
|
||
default['firewall']['allow_consul'] = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Cookbook: consul | ||
# License: Apache 2.0 | ||
# | ||
# Copyright 2014-2016, Bloomberg Finance L.P. | ||
# | ||
require 'poise' | ||
|
||
module ConsulCookbook | ||
module Resource | ||
# A `consul_installation` resource which manages the Consul installation. | ||
# @action create | ||
# @action remove | ||
# @since 2.0 | ||
class ConsulInstallation < Chef::Resource | ||
include Poise(inversion: true) | ||
provides(:consul_installation) | ||
actions(:create, :remove) | ||
default_action(:create) | ||
|
||
# @!attribute version | ||
# The version of Consul to install. | ||
# @return [String] | ||
attribute(:version, kind_of: String, name_attribute: true) | ||
|
||
def consul_program | ||
@program ||= provider_for_action(:consul_program).consul_program | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.