Kouhei Sutou
null+****@clear*****
Fri Feb 22 17:10:33 JST 2013
Kouhei Sutou 2013-02-22 17:10:33 +0900 (Fri, 22 Feb 2013) New Revision: 32ff45c16cc331e6ad0acf46c187682039594944 https://github.com/groonga/chef-cookbooks/commit/32ff45c16cc331e6ad0acf46c187682039594944 Log: Add Chef cookbook for groonga It just installs groonga as package on Debian family for now. Added files: groonga/CHANGELOG.md groonga/README.md groonga/metadata.rb groonga/recipes/default.rb groonga/templates/default/groonga.list.erb Added: groonga/CHANGELOG.md (+7 -0) 100644 =================================================================== --- /dev/null +++ groonga/CHANGELOG.md 2013-02-22 17:10:33 +0900 (5566539) @@ -0,0 +1,7 @@ +# CHANGELOG for groonga + +This file is used to list changes made in each version of groonga. + +## 1.0.0: + +* Initial release of groonga Added: groonga/README.md (+83 -0) 100644 =================================================================== --- /dev/null +++ groonga/README.md 2013-02-22 17:10:33 +0900 (804c6b3) @@ -0,0 +1,83 @@ +groonga Cookbook +================ + +This cookbook installs and configures groonga. Groonga is an +open-source fulltext search engine and column store. + +Requirements +------------ + +#### Platform + +- Debian GNU/Linux +- Ubuntu +- CentOS +- Scientific Linux +- Amazon Linux +- Red Hat +- Fedora +- FreeBSD +- Windows +- Mac OS X + +#### Packages + +- `apt` - for deb based package system +- `yum` - for RPM based package system +- `homebrew` - for Mac OS X + +Attributes +---------- + +e.g. +#### groonga::default +<table> + <tr> + <th>Key</th> + <th>Type</th> + <th>Description</th> + <th>Default</th> + </tr> + <tr> + <td><tt>['groonga']['bacon']</tt></td> + <td>Boolean</td> + <td>whether to include bacon</td> + <td><tt>true</tt></td> + </tr> +</table> + +Usage +----- + +#### groonga::default +TODO: Write usage instructions for each cookbook. + +e.g. +Just include `groonga` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[groonga]" + ] +} +``` + +Contributing +------------ + +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 +------------------- + +License: Apache 2.0 + +Authors: Kouhei Sutou <kou �� clear-code.com> Added: groonga/metadata.rb (+20 -0) 100644 =================================================================== --- /dev/null +++ groonga/metadata.rb 2013-02-22 17:10:33 +0900 (3aa4a23) @@ -0,0 +1,20 @@ +name 'groonga' +maintainer 'The groonga project' +maintainer_email 'groonga �� razil.jp' +license 'Apache 2.0' +description 'Installs/Configures groonga' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '1.0.0' + +recipe "groonga", "Installs and configures groonga" + +supports "ubuntu" +supports "ubuntu" +supports "centos" +supports "redhat" +supports "scientific" +supports "amazon" +supports "fedora" +supports "freebsd" +supports "windows" +supports "mac_os_x" Added: groonga/recipes/default.rb (+41 -0) 100644 =================================================================== --- /dev/null +++ groonga/recipes/default.rb 2013-02-22 17:10:33 +0900 (765fa30) @@ -0,0 +1,41 @@ +# Cookbook Name:: groonga +# Recipe:: default +# License:: Apache 2.0 +# +# Copyright 2013 Kouhei Sutou <kou �� clear-code.com> + +if platform_family?("debian") + package "lsb-release" do + action [:install] + end + + template "/etc/apt/sources.list.d/groonga.list" do + extend Chef::Mixin::ShellOut + source "groonga.list.erb" + platform = node.platform + apt_policy = shell_out!("apt-cache", "policy").stdout + if /(?:[an]=)(?:unstable|sid),/ =~ apt_policy + code_name = "unstable" + else + code_name = shell_out!("lsb_release", "--short", "--codename").stdout.strip + end + case platform + when "debian" + component = "main" + when "ubuntu" + component = "universe" + end + variables(:platform => platform, + :code_name => code_name, + :component => component) + end + + package "groonga-keyring" do + options("--allow-unauthenticated") + action [:install] + end +end + +package "groonga" do + action [:install] +end Added: groonga/templates/default/groonga.list.erb (+2 -0) 100644 =================================================================== --- /dev/null +++ groonga/templates/default/groonga.list.erb 2013-02-22 17:10:33 +0900 (768da47) @@ -0,0 +1,2 @@ +deb http://packages.groonga.org/<%= @platform %>/ <%= @code_name %> <%= @component %> +deb-src http://packages.groonga.org/<%= @platform %>/ <%= @code_name %> <%= @component %> -------------- next part -------------- HTML����������������������������...다운로드