diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2010-07-03 12:47:24 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2010-07-03 12:47:24 +0000 |
commit | cc4b9fd4c7be92cd101e2ffeffbd0b8f096e94ae (patch) | |
tree | 9f870fab1e11e4f58542a7d215574c75837f3438 /app-admin/chef-server-webui | |
parent | alpha/sparc stable wrt #325531 (diff) | |
download | gentoo-2-cc4b9fd4c7be92cd101e2ffeffbd0b8f096e94ae.tar.gz gentoo-2-cc4b9fd4c7be92cd101e2ffeffbd0b8f096e94ae.tar.bz2 gentoo-2-cc4b9fd4c7be92cd101e2ffeffbd0b8f096e94ae.zip |
initial ebuild, thanks to Gábor Vészi
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'app-admin/chef-server-webui')
-rw-r--r-- | app-admin/chef-server-webui/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/chef-server-webui/chef-server-webui-0.9.6.ebuild | 69 | ||||
-rw-r--r-- | app-admin/chef-server-webui/files/confd/chef-server-webui | 23 | ||||
-rw-r--r-- | app-admin/chef-server-webui/files/initd/chef-server-webui | 39 | ||||
-rw-r--r-- | app-admin/chef-server-webui/files/webui.rb | 106 | ||||
-rw-r--r-- | app-admin/chef-server-webui/metadata.xml | 10 |
6 files changed, 258 insertions, 0 deletions
diff --git a/app-admin/chef-server-webui/ChangeLog b/app-admin/chef-server-webui/ChangeLog new file mode 100644 index 000000000000..6ee9a3241eee --- /dev/null +++ b/app-admin/chef-server-webui/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-admin/chef-server-webui +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/ChangeLog,v 1.1 2010/07/03 12:47:24 hollow Exp $ + +*chef-server-webui-0.9.6 (03 Jul 2010) + + 03 Jul 2010; Benedikt Böhm <hollow@gentoo.org> + +chef-server-webui-0.9.6.ebuild, +files/confd/chef-server-webui, + +files/initd/chef-server-webui, +files/webui.rb, +metadata.xml: + initial ebuild, thanks to Gábor Vészi + diff --git a/app-admin/chef-server-webui/chef-server-webui-0.9.6.ebuild b/app-admin/chef-server-webui/chef-server-webui-0.9.6.ebuild new file mode 100644 index 000000000000..b23ea595ad1f --- /dev/null +++ b/app-admin/chef-server-webui/chef-server-webui-0.9.6.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/chef-server-webui-0.9.6.ebuild,v 1.1 2010/07/03 12:47:24 hollow Exp $ + +EAPI="2" +USE_RUBY="ruby18" + +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_TASK_TEST="" + +inherit ruby-fakegem + +DESCRIPTION="Configuration management tool" +HOMEPAGE="http://wiki.opscode.com/display/chef" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=dev-db/couchdb-0.10.0 + >=net-misc/rabbitmq-server-1.7.0" + +ruby_add_rdepend "dev-ruby/coderay + dev-ruby/haml + <=dev-ruby/json-1.4.2 + >=dev-ruby/merb-assets-1.1.0 + >=dev-ruby/merb-core-1.1.0 + >=dev-ruby/merb-haml-1.1.0 + >=dev-ruby/merb-helpers-1.1.0 + >=dev-ruby/merb-param-protection-1.1.0 + >=dev-ruby/merb-slices-1.1.0 + dev-ruby/ruby-openid + www-servers/thin" + +pkg_setup() { + enewgroup chef + enewuser chef -1 -1 /var/lib/chef chef +} + +each_ruby_install() { + each_fakegem_install + ruby_fakegem_doins -r app + ruby_fakegem_doins -r config + ruby_fakegem_doins config.ru + ruby_fakegem_doins -r public +} + +all_ruby_install() { + all_fakegem_install + + doinitd "${FILESDIR}/initd/chef-server-webui" + doconfd "${FILESDIR}/confd/chef-server-webui" + + keepdir /etc/chef /var/lib/chef /var/log/chef /var/run/chef + + insinto /etc/chef + doins "${FILESDIR}/webui.rb" + + fowners chef:chef /etc/chef/{,webui.rb} + fowners chef:chef /var/{lib,log,run}/chef +} + +pkg_postinst() { + elog + elog "You should edit or create /etc/chef/webui.rb before starting the service" + elog "with /etc/init.d/chef-server-webui start" + elog +} diff --git a/app-admin/chef-server-webui/files/confd/chef-server-webui b/app-admin/chef-server-webui/files/confd/chef-server-webui new file mode 100644 index 000000000000..28e9d6a1529f --- /dev/null +++ b/app-admin/chef-server-webui/files/confd/chef-server-webui @@ -0,0 +1,23 @@ +# /etc/conf.d/chef-server-webui: config file for /etc/init.d/chef-server-webui + +# The configuration file to use. +#CONFIGFILE="/etc/chef/webui.rb" + +# Number of merb daemons to run for chef-server-webui. +#CLUSTER_NODES=1 + +# The user and group to set privilege to. +#CHEF_USER="chef" +#CHEF_GROUP="chef" + +# Log file location. +#CHEF_SERVER_WEBUI_LOGFILE="/var/log/chef/server-webui.log" + +# Any radom options you want to pass to chef-server. +#CHEF_SERVER_WEBUI_OPTS="" + +# Path to the chef server webui binary. +#CHEF_SERVER_WEBUI_BINARY="/usr/bin/chef-server-webui" + +# PID file location. +#CHEF_SERVER_WEBUI_PIDFILE="/var/run/chef/server-webui.%s.pid" diff --git a/app-admin/chef-server-webui/files/initd/chef-server-webui b/app-admin/chef-server-webui/files/initd/chef-server-webui new file mode 100644 index 000000000000..369a4e179507 --- /dev/null +++ b/app-admin/chef-server-webui/files/initd/chef-server-webui @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net couchdb rabbitmq chef-solr-indexer + after chef-server +} + +CHEF_SERVER_WEBUI_BINARY=${CHEF_SERVER_WEBUI_BINARY:-/usr/bin/chef-server-webui} +CHEF_SERVER_WEBUI_PIDFILE=${CHEF_SERVER_WEBUI_PIDFILE:-/var/run/chef/server-webui.%s.pid} +CHEF_SERVER_WEBUI_LOGFILE=${CHEF_SERVER_WEBUI_LOGFILE:-/var/log/chef/server-webui.log} +CONFIGFILE=${CONFIGFILE:-/etc/chef/webui.rb} +CLUSTER_NODES=${CLUSTER_NODES:-1} +CHEF_USER=${CHEF_USER:-chef} +CHEF_GROUP=${CHEF_GROUP:-chef} + +# TODO: this could be nicer +DEFAULT_CHEF_DIRS=( /etc/chef /var/lib/chef /var/log/chef /var/run/chef ) +CHEF_DIRS=( ${CHEF_DIRS[@]:-${DEFAULT_CHEF_DIRS[@]}} ) + +fix_dir_owners() { + for DIR in ${CHEF_DIRS[@]} ; do chown ${CHEF_USER}:${CHEF_GROUP} ${DIR} ; done +} + +start() { + ebegin "Starting Chef server web interface" + fix_dir_owners + ${CHEF_SERVER_WEBUI_BINARY} -d -P ${CHEF_SERVER_WEBUI_PIDFILE} --name \ + chef-server-webui -C ${CONFIGFILE} -u ${CHEF_USER} -G ${CHEF_GROUP} \ + -c ${CLUSTER_NODES} -L ${CHEF_SERVER_WEBUI_LOGFILE} > /dev/null + eend $? +} + +stop() { + ebegin "Shutting down Chef server web interface" + ${CHEF_SERVER_WEBUI_BINARY} -K all -P ${CHEF_SERVER_WEBUI_PIDFILE} > /dev/null + eend $? +} diff --git a/app-admin/chef-server-webui/files/webui.rb b/app-admin/chef-server-webui/files/webui.rb new file mode 100644 index 000000000000..6c4a7f909487 --- /dev/null +++ b/app-admin/chef-server-webui/files/webui.rb @@ -0,0 +1,106 @@ +# Configuration File For Chef (chef-server-webui) +# +# chef-server-webui is a Merb application slice. By default it is configured to +# run via Thin, the default Merb adapter. This should be run as: +# +# chef-server-webui -p 4040 -e production -a thin +# +# This starts up the Chef Server WebUI on port 4040 in production mode using +# the thin server adapter. +# +# This file configures the behavior of the running server itself. +# +# 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 server should log to. +# valid values are: a quoted string specifying a file, or STDOUT with +# no quotes. This is the application log for the Merb workers that get +# spawned. + +log_location "/var/log/chef/server-webui.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 + +# chef_server_url specifies the URL for the server API. The process actually +# listens on 0.0.0.0:PORT. +# valid values are any HTTP URL. + +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" + +# openid_store_path specifies a location where to keep openid nonces for clients. +# valid values are any filesystem directory location. +# +# NOTE: OpenID is deprecated and this option may not be used, kept for +# historical purposes. + +openid_store_path "/var/lib/chef/openid/store" + +# openid_store_path specifies a location where to keep openid nonces for clients. +# valid values are any filesystem directory location. +# +# NOTE: OpenID is deprecated and this option may not be used, kept for +# historical purposes and may be removed. + +openid_cstore_path "/var/lib/chef/openid/cstore" + +# 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 + +signing_ca_cert "/etc/chef/certificates/cert.pem" +signing_ca_key "/etc/chef/certificates/key.pem" + +# web_ui_client_name specifies the user to use when accessing the Chef +# Server API. By default this is already set to "chef-webui". +# +# This user gets created by the chef-server and stored in CouchDB the +# first time the server starts up if the user and key don't exist. + +web_ui_client_name "chef-webui" + +# web_ui_admin_user_name and web_ui_admin_default_password specify the +# user and password that a human can use to initially log into the +# chef-server-webui when it starts. The default value for the user is 'admin' +# and the default password is'p@ssw0rd1' should be changed immediately on +# login. The web form will display the password reset page on first login. + +web_ui_admin_user_name "admin" +web_ui_admin_default_password "p@ssw0rd1" + +# web_ui_key specifics the file to use for authenticating with the Chef +# Server API. By default this is already set to "/etc/chef/webui.pem". +# +# This file gets created by the chef-server and the public key stored in +# CouchDB the first time the server starts up if the user and key don't +# exist. + +web_ui_key "/etc/chef/webui.pem" diff --git a/app-admin/chef-server-webui/metadata.xml b/app-admin/chef-server-webui/metadata.xml new file mode 100644 index 000000000000..b263a5bc4f28 --- /dev/null +++ b/app-admin/chef-server-webui/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> + |