nesquena-cap-recipes 0.3.17 → 0.3.18
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/VERSION.yml +1 -1
- data/cap-recipes.gemspec +11 -3
- data/examples/advanced/deploy.rb +39 -0
- data/examples/advanced/deploy/experimental.rb +14 -0
- data/examples/advanced/deploy/production.rb +20 -0
- data/examples/simple/deploy.rb +36 -0
- data/lib/cap_recipes/tasks/utilities.rb +2 -1
- metadata +10 -2
data/VERSION.yml
CHANGED
data/cap-recipes.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{cap-recipes}
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.18"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Nathan Esquenazi"]
|
9
|
-
s.date = %q{2009-06-
|
9
|
+
s.date = %q{2009-06-15}
|
10
10
|
s.description = %q{Battle-tested capistrano recipes for debian, passenger, apache, delayed_job, juggernaut, rubygems, backgroundrb, rails and more}
|
11
11
|
s.email = %q{nesquena@gmail.com}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -20,6 +20,10 @@ Gem::Specification.new do |s|
|
|
20
20
|
"Rakefile",
|
21
21
|
"VERSION.yml",
|
22
22
|
"cap-recipes.gemspec",
|
23
|
+
"examples/advanced/deploy.rb",
|
24
|
+
"examples/advanced/deploy/experimental.rb",
|
25
|
+
"examples/advanced/deploy/production.rb",
|
26
|
+
"examples/simple/deploy.rb",
|
23
27
|
"lib/cap_recipes.rb",
|
24
28
|
"lib/cap_recipes/tasks/apache.rb",
|
25
29
|
"lib/cap_recipes/tasks/apache/install.rb",
|
@@ -64,7 +68,11 @@ Gem::Specification.new do |s|
|
|
64
68
|
s.test_files = [
|
65
69
|
"spec/cap/helper.rb",
|
66
70
|
"spec/cap_recipes_spec.rb",
|
67
|
-
"spec/spec_helper.rb"
|
71
|
+
"spec/spec_helper.rb",
|
72
|
+
"examples/advanced/deploy/experimental.rb",
|
73
|
+
"examples/advanced/deploy/production.rb",
|
74
|
+
"examples/advanced/deploy.rb",
|
75
|
+
"examples/simple/deploy.rb"
|
68
76
|
]
|
69
77
|
|
70
78
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# =============================================================================
|
2
|
+
# GENERAL SETTINGS
|
3
|
+
# =============================================================================
|
4
|
+
|
5
|
+
set :application, "demo"
|
6
|
+
set :deploy_to, "/var/apps/#{application}"
|
7
|
+
set :deploy_via, :remote_cache
|
8
|
+
set :scm, :git
|
9
|
+
set :repository, "deploy@dev.demo.com:/home/demo.git"
|
10
|
+
set :git_enable_submodules, 1
|
11
|
+
set :keep_releases, 3
|
12
|
+
|
13
|
+
# =============================================================================
|
14
|
+
# STAGE SETTINGS
|
15
|
+
# =============================================================================
|
16
|
+
|
17
|
+
# set :default_stage, "experimental"
|
18
|
+
set :stages, %w(production experimental)
|
19
|
+
set :default_stage, "experimental"
|
20
|
+
require 'capistrano/ext/multistage'
|
21
|
+
|
22
|
+
# =============================================================================
|
23
|
+
# RECIPE INCLUDES
|
24
|
+
# =============================================================================
|
25
|
+
|
26
|
+
require 'rubygems'
|
27
|
+
require 'cap_recipes/tasks/whenever'
|
28
|
+
require 'cap_recipes/tasks/apache'
|
29
|
+
require 'cap_recipes/tasks/passenger'
|
30
|
+
require 'cap_recipes/tasks/memcache'
|
31
|
+
require 'cap_recipes/tasks/juggernaut'
|
32
|
+
require 'cap_recipes/tasks/delayed_job'
|
33
|
+
require 'cap_recipes/tasks/rails'
|
34
|
+
|
35
|
+
ssh_options[:paranoid] = false
|
36
|
+
default_run_options[:pty] = true
|
37
|
+
|
38
|
+
# PASSENGER
|
39
|
+
set :base_ruby_path, '/opt/ruby-enterprise' # not /usr
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Domain
|
2
|
+
role :web, "stage.app.com"
|
3
|
+
role :app, "stage.app.com"
|
4
|
+
role :db, "stage.app.com", :primary => true
|
5
|
+
|
6
|
+
# GENERAL
|
7
|
+
set :user, "deploy"
|
8
|
+
set :runner, "deploy"
|
9
|
+
set :password, "demo567"
|
10
|
+
set :use_sudo, true
|
11
|
+
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "demo")]
|
12
|
+
|
13
|
+
# Branch
|
14
|
+
set :branch, 'develop'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Domain
|
2
|
+
role :web, "demo.app.com"
|
3
|
+
role :app, "demo.app.com"
|
4
|
+
role :db, "demo.app.com", :primary => true
|
5
|
+
role :juggernaut, "juggernaut.app.com", :no_release => true
|
6
|
+
role :delayed_job, "dj.app.com", :no_release => true
|
7
|
+
role :memcache, "memcache.app.com", :no_release => true
|
8
|
+
|
9
|
+
# GENERAL
|
10
|
+
set :user, "deploy"
|
11
|
+
set :runner, "deploy"
|
12
|
+
set :password, "demo567"
|
13
|
+
set :use_sudo, true
|
14
|
+
set :juggernaut_role, :juggernaut
|
15
|
+
set :delayed_job_role, :delayed_job
|
16
|
+
set :memcache_role, :memcache
|
17
|
+
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "demo")]
|
18
|
+
|
19
|
+
# Branch
|
20
|
+
set :branch, 'master'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# =============================================================================
|
2
|
+
# GENERAL SETTINGS
|
3
|
+
# =============================================================================
|
4
|
+
|
5
|
+
role :web, "demo.app.com"
|
6
|
+
role :app, "demo.app.com"
|
7
|
+
role :db, "demo.app.com", :primary => true
|
8
|
+
|
9
|
+
set :application, "demo"
|
10
|
+
set :deploy_to, "/var/apps/#{application}"
|
11
|
+
set :deploy_via, :remote_cache
|
12
|
+
set :scm, :git
|
13
|
+
set :repository, "deploy@dev.demo.com:/home/demo.git"
|
14
|
+
set :git_enable_submodules, 1
|
15
|
+
set :keep_releases, 3
|
16
|
+
set :user, "deploy"
|
17
|
+
set :runner, "deploy"
|
18
|
+
set :password, "demo567"
|
19
|
+
set :use_sudo, true
|
20
|
+
set :branch, 'production'
|
21
|
+
|
22
|
+
# =============================================================================
|
23
|
+
# RECIPE INCLUDES
|
24
|
+
# =============================================================================
|
25
|
+
|
26
|
+
require 'rubygems'
|
27
|
+
require 'cap_recipes/tasks/whenever'
|
28
|
+
require 'cap_recipes/tasks/apache'
|
29
|
+
require 'cap_recipes/tasks/passenger'
|
30
|
+
require 'cap_recipes/tasks/memcache'
|
31
|
+
require 'cap_recipes/tasks/juggernaut'
|
32
|
+
require 'cap_recipes/tasks/delayed_job'
|
33
|
+
require 'cap_recipes/tasks/rails'
|
34
|
+
|
35
|
+
ssh_options[:paranoid] = false
|
36
|
+
default_run_options[:pty] = true
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
3
|
module Utilities
|
4
|
+
# utilities.config_gsub('/etc/example', /(.*)/im, "\\1")
|
4
5
|
def config_gsub(file, find, replace)
|
5
6
|
tmp="/tmp/#{File.basename(file)}"
|
6
7
|
get file, tmp
|
@@ -9,7 +10,7 @@ module Utilities
|
|
9
10
|
put content, tmp
|
10
11
|
sudo "mv #{tmp} #{file}"
|
11
12
|
end
|
12
|
-
|
13
|
+
|
13
14
|
def sudo_upload(from, to, options={}, &block)
|
14
15
|
top.upload from, "/tmp/#{File.basename(to)}", options, &block
|
15
16
|
sudo "mv /tmp/#{File.basename(to)} #{to}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nesquena-cap-recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Esquenazi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-15 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -29,6 +29,10 @@ files:
|
|
29
29
|
- Rakefile
|
30
30
|
- VERSION.yml
|
31
31
|
- cap-recipes.gemspec
|
32
|
+
- examples/advanced/deploy.rb
|
33
|
+
- examples/advanced/deploy/experimental.rb
|
34
|
+
- examples/advanced/deploy/production.rb
|
35
|
+
- examples/simple/deploy.rb
|
32
36
|
- lib/cap_recipes.rb
|
33
37
|
- lib/cap_recipes/tasks/apache.rb
|
34
38
|
- lib/cap_recipes/tasks/apache/install.rb
|
@@ -94,3 +98,7 @@ test_files:
|
|
94
98
|
- spec/cap/helper.rb
|
95
99
|
- spec/cap_recipes_spec.rb
|
96
100
|
- spec/spec_helper.rb
|
101
|
+
- examples/advanced/deploy/experimental.rb
|
102
|
+
- examples/advanced/deploy/production.rb
|
103
|
+
- examples/advanced/deploy.rb
|
104
|
+
- examples/simple/deploy.rb
|