deployable 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/examples/config/deploy.rb +4 -0
- data/examples/scripts/initd.rb +19 -5
- data/lib/deployable/recipes/default_without_database.rb +44 -0
- data/lib/deployable/version.rb +1 -1
- metadata +7 -6
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.0.7 (April 4th, 2012)
|
2
|
+
|
3
|
+
* Added recipe without database support
|
4
|
+
* Add version number and date to the init.trd scripts file
|
5
|
+
* Don't let the init.rd script crash on multi-app operations if one of them fails
|
6
|
+
* Fix the location of the passenger pid in init.rd
|
7
|
+
|
1
8
|
## 0.0.6 (February 1st, 2012)
|
2
9
|
|
3
10
|
* Updated initrd script for passenger to nog log
|
data/README.md
CHANGED
data/examples/config/deploy.rb
CHANGED
@@ -19,6 +19,10 @@ set :git_enable_submodules, 1
|
|
19
19
|
set :user, "admin"
|
20
20
|
set :use_sudo, false
|
21
21
|
|
22
|
+
set :config_files, {
|
23
|
+
"local.rb" => defer{ "#{current_release}/config/local.rb" }
|
24
|
+
}
|
25
|
+
|
22
26
|
# ======================================
|
23
27
|
|
24
28
|
require 'deployable/recipes/default_with_database'
|
data/examples/scripts/initd.rb
CHANGED
@@ -2,8 +2,11 @@
|
|
2
2
|
|
3
3
|
# chkconfig: - 85 15
|
4
4
|
# description: Passenger Standalone
|
5
|
-
|
6
|
-
|
5
|
+
|
6
|
+
# ======================================================
|
7
|
+
# Version: 0.0.7
|
8
|
+
# Date: 2012-02-05
|
9
|
+
# ======================================================
|
7
10
|
|
8
11
|
# The user the applications run as.
|
9
12
|
USER = "admin"
|
@@ -37,6 +40,9 @@ APPLICATIONS_PATH = USER_HOME_PATH + "/applications/"
|
|
37
40
|
# Shouldn't be necessary to change stuff below this line
|
38
41
|
# ======================================================
|
39
42
|
|
43
|
+
require 'yaml'
|
44
|
+
require 'pathname'
|
45
|
+
|
40
46
|
# Main start routine.
|
41
47
|
def run!
|
42
48
|
command = ARGV.first
|
@@ -65,13 +71,21 @@ def run!
|
|
65
71
|
Application.new(application,stage).run!(command)
|
66
72
|
else
|
67
73
|
applications[application].each do |stage|
|
68
|
-
|
74
|
+
begin
|
75
|
+
Application.new(application,stage).run!(command)
|
76
|
+
rescue StandardError => e
|
77
|
+
puts "ERROR: #{e.message}"
|
78
|
+
end
|
69
79
|
end
|
70
80
|
end
|
71
81
|
else
|
72
82
|
applications.sort.each do |application, stages|
|
73
83
|
stages.each do |stage|
|
74
|
-
|
84
|
+
begin
|
85
|
+
Application.new(application,stage).run!(command)
|
86
|
+
rescue StandardError => e
|
87
|
+
puts "ERROR: #{e.message}"
|
88
|
+
end
|
75
89
|
end
|
76
90
|
end
|
77
91
|
end
|
@@ -162,7 +176,7 @@ class Application
|
|
162
176
|
# Run the before :stop callback
|
163
177
|
run_callback(:stop, :before)
|
164
178
|
|
165
|
-
puts rvm_execute(self.config, "passenger stop --pid-file #{self.path + "passenger.pid"}")
|
179
|
+
puts rvm_execute(self.config, "passenger stop --pid-file #{self.path + "shared/pid/passenger.pid"}")
|
166
180
|
|
167
181
|
# Run the after :stop callback
|
168
182
|
run_callback(:stop, :after)
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# This is our default deployment script without database support and assumes the following
|
2
|
+
#
|
3
|
+
# - Capistrano Multistage
|
4
|
+
# - RVM
|
5
|
+
# - Passenger
|
6
|
+
# - Passenger Standalone
|
7
|
+
# - Bundler
|
8
|
+
|
9
|
+
Capistrano::Configuration.instance(true).load do
|
10
|
+
# Load multistage
|
11
|
+
require 'capistrano/ext/multistage'
|
12
|
+
|
13
|
+
# Load RVM
|
14
|
+
require 'rvm/capistrano'
|
15
|
+
|
16
|
+
# Overwrite the start/stop/restart tasks
|
17
|
+
require 'deployable/passenger'
|
18
|
+
|
19
|
+
# Add RVM specific tools
|
20
|
+
require "deployable/rvm"
|
21
|
+
before "deploy:setup", "rvm:create_gemset"
|
22
|
+
after "deploy:finalize_update", "rvm:set_rvmrc", "rvm:trust_rvmrc"
|
23
|
+
|
24
|
+
# Enable bundling
|
25
|
+
require 'bundler/capistrano'
|
26
|
+
require "deployable/bundle"
|
27
|
+
after "rvm:trust_rvmrc", "bundle:config"
|
28
|
+
|
29
|
+
# Passenger standalone setup
|
30
|
+
require "deployable/passenger_standalone"
|
31
|
+
after "deploy:setup", "passenger_standalone:setup"
|
32
|
+
|
33
|
+
# Config files support
|
34
|
+
require "deployable/config_files"
|
35
|
+
after "deploy:setup", "config_files:setup"
|
36
|
+
after "deploy:update_code", "config_files:install"
|
37
|
+
|
38
|
+
# Directories support
|
39
|
+
require 'deployable/directories'
|
40
|
+
after "deploy:update_code", "directories:create"
|
41
|
+
|
42
|
+
# Cleanup
|
43
|
+
after "deploy", "deploy:cleanup"
|
44
|
+
end
|
data/lib/deployable/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deployable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-05-04 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
17
|
-
requirement: &
|
17
|
+
requirement: &70267159523680 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 2.9.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70267159523680
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: capistrano-ext
|
28
|
-
requirement: &
|
28
|
+
requirement: &70267159510180 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 1.2.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70267159510180
|
37
37
|
description: This library contains commonly used capistrano tasks, a couple of default
|
38
38
|
recipes and example configurations.
|
39
39
|
email:
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- lib/deployable/passenger.rb
|
64
64
|
- lib/deployable/passenger_standalone.rb
|
65
65
|
- lib/deployable/recipes/default_with_database.rb
|
66
|
+
- lib/deployable/recipes/default_without_database.rb
|
66
67
|
- lib/deployable/rvm.rb
|
67
68
|
- lib/deployable/version.rb
|
68
69
|
homepage: https://github.com/DigitPaint/Deployable
|