Permalink
Browse files

clean up examples, consistent ordering of directives, bump versions o…

…f some things to appear more current
  • Loading branch information...
1 parent bf525eb commit a4e4711316643cf48ce136a94a7b615211590784 @yyyc514 yyyc514 committed Apr 20, 2013
@@ -2,6 +2,7 @@
package :build_essential do
description 'Build tools'
+
apt 'build-essential' do
# Update the sources and upgrade the lists before we build essentials
pre :install, ['aptitude update', 'aptitude safe-upgrade', 'aptitude full-upgrade']
@@ -1,10 +1,12 @@
package :mysql, :provides => :database do
description 'MySQL Database'
+
apt %w( mysql-server mysql-client libmysqlclient15-dev )
end
package :mysql_ruby_driver do
description 'Ruby MySQL database driver'
+
gem 'mysql' # :build_flags => "—with-mysql-config=/usr/local/mysql/bin/mysql_config"
verify do
@@ -1,15 +1,15 @@
# Packages to install sqlite3 and the sqlite3 ruby driver.
package :sqlite3, :provides => :database do
description 'SQLite3 database'
+
apt 'sqlite3'
end
package :sqlite3_ruby_driver do
description 'Ruby SQLite3 library.'
- apt 'libsqlite3-dev libsqlite3-ruby1.8'
-
requires :rubygems
+ apt 'libsqlite3-dev libsqlite3-ruby1.8'
verify do
ruby_can_load 'sqlite3'
end
@@ -4,6 +4,9 @@
package :ruby_enterprise do
description 'Ruby Enterprise Edition'
version '1.8.6-20080810'
+ requires :apache
+ requires :passenger
+
source 'http://rubyforge.org/frs/download.php/41040/ruby-enterprise-1.8.6-20080810.tar.gz' do
custom_install 'echo -en "\n\n\n\n" | ./installer'
@@ -18,13 +21,13 @@
has_directory '/opt/ruby-enterprise-1.8.6-20080810'
has_executable '/opt/ruby-enterprise-1.8.6-20080810/bin/ruby'
end
-
- requires :apache
- requires :passenger
end
package :passenger, :provides => :appserver do
description 'Phusion Passenger (mod_rails)'
+ requires :apache
+ requires :apache2_prefork_dev
+
gem 'passenger' do
post :install, 'echo -en "\n\n\n\n" | passenger-install-apache2-module'
@@ -48,8 +51,5 @@
has_file '/etc/apache2/extras/passenger.conf'
has_file '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so'
has_directory '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.3'
- end
-
- requires :apache
- requires :apache2_prefork_dev
+ end
end
@@ -1,7 +1,8 @@
package :rails do
description 'Ruby on Rails'
+ version '3.2'
+
gem 'rails'
- version '2.1.0'
verify do
has_executable 'rails'
@@ -1,6 +1,7 @@
package :ruby do
description 'Ruby Virtual Machine'
version '1.8.6'
+
apt %q(ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby) do
post :install, [%q(ln -s /usr/bin/ruby1.8 /usr/bin/ruby),
%q(ln -s /usr/bin/ri1.8 /usr/bin/ri),
@@ -1,6 +1,8 @@
package :rubygems do
description 'Ruby Gems Package Management System'
- version '1.2.0'
+ version '1.8.23'
+ requires :ruby
+
source "http://rubyforge.org/frs/download.php/38646/rubygems-#{version}.tgz" do
custom_install 'ruby setup.rb'
post :install, 'ln -s /usr/bin/gem1.8 /usr/bin/gem'
@@ -12,6 +14,4 @@
has_file '/usr/bin/gem1.8'
has_symlink '/usr/bin/gem', '/usr/bin/gem1.8'
end
-
- requires :ruby
end
@@ -1,11 +1,13 @@
package :git, :provides => :scm do
description 'Git Distributed Version Control'
version '1.5.6.3'
- source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
requires :git_dependencies
+
+ source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
end
package :git_dependencies do
description 'Git Build Dependencies'
+
apt 'git', :dependencies_only => true
end
@@ -1,4 +1,5 @@
package :subversion, :provides => :scm do
description 'Subversion Version Control'
+
apt 'subversion'
end
@@ -1,5 +1,6 @@
package :apache, :provides => :webserver do
description 'Apache2 web server.'
+
apt 'apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert' do
post :install, 'a2enmod rewrite'
end
@@ -11,5 +12,6 @@
package :apache2_prefork_dev do
description 'A dependency required by some packages.'
+
apt 'apache2-prefork-dev'
end
@@ -1,9 +1,12 @@
package :mysql, :provides => :database do
description 'MySQL Database'
+
apt %w( mysql-server mysql-client )
end
-package :mysql_driver do
+package :ruby_mysql_driver do
description 'Ruby MySQL database driver'
- gem 'mysql'
+ requires :mysql
+
+ gem 'mysql2'
end
@@ -2,6 +2,7 @@
package :build_essential do
description 'Build tools'
+
apt 'build-essential' do
# Update the sources and upgrade the lists before we build essentials
pre :install, 'apt-get update'
@@ -1,29 +1,31 @@
-## Defines available packages
+package :ruby_dependencies do
+ description 'Ruby Virtual Machine Build Dependencies'
+
+ apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
+end
package :ruby do
description 'Ruby Virtual Machine'
version '1.8.6'
- patchlevel '369'
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz" # implicit :style => :gnu
+ patchlevel = '369'
requires :ruby_dependencies
-end
-
-package :ruby_dependencies do
- description 'Ruby Virtual Machine Build Dependencies'
- apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
+
+ source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz" # implicit :style => :gnu
end
package :rubygems do
description 'Ruby Gems Package Management System'
- version '1.3.5'
+ version '1.8.23'
+ requires :ruby
+
source "http://rubyforge.org/frs/download.php/60718/rubygems-#{version}.tgz" do
custom_install 'ruby setup.rb'
end
- requires :ruby
end
package :rails do
description 'Ruby on Rails'
+ version '3.2'
+
gem 'rails'
- version '2.3.3'
end
@@ -1,11 +1,13 @@
-package :git, :provides => :scm do
- description 'Git Distributed Version Control'
- version '1.6.3.3'
- source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
- requires :git_dependencies
-end
-
package :git_dependencies do
description 'Git Build Dependencies'
+
apt 'git', :dependencies_only => true
end
+
+package :git, :provides => :scm do
+ description 'Git Distributed Version Control'
+ version '1.6.3.3'
+ requires :git_dependencies
+
+ source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
+end
@@ -1,11 +1,13 @@
package :sphinx, :provides => :search do
description 'MySQL full text search engine'
version '0.9.8.1'
- source "http://www.sphinxsearch.com/downloads/sphinx-#{version}.tar.gz"
requires :mysql_dev
+
+ source "http://www.sphinxsearch.com/downloads/sphinx-#{version}.tar.gz"
end
package :mysql_dev do
description 'MySQL Database development package'
+
apt %w( libmysqlclient15-dev )
end
@@ -1,28 +1,32 @@
package :mongrel do
description 'Mongrel Application Server'
- gem 'mongrel'
version '1.1.5'
+
+ gem 'mongrel'
end
package :mongrel_cluster, :provides => :appserver do
description 'Cluster Management for Mongrel'
- gem 'mongrel_cluster'
version '1.0.5'
requires :mongrel
+
+ gem 'mongrel_cluster'
end
package :apache, :provides => :webserver do
description 'Apache 2 HTTP Server'
version '2.2.11'
+ requires :apache_dependencies
+
source "http://www.apache.org/dist/httpd/httpd-#{version}.tar.bz2" do
enable %w( mods-shared=all proxy proxy-balancer proxy-http rewrite cache headers ssl deflate so )
prefix "/opt/local/apache2-#{version}"
post :install, 'install -m 755 support/apachectl /etc/init.d/apache2', 'update-rc.d -f apache2 defaults'
end
- requires :apache_dependencies
end
package :apache_dependencies do
description 'Apache 2 HTTP Server Build Dependencies'
+
apt %w( openssl libtool mawk zlib1g-dev libssl-dev )
end
View
@@ -35,7 +35,7 @@
# the user is requested to select which one to use.
policy :rails, :roles => :app do
- requires :rails, :version => '2.3.3'
+ requires :rails
requires :appserver
requires :database
requires :webserver

0 comments on commit a4e4711

Please sign in to comment.