diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2010-07-03 12:36:13 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2010-07-03 12:36:13 +0000 |
commit | 1069b5e4f0e1bf8a64b10e2891e8e7883b43c3fd (patch) | |
tree | 3eadfacc40d9611f01cfe3a6bdecc98e942342a6 /app-admin/chef | |
parent | initial ebuild, thanks to Gábor Vészi (diff) | |
download | gentoo-2-1069b5e4f0e1bf8a64b10e2891e8e7883b43c3fd.tar.gz gentoo-2-1069b5e4f0e1bf8a64b10e2891e8e7883b43c3fd.tar.bz2 gentoo-2-1069b5e4f0e1bf8a64b10e2891e8e7883b43c3fd.zip |
initial ebuild, thanks to Gábor Vészi
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'app-admin/chef')
-rw-r--r-- | app-admin/chef/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/chef/chef-0.9.6.ebuild | 54 | ||||
-rw-r--r-- | app-admin/chef/files/client.rb | 65 | ||||
-rw-r--r-- | app-admin/chef/files/confd/chef-client | 19 | ||||
-rw-r--r-- | app-admin/chef/files/initd/chef-client | 27 | ||||
-rw-r--r-- | app-admin/chef/files/solo.rb | 49 | ||||
-rw-r--r-- | app-admin/chef/metadata.xml | 10 |
7 files changed, 235 insertions, 0 deletions
diff --git a/app-admin/chef/ChangeLog b/app-admin/chef/ChangeLog new file mode 100644 index 000000000000..36b40051feb2 --- /dev/null +++ b/app-admin/chef/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-admin/chef +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/chef/ChangeLog,v 1.1 2010/07/03 12:36:12 hollow Exp $ + +*chef-0.9.6 (03 Jul 2010) + + 03 Jul 2010; Benedikt Böhm <hollow@gentoo.org> +chef-0.9.6.ebuild, + +files/client.rb, +files/confd/chef-client, +files/initd/chef-client, + +files/solo.rb, +metadata.xml: + initial ebuild, thanks to Gábor Vészi + diff --git a/app-admin/chef/chef-0.9.6.ebuild b/app-admin/chef/chef-0.9.6.ebuild new file mode 100644 index 000000000000..52c77ef298aa --- /dev/null +++ b/app-admin/chef/chef-0.9.6.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/chef/chef-0.9.6.ebuild,v 1.1 2010/07/03 12:36:12 hollow Exp $ + +EAPI="2" +USE_RUBY="ruby18" + +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_TASK_TEST="" + +inherit ruby-fakegem + +DESCRIPTION="Chef is a systems integration framework" +HOMEPAGE="http://wiki.opscode.com/display/chef" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +ruby_add_rdepend ">=dev-ruby/bunny-0.6.0 + dev-ruby/erubis + dev-ruby/extlib + dev-ruby/highline + <=dev-ruby/json-1.4.2 + >=dev-ruby/mixlib-authentication-1.1.0 + >=dev-ruby/mixlib-cli-1.1.0 + >=dev-ruby/mixlib-config-1.1.0 + >=dev-ruby/mixlib-log-1.1.0 + dev-ruby/moneta + >=dev-ruby/ohai-0.5.0 + >=dev-ruby/rest-client-1.0.4 + <=dev-ruby/rest-client-1.5.1 + dev-ruby/uuidtools" + +all_ruby_install() { + all_fakegem_install + + keepdir /etc/chef /var/lib/chef /var/log/chef /var/run/chef + + doinitd "${FILESDIR}/initd/chef-client" + doconfd "${FILESDIR}/confd/chef-client" + + insinto /etc/chef + doins "${FILESDIR}/client.rb" + doins "${FILESDIR}/solo.rb" +} + +pkg_postinst() { + elog + elog "You should edit /etc/chef/client.rb before starting the service with" + elog "/etc/init.d/chef-client start" + elog +} diff --git a/app-admin/chef/files/client.rb b/app-admin/chef/files/client.rb new file mode 100644 index 000000000000..a32a9c931636 --- /dev/null +++ b/app-admin/chef/files/client.rb @@ -0,0 +1,65 @@ +# Configuration File For Chef (chef-client) +# +# The chef-client program will connect the local system to the specified +# server URLs through a RESTful API to retrieve its configuration. +# +# By default, the client is configured to connect to a Chef Server +# running on the local system. Change this to reflect your environment. +# +# Chef uses a Ruby DSL for configuration, and this file contains a few +# Ruby idioms. First, symbols. These are designated by a colon sigil, ie, +# :value. Second, in Ruby, everything but false and nil (no quotes or other +# designations) is true, including true, the integer 0 and the string "false". +# So to set the value of a setting to false, write: +# +# some_setting false +# +# Third, Ruby class methods can be used, for example we tell the log to show +# the current time stamp with Chef::Log::Formatter.show_time, below. +# +# log_level specifies the level of verbosity for output. +# valid values are: :debug, :info, :warn, :error, :fatal + +log_level :info + +# log_location specifies where the client should log to. +# valid values are: a quoted string specifying a file, or STDOUT with +# no quotes. When run as a daemon (default), STDOUT will produce no output. + +log_location "/var/log/chef/client.log" + +# ssl_verify_mode specifies if the REST client should verify SSL certificates. +# valid values are :verify_none, :verify_peer. The default Chef Server +# installation will use a self-generated SSL certificate so this should be +# :verify_none unless you replace the certificate. + +ssl_verify_mode :verify_none + +# Server URLs. +# +# chef_server_url specifies the Chef Server to connect to. +# valid values are any HTTP URL (e.g. https://chef.example.com:4443). + +chef_server_url "http://localhost:4000" + +# file_cache_path specifies where the client should cache cookbooks, server +# cookie ID, and openid registration data. +# valid value is any filesystem directory location. + +file_cache_path "/var/lib/chef/cache" + +file_backup_path "/var/lib/chef/backup" + +# pid_file specifies the location of where chef-client daemon should keep the pid +# file. +# valid value is any filesystem file location. + +pid_file "/var/run/chef/client.pid" + +# Mixlib::Log::Formatter.show_time specifies whether the chef-client +# log should contain timestamps. valid values are true or false (no +# quotes, see above about Ruby idioms). The printed timestamp is +# rfc2822, for example: +# Fri, 31 Jul 2009 19:19:46 -0600 + +Mixlib::Log::Formatter.show_time = true diff --git a/app-admin/chef/files/confd/chef-client b/app-admin/chef/files/confd/chef-client new file mode 100644 index 000000000000..b32d70f88736 --- /dev/null +++ b/app-admin/chef/files/confd/chef-client @@ -0,0 +1,19 @@ +# /etc/conf.d/chef-client: config file for /etc/init.d/chef-client + +# The configuration file to use. +#CONFIGFILE="/etc/chef/client.rb" + +# Run chef-client periodically, in seconds. +#INTERVAL=1800 + +# The splay time for running at intervals, in seconds. +#SPLAY=20 + +# Any radom options you want to pass to chef. +#CHEF_CLIENT_OPTS="" + +# Path to the chef client binary. +#CHEF_CLIENT_BINARY="/usr/bin/chef-client" + +# PID file location. +#CHEF_CLIENT_PIDFILE="/var/run/chef/client.pid" diff --git a/app-admin/chef/files/initd/chef-client b/app-admin/chef/files/initd/chef-client new file mode 100644 index 000000000000..4c50564abf5b --- /dev/null +++ b/app-admin/chef/files/initd/chef-client @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +CHEF_CLIENT_BINARY=${CHEF_CLIENT_BINARY:-/usr/bin/chef-client} +CHEF_CLIENT_PIDFILE=${CHEF_CLIENT_PIDFILE:-/var/run/chef/client.pid} +CONFIGFILE=${CONFIGFILE:-/etc/chef/client.rb} +INTERVAL=${INTERVAL:-1800} +SPLAY=${SPLAY:-20} + +start() { + ebegin "Starting Chef client" + start-stop-daemon --start --quiet --pidfile ${CHEF_CLIENT_PIDFILE} \ + --exec ${CHEF_CLIENT_BINARY} -- -d -c ${CONFIGFILE} \ + -i ${INTERVAL} -s ${SPLAY} ${CHEF_CLIENT_OPTS} + eend $? +} + +stop() { + ebegin "Shutting down Chef client" + start-stop-daemon --stop --quiet --pidfile ${CHEF_CLIENT_PIDFILE} + eend $? +} diff --git a/app-admin/chef/files/solo.rb b/app-admin/chef/files/solo.rb new file mode 100644 index 000000000000..250dd393ca2e --- /dev/null +++ b/app-admin/chef/files/solo.rb @@ -0,0 +1,49 @@ +# Configuration File For Chef Solo (chef-solo) +# +# The program chef-solo allows you to run Chef as a standalone program +# without connecting to a remote Chef Server. +# +# Chef uses a Ruby DSL for configuration, and this file may contain some +# Ruby idioms. First, symbols. These are designated by a colon sigil, ie, +# :value. Second, in Ruby, everything but false and nil (no quotes or other +# designations) is true, including true, the integer 0 and the string "false". +# So to set the value of a setting to false, write: +# +# some_setting false +# +# Third, Ruby class methods can be used, for example we tell the log to show +# the current time stamp with Mixlib::Log::Formatter.show_time, below. +# +# log_level specifies the level of verbosity for output. +# valid values are: :debug, :info, :warn, :error, :fatal + +log_level :info + +# log_location specifies where the client should log to. +# valid values are: a quoted string specifying a file, or STDOUT with +# no quotes. + +log_location "/var/log/chef/solo.log" + +# file_cache_path specifies where solo should look for the cookbooks to use +# valid value is any filesystem directory location. This is slightly +# different from 'normal' client mode as solo is actually downloading (or +# using) the specified cookbooks in this location. + +file_cache_path "/var/lib/chef" + +# cookbook_path specifies where solo should look for cookbooks it will use. +# valid value is a string, or array of strings of filesystem directory locations. +# This setting is similar to the server setting of the same name. Solo will use +# this as a search location, in Array order. It should be a subdirectory of +# file_cache_path, above. + +cookbook_path [ "/var/lib/chef/cookbooks" ] + +# Mixlib::Log::Formatter.show_time specifies whether the chef-client log should +# contain timestamps. +# valid values are true or false (no quotes, see above about Ruby idioms). The +# printed timestamp is rfc2822, for example: +# Fri, 31 Jul 2009 19:19:46 -0600 + +Mixlib::Log::Formatter.show_time = true diff --git a/app-admin/chef/metadata.xml b/app-admin/chef/metadata.xml new file mode 100644 index 000000000000..b263a5bc4f28 --- /dev/null +++ b/app-admin/chef/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>hollow@gentoo.org</email> + <name>Benedikt Böhm</name> + </maintainer> +</pkgmetadata> + |