OSDN Git Service

add chef_utils recipe.
authorwhitestar <whitestar@gaea.test>
Sun, 23 Jun 2013 08:41:08 +0000 (17:41 +0900)
committerwhitestar <whitestar@gaea.test>
Sun, 23 Jun 2013 08:41:08 +0000 (17:41 +0900)
12 files changed:
cookbooks/chef_utils/CHANGELOG.md [new file with mode: 0644]
cookbooks/chef_utils/README.md [new file with mode: 0644]
cookbooks/chef_utils/metadata.rb [new file with mode: 0644]
cookbooks/chef_utils/recipes/default.rb [new file with mode: 0644]
nodes/adm00.grid.example.com.rb [new file with mode: 0644]
nodes/zk00.grid.example.com.rb
nodes/zk01.grid.example.com.rb
nodes/zk02.grid.example.com.rb
roles/chef-workstation.rb [new file with mode: 0644]
roles/chef_utils.rb [new file with mode: 0644]
roles/grid-adm.rb [new file with mode: 0644]
roles/grid-zk-colo00.rb [new file with mode: 0644]

diff --git a/cookbooks/chef_utils/CHANGELOG.md b/cookbooks/chef_utils/CHANGELOG.md
new file mode 100644 (file)
index 0000000..c3a1e26
--- /dev/null
@@ -0,0 +1,12 @@
+# CHANGELOG for chef_utils
+
+This file is used to list changes made in each version of chef_utils.
+
+## 0.1.0:
+
+* Initial release of chef_utils
+
+- - -
+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.
diff --git a/cookbooks/chef_utils/README.md b/cookbooks/chef_utils/README.md
new file mode 100644 (file)
index 0000000..c25575e
--- /dev/null
@@ -0,0 +1,68 @@
+chef_utils 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` - chef_utils needs toaster to brown your bagel.
+
+Attributes
+----------
+TODO: List you cookbook attributes here.
+
+e.g.
+#### chef_utils::default
+<table>
+  <tr>
+    <th>Key</th>
+    <th>Type</th>
+    <th>Description</th>
+    <th>Default</th>
+  </tr>
+  <tr>
+    <td><tt>['chef_utils']['bacon']</tt></td>
+    <td>Boolean</td>
+    <td>whether to include bacon</td>
+    <td><tt>true</tt></td>
+  </tr>
+</table>
+
+Usage
+-----
+#### chef_utils::default
+TODO: Write usage instructions for each cookbook.
+
+e.g.
+Just include `chef_utils` in your node's `run_list`:
+
+```json
+{
+  "name":"my_node",
+  "run_list": [
+    "recipe[chef_utils]"
+  ]
+}
+```
+
+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
diff --git a/cookbooks/chef_utils/metadata.rb b/cookbooks/chef_utils/metadata.rb
new file mode 100644 (file)
index 0000000..c6ead1e
--- /dev/null
@@ -0,0 +1,7 @@
+name             'chef_utils'
+maintainer       'whitestar'
+maintainer_email ''
+license          'Apache 2.0'
+description      'Installs/Configures chef_utils'
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version          '0.1.0'
diff --git a/cookbooks/chef_utils/recipes/default.rb b/cookbooks/chef_utils/recipes/default.rb
new file mode 100644 (file)
index 0000000..f2846fe
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Cookbook Name:: chef_utils
+# Recipe:: default
+#
+# 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.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+chef_gem 'bracecomp' do
+  action :install
+end
+
diff --git a/nodes/adm00.grid.example.com.rb b/nodes/adm00.grid.example.com.rb
new file mode 100644 (file)
index 0000000..6e35c6f
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "run_list": [
+    "role[grid-adm]"
+  ]
+}
index 3b8f9a7..ac1f69b 100644 (file)
@@ -1,5 +1,5 @@
 {
   "run_list": [
-    "role[zookeeper-colo00-with-security]"
+    "role[grid-zk-colo00]"
   ]
 }
index 3b8f9a7..ac1f69b 100644 (file)
@@ -1,5 +1,5 @@
 {
   "run_list": [
-    "role[zookeeper-colo00-with-security]"
+    "role[grid-zk-colo00]"
   ]
 }
index 3b8f9a7..ac1f69b 100644 (file)
@@ -1,5 +1,5 @@
 {
   "run_list": [
-    "role[zookeeper-colo00-with-security]"
+    "role[grid-zk-colo00]"
   ]
 }
diff --git a/roles/chef-workstation.rb b/roles/chef-workstation.rb
new file mode 100644 (file)
index 0000000..bb6817e
--- /dev/null
@@ -0,0 +1,14 @@
+name 'chef-workstation'
+description 'Chef workstation node'
+
+run_list(
+  'role[chef_utils]'
+)
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+override_attributes(
+)
diff --git a/roles/chef_utils.rb b/roles/chef_utils.rb
new file mode 100644 (file)
index 0000000..6aec2c2
--- /dev/null
@@ -0,0 +1,11 @@
+name 'chef_utils'
+description 'Chef utility libraries'
+
+run_list(
+  'recipe[chef_utils]',
+)
+
+#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" }
diff --git a/roles/grid-adm.rb b/roles/grid-adm.rb
new file mode 100644 (file)
index 0000000..f219008
--- /dev/null
@@ -0,0 +1,14 @@
+name 'grid-adm'
+description 'Grid administration node'
+
+run_list(
+  'role[chef-workstation]',
+)
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+override_attributes(
+)
diff --git a/roles/grid-zk-colo00.rb b/roles/grid-zk-colo00.rb
new file mode 100644 (file)
index 0000000..b0d0974
--- /dev/null
@@ -0,0 +1,14 @@
+name 'grid-zk-colo00'
+description 'Grid ZooKeeper colo00 node'
+
+run_list(
+  'role[zookeeper-colo00-with-security]',
+)
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+override_attributes(
+)