This repository was archived by the owner on Dec 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
Add support for Chef Solo/RightScale, fill out metadata, more directive support in template #4
Open
flaccid
wants to merge
15
commits into
coderanger:master
Choose a base branch
from
flaccid:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
21a19dd
Add in default attributes fqdn_lookup, hostname, servers.
flaccid f51fcc2
Remove metadata.json ignore.
flaccid 133b8c9
Add support for chef-solo via logic.
flaccid 05088e8
Allow Hostname and FQDNLookup directives to be specified by node attr…
flaccid c245e6f
Add metadata for recipes and attributes.
flaccid c336562
Add metadata.json for RightScale support (required).
flaccid e227ec4
Revert "Remove metadata.json ignore."
flaccid 5d951bb
Remove metadata.json.
flaccid 31ab29e
Add support for more platforms with the collectd package name.
flaccid b0784d9
Add in attribute support for more platforms (mainly redhat-like ones).
flaccid 7956367
Update to use node/collectd/config_dir for plugin configurations.
flaccid 4af9da1
Use boolean not string for default attribute value of collectd/fqdn_l…
flaccid f38bd22
Raise an error per Chef (server||solo) intelligiently when no collect…
flaccid 053af26
Add missing end and remove old code accidentally pasted before previo…
flaccid 675091f
Add name attribute to metadata and remove old/duplicate supports attr…
flaccid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,7 +1,90 @@ | ||
maintainer "Noan Kantrowitz" | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Install and configure the collectd monitoring daemon" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "1.0.0" | ||
supports "ubuntu" | ||
name "collectd" | ||
maintainer "Noan Kantrowitz" | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Install and configure the collectd monitoring daemon" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "1.0.0" | ||
|
||
depends "apache2" | ||
|
||
%w{ debian ubuntu centos redhat fedora }.each do |os| | ||
supports os | ||
end | ||
|
||
recipe "collectd", "Install a standalone daemon." | ||
recipe "collectd::client", "Install collectd and configure it to send data to a server." | ||
recipe "collectd::server", "Install collectd and configure it to recieve data from clients." | ||
recipe "collectd::collectd_web", "Installs and configures collectd_web." | ||
|
||
attribute "collectd/base_dir", | ||
:display_name => "collectd Base Directory", | ||
:description => "The base directory for collectd.", | ||
:required => "optional", | ||
:default => "/var/lib/collectd", | ||
:recipes => [ "collectd::default" ] | ||
|
||
attribute "collectd/plugin_dir", | ||
:display_name => "collectd Plugin Directory", | ||
:description => "The plugin directory for collectd.", | ||
:required => "optional", | ||
:default => "/usr/lib/collectd" , | ||
:recipes => [ "collectd::default" ] | ||
|
||
attribute "collectd/types_db", | ||
:display_name => "collectd Types Database", | ||
:description => "The location of the collectd types.db file.", | ||
:required => "optional", | ||
:type => "array", | ||
:default => [ "/usr/share/collectd/types.db" ], | ||
:recipes => [ "collectd::default" ] | ||
|
||
attribute "collectd/interval", | ||
:display_name => "collectd Polling Interval", | ||
:description => "The collectd interval setting value.", | ||
:required => "optional", | ||
:default => "20", | ||
:recipes => [ "collectd::default" ] | ||
|
||
attribute "collectd/read_threads", | ||
:display_name => "collectd Read Threads", | ||
:description => "The collectd read threads setting value.", | ||
:required => "optional", | ||
:default => "5", | ||
:recipes => [ "collectd::default" ] | ||
|
||
#attribute "collectd/servers", | ||
# :display_name => "collectd Servers", | ||
# :description => "The collectd servers to send to as a client.", | ||
# :required => "optional", | ||
# :default => nil, | ||
# :type => "array", | ||
# :recipes => [ "collectd::client" ] | ||
|
||
attribute "collectd/hostname", | ||
:display_name => "collectd Hostname", | ||
:description => "The collectd Hostname setting value.", | ||
:required => "optional", | ||
:recipes => [ "collectd::default" ] | ||
|
||
attribute "collectd/fqdn_lookup", | ||
:display_name => "collectd FQDNLookup", | ||
:description => "The collectd FQDNLookup setting value.", | ||
:required => "optional", | ||
:recipes => [ "collectd::default" ], | ||
:choice => [ "true", "false" ], | ||
:default => "true" | ||
|
||
attribute "collectd/collectd_web/path", | ||
:display_name => "collectd_web path", | ||
:description => "The collectd_web install path.", | ||
:required => "optional", | ||
:default => "/srv/collectd_web", | ||
:recipes => [ "collectd::collectd_web" ] | ||
|
||
attribute "collectd/collectd_web/hostname", | ||
:display_name => "collectd_web hostname", | ||
:description => "The collectd_web hostname.", | ||
:required => "optional", | ||
:default => "collectd", | ||
:recipes => [ "collectd::collectd_web" ] |
This file contains hidden or 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 hidden or 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 hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only depends on apache2 if collectd_web is used. We don't use it for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kpumuk Chef doesn't support optional dependencies (in metadata) so technically its a dependency. What the best practice is, I'm not sure but personally I think its better to do this as recipes don't have a mechanism to even check nicely on the cookbook needed (which would also create a lot of extra redundant code in every cookbook that has optional deps).