Permalink
Browse files

Cleaned up packages; added verification steps; added README/LICENSE

  • Loading branch information...
1 parent cd9a381 commit a97be303435a39ebf8490f0e800546d3085efc23 @jferris jferris committed Mar 28, 2011
Showing with 112 additions and 10 deletions.
  1. +19 −0 LICENSE
  2. +35 −0 README.md
  3. +5 −5 main.rb
  4. +3 −0 packages/apache.rb
  5. +23 −4 packages/hudson.rb
  6. +4 −0 packages/mysql.rb
  7. +5 −0 packages/postgres.rb
  8. +4 −1 packages/redis.rb
  9. +14 −0 packages/ruby.rb
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 thoughtbot, inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -0,0 +1,35 @@
+Continuous Sprinkles
+====================
+
+Continuous Sprinkles is a [Sprinkle](https://github.com/crafterm/sprinkle) recipe to setup a Hudson CI server for Ruby development. It provides:
+
+* Hudson
+* Apache proxy to Hudson
+* MySQL
+* Postgres
+* Redis
+* Ruby
+
+Usage
+-----
+
+You need to install Sprinkle:
+
+ gem install sprinkle
+
+Check out the Continuous Sprinkles repository, and edit config.rb to use your CI's host name. Then cd into the checked out Continuous Sprinkles repository, and run:
+
+ sprinkle -s main.rb
+
+It will use capistrano to SSH into your CI host and install all necessary dependencies. The script will take a while to run.
+
+License
+-------
+
+![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
+
+Continuous Sprinkles is Copyright © 2011 [thoughtbot, inc](http://thoughtbot.com/community)
+
+The names and logos for thoughtbot are trademarks of thoughtbot, inc.
+
+Continuous Sprinkles is free software, and may be redistributed under the terms specified in the LICENSE file.
View
10 main.rb
@@ -19,11 +19,11 @@
end
policy :ci, :roles => :master do
- # requires :hudson
- # requires :ruby
- # requires :rubygems
- # requires :mysql
- # requires :postgres
+ requires :hudson
+ requires :ruby
+ requires :rubygems
+ requires :mysql
+ requires :postgres
requires :redis
end
View
@@ -5,4 +5,7 @@
%{a2dissite 000-default}
]
end
+ verify do
+ has_apt "apache2"
+ end
end
View
@@ -2,24 +2,43 @@
description 'Hudson CI Server'
deb "http://hudson-ci.org/downloads/debian/hudson.deb"
requires :hudson_dependencies, :apache_hudson_proxy
+ verify do
+ has_apt "hudson"
+ end
end
package :hudson_dependencies do
description "Hudson Dependencies"
apt %w(daemon openjdk-6-jre java-virtual-machine)
+ verify do
+ has_executable "java"
+ end
end
package :apache_hudson_proxy do
describe "Proxy 80 to 8080 for Hudson"
apt %w(libapache2-mod-proxy-html) do
- site = IO.read("assets/site")
post :install, [
%{a2enmod proxy},
%{a2enmod proxy_http},
- %{bash -c "echo -e '#{site.gsub("\n", '\n')}' > /etc/apache2/sites-available/hudson"},
- %{a2ensite hudson},
%{/etc/init.d/apache2 restart}
]
end
- requires :apache
+ requires :apache, :hudson_apache_site
+ verify do
+ has_apt "libapache2-mod-proxy-html"
+ end
+end
+
+package :hudson_apache_site do
+ describe "Apache Hudson site"
+ transfer "assets/site", "/tmp" do
+ post :install, [
+ %{mv /tmp/site /etc/apache2/sites-available/hudson},
+ %{a2ensite hudson}
+ ]
+ end
+ verify do
+ has_file "/etc/apache2/sites-available/hudson"
+ end
end
View
@@ -1,4 +1,8 @@
package :mysql do
description "MySQL Database"
apt %w(mysql-server mysql-client libmysqlclient15-dev)
+ verify do
+ has_executable "mysql"
+ has_executable "mysqld"
+ end
end
View
@@ -1,5 +1,10 @@
package :postgres do
description "Postgresql Database"
apt %w(postgresql postgresql-client postgresql-contrib)
+ verify do
+ has_apt "postgresql"
+ has_apt "postgresql-client"
+ has_apt "postgresql-contrib"
+ end
end
View
@@ -12,7 +12,7 @@
end
requires :redis_conf
verify do
- has_file "/usr/local/bin/redis-server"
+ has_executable "redis-server"
end
end
@@ -22,4 +22,7 @@
pre :install, %{mkdir -p /etc/redis}
post :install, %{mv /tmp/redis.conf /etc/redis/6379.conf}
end
+ verify do
+ has_file "/etc/redis/6379.conf"
+ end
end
View
@@ -4,11 +4,22 @@
patchlevel '334'
source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz"
requires :ruby_dependencies
+ verify do
+ has_executable "ruby"
+ end
end
package :ruby_dependencies do
description 'Ruby Virtual Machine Build Dependencies'
apt %w(bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file)
+ verify do
+ has_apt "bison"
+ has_apt "zlib1g-dev"
+ has_apt "libssl-dev"
+ has_apt "libreadline5-dev"
+ has_apt "libncurses5-dev"
+ has_apt "file"
+ end
end
package :rubygems do
@@ -18,5 +29,8 @@
custom_install 'ruby setup.rb'
end
requires :ruby
+ verify do
+ has_executable "gem"
+ end
end

0 comments on commit a97be30

Please sign in to comment.