forked from chef-boneyard/cookbooks
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into hobodave/COOK-230
- Loading branch information
Showing
8 changed files
with
129 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
= DESCRIPTION: | ||
|
||
Installs instiki, a Ruby on Rails wiki server under passenger+Apache2. | ||
|
||
= REQUIREMENTS: | ||
|
||
Opscode cookbooks: | ||
|
||
* apache2 | ||
* passenger_apache2 | ||
* sqlite | ||
* rails | ||
|
||
= USAGE: | ||
|
||
Simply apply the 'instiki' recipe. This installs version 0.17 in /srv/instiki/instiki-0.17. A later version of this cookbook might support setting the version and a different installation path, but for now these are hardcoded. | ||
|
||
= LICENSE and AUTHOR: | ||
|
||
Author:: Joshua Timberman <joshua@opscode.com> | ||
|
||
Copyright 2009, Opscode, Inc | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
maintainer "Opscode" | ||
maintainer_email "joshua@opscode.com" | ||
license "Apache 2.0" | ||
description "Installs instiki, a Ruby on Rails wiki server under passenger+Apache2." | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) | ||
version "0.1" | ||
|
||
%w{ apache2 passenger_apache2 sqlite rails }.each do |cb| | ||
depends cb | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Cookbook Name:: instiki | ||
# Recipe:: default | ||
# | ||
# Copyright 2009, Opscode | ||
# | ||
# 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. | ||
# | ||
|
||
include_recipe "sqlite" | ||
include_recipe "rails" | ||
include_recipe "apache2" | ||
include_recipe "apache2::mod_rewrite" | ||
include_recipe "passenger_apache2" | ||
include_recipe "passenger_apache2::mod_rails" | ||
|
||
remote_file "/tmp/instiki-0.17.tar.gz" do | ||
source "http://rubyforge.org/frs/download.php/59127/instiki-0.17.tgz" | ||
mode 0644 | ||
owner "root" | ||
group "root" | ||
not_if { ::FileTest.exists?("/tmp/instiki-0.17.tar.gz") } | ||
end | ||
|
||
directory "/srv/instiki" do | ||
owner node[:apache][:user] | ||
end | ||
|
||
execute "tar zxf /tmp/instiki-0.17.tar.gz -C /srv/instiki" do | ||
user node[:apache][:user] | ||
creates "/srv/instiki/instiki-0.17/instiki" | ||
end | ||
|
||
web_app "instiki" do | ||
docroot "/srv/instiki/instiki-0.17/public" | ||
template "instiki.conf.erb" | ||
server_name "wiki.#{node[:domain]}" | ||
server_aliases [ "wiki", "instiki", node[:hostname] ] | ||
rails_env "production" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<VirtualHost *:80> | ||
ServerName <%= @params[:server_name] %> | ||
ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %> | ||
DocumentRoot <%= @params[:docroot] %> | ||
|
||
RailsBaseURI / | ||
RailsEnv <%= @params[:rails_env] %> | ||
|
||
<Directory <%= @params[:docroot] %>> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
|
||
LogLevel info | ||
ErrorLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log | ||
CustomLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined | ||
</VirtualHost> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,6 @@ | |
|
||
else | ||
r = gem_package "mysql" do | ||
version "2.7" | ||
action :nothing | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters