Permalink
Browse files

Merge branch 'master' of github.com:wr0ngway/rubber

  • Loading branch information...
2 parents 8fa10c8 + f436395 commit 19774198f03ca7d9863273eea1de91c6f4e22caf @wr0ngway committed Aug 20, 2012
View
@@ -1,14 +1,15 @@
language: ruby
-env: JAVA_OPTS="-server -Djruby.cext.enabled=false -Djruby.compile.invokedynamic=false"
-jdk:
- - oraclejdk7
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- jruby-18mode
- jruby-19mode
-# - jruby-head
+ - jruby-head
# - rbx-18mode
# - rbx-19mode
# script: bundle exec rspec spec
+env:
+ - JAVA_OPTS="-server -Djruby.cext.enabled=false -Djruby.compile.invokedynamic=false"
+jdk:
+ - oraclejdk7
View
@@ -2,6 +2,6 @@ The rubber plugin enables relatively complex multi-instance deployments of
RubyOnRails applications to Amazon's Elastic Compute Cloud (EC2).
See the documentation in the github wiki for more details:
-http://github.com/wr0ngway/rubber/wikis
+http://github.com/wr0ngway/rubber/wiki
[![Build Status](https://secure.travis-ci.org/wr0ngway/rubber.png)](http://travis-ci.org/wr0ngway/rubber)
@@ -258,7 +258,9 @@ def setup_raid_volume(ic, raid_spec, create=false, raid_volume_list=nil)
done
echo 'Devices ready'
+ udevadm control --stop-exec-queue
#{mdadm_init}
+ udevadm control --start-exec-queue
# set reconstruction speed
echo $((30*1024)) > /proc/sys/dev/raid/speed_limit_min
@@ -1,4 +1,4 @@
-redis_server_version: 2.4.12
+redis_server_version: 2.4.16
redis_server_pid_file: /var/run/redis-server.pid
redis_server_conf_file: /etc/redis.conf
redis_server_log_file: /var/log/redis-server.log
@@ -0,0 +1,13 @@
+<%
+ @path = "/etc/init/unicorn.conf"
+ current_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current"
+ @backup = false
+%>
+description "unicorn daemon"
+
+start on runlevel [2345]
+stop on runlevel [016]
+
+script
+ exec /bin/bash -l -c 'cd <%= current_path %> && exec bundle exec unicorn_rails -c <%= current_path %>/config/unicorn.rb -E <%= Rubber.env %> -D >> log/unicorn_upstart.log 2>&1'
+end script
@@ -1,5 +1,6 @@
<%
@path = "#{Rubber.root}/config/unicorn.rb"
+ current_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current"
%>
worker_processes 2
working_directory "<%= Rubber.root %>"
@@ -22,6 +23,13 @@
stderr_path "<%= Rubber.root %>/log/unicorn.stderr.log"
stdout_path "<%= Rubber.root %>/log/unicorn.stdout.log"
+# Because of Capistano, we need to tell unicorn where find the current Gemfile
+# Read about Unicorn, Capistrano, and Bundler here:
+# http://unicorn.bogomips.org/Sandbox.html
+before_exec do |server|
+ ENV['BUNDLE_GEMFILE'] = "<%= current_path %>/Gemfile"
+end
+
before_fork do |server, worker|
##
# When sent a USR2, Unicorn will suffix its pidfile with .oldbin and
View
@@ -226,7 +226,10 @@ def instance_setup
should "create new instance in filesystem when instance file doesn't exist" do
tempfile = Tempfile.new('instancestorage')
location = "file:#{tempfile.path}"
+
+ tempfile.close
tempfile.unlink
+
Instance.any_instance.expects(:load_from_file).never
Instance.any_instance.expects(:save_to_file)
Instance.new(location).save

0 comments on commit 1977419

Please sign in to comment.