supports os
end
-depends 'yum_epel'
+depends 'node_commons'
action :create
end
- package 'tar' do
+ pkg = 'tar'
+ resources(:package => pkg) rescue package pkg do
action :install
end
description 'Installs/Configures node_commons'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
+
+%w{ debian ubuntu centos redhat fedora }.each do |os|
+ supports os
+end
+
+depends 'apt'
+depends 'yum'
+
#
-# Cookbook Name:: server_commons
-# Recipe:: default
+# Cookbook Name:: node_commons
+# Recipe:: apt
#
-# Copyright 2013, YOUR_COMPANY_NAME
+# Copyright 2013, whitestar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
+if node[:platform_family] == 'debian' then
+ include_recipe 'apt::default'
+end
+
# limitations under the License.
#
-package 'ntp' do
+pkg = 'ntp'
+resources(:package => pkg) rescue package pkg do
action :install
end
-case node[:platform_family]
- when 'debian'
- service 'ntp' do
- action [:enable, :start]
- supports :status => true, :restart => true, :reload => false
- end
- when 'rhel'
- service 'ntpd' do
- action [:enable, :start]
- supports :status => true, :restart => true, :reload => false
- end
+serv = value_for_platform_family(
+ 'debian' => 'ntp',
+ 'rhel' => 'ntpd'
+)
+
+resources(:service => serv) rescue service serv do
+ action [:enable, :start]
+ supports :status => true, :restart => true, :reload => false
end
#
-# Cookbook Name:: yum_epel
-# Recipe:: default
+# Cookbook Name:: node_commons
+# Recipe:: yum-epel
#
# Copyright 2013, whitestar
#
action :create
end
- package 'tar' do
+ pkg = 'tar'
+ resources(:package => pkg) rescue package pkg do
action :install
end
+++ /dev/null
-# CHANGELOG for server_commons
-
-This file is used to list changes made in each version of server_commons.
-
-## 0.1.0:
-
-* Initial release of server_commons
-
-- - -
-Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
-
-The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
+++ /dev/null
-server_commons Cookbook
-=======================
-TODO: Enter the cookbook description here.
-
-e.g.
-This cookbook makes your favorite breakfast sandwhich.
-
-Requirements
-------------
-TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
-
-e.g.
-#### packages
-- `toaster` - server_commons needs toaster to brown your bagel.
-
-Attributes
-----------
-TODO: List you cookbook attributes here.
-
-e.g.
-#### server_commons::default
-<table>
- <tr>
- <th>Key</th>
- <th>Type</th>
- <th>Description</th>
- <th>Default</th>
- </tr>
- <tr>
- <td><tt>['server_commons']['bacon']</tt></td>
- <td>Boolean</td>
- <td>whether to include bacon</td>
- <td><tt>true</tt></td>
- </tr>
-</table>
-
-Usage
------
-#### server_commons::default
-TODO: Write usage instructions for each cookbook.
-
-e.g.
-Just include `server_commons` in your node's `run_list`:
-
-```json
-{
- "name":"my_node",
- "run_list": [
- "recipe[server_commons]"
- ]
-}
-```
-
-Contributing
-------------
-TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
-
-e.g.
-1. Fork the repository on Github
-2. Create a named feature branch (like `add_component_x`)
-3. Write you change
-4. Write tests for your change (if applicable)
-5. Run the tests, ensuring they all pass
-6. Submit a Pull Request using Github
-
-License and Authors
--------------------
-Authors: TODO: List authors
+++ /dev/null
-name 'server_commons'
-maintainer 'YOUR_COMPANY_NAME'
-maintainer_email 'YOUR_EMAIL'
-license 'Apache 2.0'
-description 'Installs/Configures server_commons'
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.0'
+++ /dev/null
-# CHANGELOG for yum_epel
-
-This file is used to list changes made in each version of yum_epel.
-
-## 0.1.0:
-
-* Initial release of yum_epel
-
-- - -
-Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
-
-The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
+++ /dev/null
-yum_epel Cookbook
-=================
-TODO: Enter the cookbook description here.
-
-e.g.
-This cookbook makes your favorite breakfast sandwhich.
-
-Requirements
-------------
-TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
-
-e.g.
-#### packages
-- `toaster` - yum_epel needs toaster to brown your bagel.
-
-Attributes
-----------
-TODO: List you cookbook attributes here.
-
-e.g.
-#### yum_epel::default
-<table>
- <tr>
- <th>Key</th>
- <th>Type</th>
- <th>Description</th>
- <th>Default</th>
- </tr>
- <tr>
- <td><tt>['yum_epel']['bacon']</tt></td>
- <td>Boolean</td>
- <td>whether to include bacon</td>
- <td><tt>true</tt></td>
- </tr>
-</table>
-
-Usage
------
-#### yum_epel::default
-TODO: Write usage instructions for each cookbook.
-
-e.g.
-Just include `yum_epel` in your node's `run_list`:
-
-```json
-{
- "name":"my_node",
- "run_list": [
- "recipe[yum_epel]"
- ]
-}
-```
-
-Contributing
-------------
-TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
-
-e.g.
-1. Fork the repository on Github
-2. Create a named feature branch (like `add_component_x`)
-3. Write you change
-4. Write tests for your change (if applicable)
-5. Run the tests, ensuring they all pass
-6. Submit a Pull Request using Github
-
-License and Authors
--------------------
-Authors: TODO: List authors
+++ /dev/null
-name 'yum_epel'
-maintainer 'whitestar'
-maintainer_email ''
-license 'Apache 2.0'
-description 'Installs/Configures yum_epel'
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.0'
-
-%w{ debian ubuntu centos redhat fedora }.each do |os|
- supports os
-end
-
-depends 'yum'
action :create
end
- package 'tar' do
+ pkg = 'tar'
+ resources(:package => pkg) rescue package pkg do
action :install
end
--- /dev/null
+name 'apt'
+description 'APT management tools. this role does nothing in other platforms than Debian.'
+
+run_list(
+ 'recipe[node_commons::apt]'
+)
+
+#run_list "recipe[apache2]", "recipe[apache2::mod_ssl]", "role[monitor]"
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+#default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
+#override_attributes "apache2" => { "max_children" => "50" }
description 'Ganglia gmetad default'
run_list(
- 'role[yum_epel]',
+ 'role[yum-epel]',
'recipe[ganglia::gmetad]'
)
description 'Ganglia gmond default'
run_list(
- 'role[yum_epel]',
+ 'role[yum-epel]',
'recipe[ganglia::gmond]'
)
description 'Ganglia web frontend'
run_list(
- 'role[yum_epel]',
+ 'role[yum-epel]',
'recipe[ganglia::web]'
)
description 'Grid administrative station node'
run_list(
+ 'role[node_commons]',
'role[nameservice-client-grid]',
'role[ganglia-gmond]',
'role[chef-workstation]',
description 'Grid Base ganglia gmetad node'
run_list(
+ 'role[node_commons]',
'role[nameservice-client-grid]',
'role[ganglia-gmond]',
'role[ganglia-gmetad]',
description 'Grid provisioning master node'
run_list(
+ 'role[node_commons]',
'role[ganglia-gmond]',
)
run_list(
# TODO:
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]'
)
description 'Grid ZooKeeper colo00 node'
run_list(
+ 'role[node_commons]',
'role[ganglia-gmond]',
'role[zookeeper-colo00-with-security]',
)
--- /dev/null
+name 'node_commons'
+description 'Node common role.'
+
+run_list(
+ 'role[apt]',
+ 'recipe[node_commons]'
+)
+
+#run_list "recipe[apache2]", "recipe[apache2::mod_ssl]", "role[monitor]"
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+#default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
+#override_attributes "apache2" => { "max_children" => "50" }
description 'Pleiades DataNode node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]',
'role[pleiades-node]'
description 'Pleiades ganglia gmetad node'
run_list(
+ 'role[node_commons]',
'role[nameservice-client-grid]',
'role[ganglia-gmond]',
'role[ganglia-gmetad]',
description 'Pleiades gateway node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]',
'role[pleiades-node]',
description 'Pleiades HBase Master node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]',
'role[pleiades-node]'
description 'Pleiades JobTracker node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]',
'role[pleiades-node]'
description 'Pleiades nagios node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]'
)
description 'Pleiades NameNode node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]',
'role[pleiades-node]'
description 'Pleiades proxy node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]'
)
description 'Pleiades workflow node'
run_list(
+ 'role[node_commons]',
'role[grid-realm]',
'role[ganglia-gmond]'
)
run_list(
'role[mocker]',
+ 'role[node_commons]',
'role[chef_utils]',
'role[nameservice-client]',
'role[ganglia-gmond-ucast-localhost]',
-name 'yum_epel'
+name 'yum-epel'
description 'Extra Packages for Enterprise Linux. this role does nothing in other platforms than RHEL.'
run_list(
'recipe[yum]',
- 'recipe[yum_epel]'
+ 'recipe[node_commons::yum-epel]'
)
#run_list "recipe[apache2]", "recipe[apache2::mod_ssl]", "role[monitor]"