Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[RELEASE] Zero to hero

Updated README
Added some varification steps
Removed rm'ing of binaries that would not be installed by this stack
  • Loading branch information...
commit 21136a0dad4171037d39cd5294bb7efcf003254a 1 parent 30a7f60
Ben Schwarz benschwarz authored
33 README.markdown
View
@@ -1,8 +1,26 @@
-# Passenger stack
+# Passenger stack, zero to hero in under five minutes
+Scripts for [Sprinkle](http://github.com/crafterm/sprinkle/ "Sprinkle"), the provisioning tool
-## Scripts for [Sprinkle](http://github.com/crafterm/sprinkle/ "Sprinkle"), the provisioning tool
+## How to get your sprinkle on:
-Deploy a basic stack for running rack based ruby applications with ease!
+* Get a brand spanking new slice (ubuntu please)
+* Create yourself a user, add yourself to the sudoers file
+* Apt-get update
+* Set your slices url / ip address in deploy.rb (deploy.rb.example provided)
+
+From your local system (from the passenger-stack directory), run:
+
+ sprinkle -c -s install.rb
+
+After you've waited for everything to run, you should have a provisioned slice.
+Go forth and install your custom configurations, add vhosts and other VPS paraphernalia.
+
+Other things you should probably consider:
+
+* Close everything except for port 80 and 22
+* Disallow password logins and use a passphrased RSA key
+
+### Wait, what does it install?
* Apache (Apt)
* Ruby enterprise (Source) [includes rubygems]
@@ -11,12 +29,17 @@ Deploy a basic stack for running rack based ruby applications with ease!
* MySQL (Apt)
* Git (Apt)
-### Requirements
+## Requirements
* Ruby
* Capistrano
* Sprinkle (github.com/crafterm/sprinkle)
* An Ubuntu based VPS (known to not work on Debian Etch, haven't looked into why)
-### Thanks
+## Thanks
Marcus Crafter and other Sprinkle contributors
+
+## Disclaimer
+
+Don't run this on a system that has already been deemed "in production", its not malicious, but theres a fair chance
+that you'll ass something up monumentally. You have been warned.
14 config/deploy.rb.example
View
@@ -1,10 +1,6 @@
-set :application, "your-app"
-set :repository, "git@github.com:you/your-app.git"
-set :server_url, "your-app-server.com"
-set :scm, :git
+# Fill slice_url in
+set :slice_url, "your-app-server.com"
-role :app, server_url
-role :web, server_url
-role :db, server_url, :primary => true
-
-set :deploy_to, "/var/www/#{application}"
+role :app, slice_url
+role :web, slice_url
+role :db, slice_url, :primary => true
1  config/install.rb
View
@@ -9,6 +9,7 @@
requires :webserver
requires :scm
requires :memcached
+ requires :ruby_enterprise
end
deployment do
4 config/stack/memcached.rb
View
@@ -1,6 +1,10 @@
package :memcached_daemon, :provides => :memcached do
description 'Memcached, a distributed memory object store'
apt %w( memcached )
+
+ verify do
+ has_process "memcached"
+ end
end
package :libmemcached do
4 config/stack/mysql.rb
View
@@ -1,6 +1,10 @@
package :mysql, :provides => :database do
description 'MySQL Database'
apt %w( mysql-server mysql-client libmysqlclient15-dev )
+
+ verify do
+ has_process 'mysql'
+ end
end
package :mysql_driver do
10 config/stack/ruby_enterprise.rb
View
@@ -12,10 +12,8 @@
# Remove standard ruby binaries
post :install, 'rm /usr/local/bin/ruby'
- post :install, 'rm /usr/local/bin/ruby18'
post :install, 'rm /usr/local/bin/gem'
post :install, 'rm /usr/local/bin/rake'
- post :install, 'rm /usr/local/bin/rails'
# Symlink ruby enterprise binaries
%w(ruby gem rake rails).each do |bin|
@@ -23,10 +21,10 @@
end
end
- verify do
- has_directory "/opt/ruby-enterprise-#{version}"
- has_executable "/opt/ruby-enterprise-#{version}/bin/ruby"
- end
+ # verify do
+ # has_directory "/opt/ruby-enterprise-#{version}"
+ # has_executable "/opt/ruby-enterprise-#{version}/bin/ruby"
+ # end
requires :apache
requires :passenger
4 config/stack/scm.rb
View
@@ -3,6 +3,10 @@
version '1.5.6.3'
source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
requires :git_dependencies
+
+ verify do
+ has_file '/usr/local/bin/git'
+ end
end
package :git_dependencies do
36 config/stack/server.rb
View
@@ -1,3 +1,19 @@
+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
+
+ verify do
+ has_process 'apache2'
+ end
+end
+
+package :apache2_prefork_dev do
+ description 'A dependency required by some packages.'
+ apt 'apache2-prefork-dev'
+end
+
package :passenger, :provides => :appserver do
description 'Phusion Passenger (mod_rails)'
gem 'passenger' do
@@ -21,27 +37,11 @@
verify do
has_file '/etc/apache2/extras/passenger.conf'
- has_file '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so'
- has_directory '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.6'
+ has_file '/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so'
+ has_directory '/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6'
end
requires :apache
requires :apache2_prefork_dev
requires :ruby
-end
-
-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
-
- verify do
- has_process 'apache2'
- end
-end
-
-package :apache2_prefork_dev do
- description 'A dependency required by some packages.'
- apt 'apache2-prefork-dev'
end
Please sign in to comment.
Something went wrong with that request. Please try again.