-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add templates from http://jenkins-php.org/
- Loading branch information
Showing
33 changed files
with
2,159 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
= DESCRIPTION: | ||
|
||
Installs git. | ||
|
||
= REQUIREMENTS: | ||
|
||
== Cookbooks: | ||
|
||
Opscode Cookbooks (http://github.com/opscode/cookbooks/tree/master) | ||
|
||
* runit | ||
|
||
= USAGE: | ||
|
||
This cookbook primarily installs git core packages. It can also be used to serve git repositories. | ||
|
||
include_recipe "git::server" | ||
|
||
This creates the directory /srv/git and starts a git daemon, exporting all repositories found. Repositories need to be added manually, but will be available once they are created. | ||
|
||
= 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 | ||
limitations under the License. |
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,43 @@ | ||
{ | ||
"name": "git", | ||
"description": "Installs git and/or sets up a Git server daemon", | ||
"long_description": "= DESCRIPTION:\n\nInstalls git.\n\n= REQUIREMENTS:\n\n== Cookbooks:\n\nOpscode Cookbooks (http://github.com/opscode/cookbooks/tree/master)\n\n* runit\n\n= USAGE:\n\nThis cookbook primarily installs git core packages. It can also be used to serve git repositories.\n\n include_recipe \"git::server\"\n\nThis creates the directory /srv/git and starts a git daemon, exporting all repositories found. Repositories need to be added manually, but will be available once they are created.\n\n= LICENSE and AUTHOR:\n \nAuthor:: Joshua Timberman (<joshua@opscode.com>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", | ||
"maintainer": "Opscode, Inc.", | ||
"maintainer_email": "cookbooks@opscode.com", | ||
"license": "Apache 2.0", | ||
"platforms": { | ||
"ubuntu": [ | ||
|
||
], | ||
"debian": [ | ||
|
||
], | ||
"arch": [ | ||
|
||
] | ||
}, | ||
"dependencies": { | ||
"runit": [ | ||
|
||
] | ||
}, | ||
"recommendations": { | ||
}, | ||
"suggestions": { | ||
}, | ||
"conflicting": { | ||
}, | ||
"providing": { | ||
}, | ||
"replacing": { | ||
}, | ||
"attributes": { | ||
}, | ||
"groupings": { | ||
}, | ||
"recipes": { | ||
"git": "Installs git", | ||
"git::server": "Sets up a runit_service for git daemon" | ||
}, | ||
"version": "0.9.0" | ||
} |
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,16 @@ | ||
maintainer "Opscode, Inc." | ||
maintainer_email "cookbooks@opscode.com" | ||
license "Apache 2.0" | ||
description "Installs git and/or sets up a Git server daemon" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) | ||
version "0.9.0" | ||
recipe "git", "Installs git" | ||
recipe "git::server", "Sets up a runit_service for git daemon" | ||
|
||
%w{ ubuntu debian arch}.each do |os| | ||
supports os | ||
end | ||
|
||
%w{ runit }.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,24 @@ | ||
# | ||
# Cookbook Name:: git | ||
# Recipe:: default | ||
# | ||
# Copyright 2008-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 | ||
# limitations under the License. | ||
|
||
case node[:platform] | ||
when "debian", "ubuntu" | ||
package "git-core" | ||
else | ||
package "git" | ||
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,34 @@ | ||
# | ||
# Cookbook Name:: git | ||
# Recipe:: server | ||
# | ||
# 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 | ||
# limitations under the License. | ||
|
||
include_recipe "git" | ||
|
||
directory "/srv/git" do | ||
owner "root" | ||
group "root" | ||
mode 0755 | ||
end | ||
|
||
case node[:platform] | ||
when "debian", "ubuntu" | ||
include_recipe "runit" | ||
runit_service "git-daemon" | ||
else | ||
log "Platform requires setting up a git daemon service script." | ||
log "Hint: /usr/bin/git daemon --export-all --user=nobody --group=daemon --base-path=/srv/git" | ||
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,2 @@ | ||
#!/bin/sh | ||
exec svlogd -tt ./main |
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,3 @@ | ||
#!/bin/sh | ||
exec 2>&1 | ||
exec /usr/bin/git daemon --export-all --user=nobody --group=daemon --base-path=/srv/git /srv/git |
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,31 @@ | ||
# | ||
# Author:: Joshua Timberman (<joshua@opscode.com>) | ||
# Cookbook Name:: php | ||
# Recipe:: pear_channel | ||
# | ||
# 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 | ||
# limitations under the License. | ||
# | ||
|
||
define :pear_channel, :channel => nil, :enable => true do | ||
|
||
include_recipe "php::pear" | ||
|
||
if params[:enable] | ||
execute "/usr/bin/pear channel-discover #{params[:channel]}" do | ||
only_if "/bin/sh -c '! /usr/bin/pear/channel-info #{params[:channel]} 2>&1 1>/dev/null" | ||
end | ||
end | ||
|
||
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,31 @@ | ||
# | ||
# Author:: Joshua Timberman (<joshua@opscode.com>) | ||
# Cookbook Name:: php | ||
# Recipe:: pear_module | ||
# | ||
# 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 | ||
# limitations under the License. | ||
# | ||
|
||
define :pear_module, :module => nil, :enable => true do | ||
|
||
include_recipe "php::pear" | ||
|
||
if params[:enable] | ||
execute "/usr/bin/pear install -a #{params[:module]}" do | ||
only_if "/bin/sh -c '! /usr/bin/pear info #{params[:module]} 2>&1 1>/dev/null" | ||
end | ||
end | ||
|
||
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,42 @@ | ||
# | ||
# Author:: Joshua Timberman (<joshua@opscode.com>) | ||
# Cookbook Name:: php | ||
# Recipe:: php_app | ||
# | ||
# 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 | ||
# limitations under the License. | ||
# | ||
# php_app will be deprecated for web_app (apache2 cookbook). | ||
|
||
define :php_app, :docroot => nil, :canonical_hostname => nil, :template => "php/php.conf.erb" do | ||
|
||
application_name = params[:name] | ||
|
||
include_recipe "apache2" | ||
include_recipe "apache2::mod_rewrite" | ||
include_recipe "apache2::mod_deflate" | ||
include_recipe "apache2::mod_headers" | ||
|
||
template "/etc/apache2/sites-available/#{params[:name]}.conf" do | ||
source "#{params[:template]}" | ||
variables :docroot => params[:docroot], :canonical_hostname => params[:canonical_hostname] | ||
owner "root" | ||
group "root" | ||
mode 0644 | ||
notifies :reload, resources("service[apache2]"), :delayed | ||
end | ||
|
||
apache_site "#{params[:name]}.conf" | ||
|
||
end |
Oops, something went wrong.