openminds_deploy 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -6
- data/lib/openminds_deploy/defaults.rb +21 -21
- data/lib/openminds_deploy/git.rb +2 -3
- data/lib/openminds_deploy/lighttpd.rb +9 -10
- data/lib/openminds_deploy/passenger.rb +21 -22
- data/lib/openminds_deploy/rails3.rb +2 -2
- data/lib/openminds_deploy/svn.rb +2 -2
- data/lib/openminds_deploy/version.rb +3 -0
- metadata +26 -13
- data/Rakefile +0 -15
- data/VERSION +0 -1
- data/openminds_deploy.gemspec +0 -46
data/README.rdoc
CHANGED
@@ -17,18 +17,18 @@ These deploy recipes are all available in the openminds_deploy gem, which can be
|
|
17
17
|
== Example recipe
|
18
18
|
|
19
19
|
In this recipe we just set-up our user & application-name, the repository (git in this case) where our application can be found, the server we are deploying to, and require the necessary deployment files.
|
20
|
-
|
20
|
+
|
21
21
|
The block around it is a convenience rescue if someone would deploy with this Capfile that doesn't have this gem installed. The require's can be edited like you need.
|
22
22
|
|
23
23
|
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
|
24
|
-
|
24
|
+
|
25
25
|
set :user, "account_name"
|
26
26
|
set :application, "my_application"
|
27
|
-
|
27
|
+
|
28
28
|
set :repository, "git@server.openminds.be:git/my_application.git"
|
29
|
-
|
29
|
+
|
30
30
|
server 'server.openminds.be', :app, :web, :db, :primary => true
|
31
|
-
|
31
|
+
|
32
32
|
begin
|
33
33
|
require 'openminds_deploy/defaults'
|
34
34
|
require 'openminds_deploy/git'
|
@@ -51,7 +51,7 @@ If you want to override some settings from the openminds_deploy recipes, define
|
|
51
51
|
$stderr.puts "Install the openminds_deploy gem"
|
52
52
|
exit 1
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
set :deploy_to, "/home/#{user}/apps/staging/#{application}"
|
56
56
|
|
57
57
|
== Recipes in detail
|
@@ -2,31 +2,31 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::C
|
|
2
2
|
|
3
3
|
configuration.load do
|
4
4
|
set :use_sudo, false
|
5
|
-
set :group_writable, false
|
6
|
-
set :keep_releases, 3
|
5
|
+
set :group_writable, false # Shared environment
|
6
|
+
set :keep_releases, 3
|
7
7
|
set :deploy_via, :remote_cache
|
8
|
-
|
8
|
+
|
9
9
|
default_run_options[:pty] = true
|
10
|
-
|
11
|
-
set(:deploy_to) {
|
12
|
-
|
10
|
+
|
11
|
+
set(:deploy_to) {"/home/#{user}/apps/#{application}"}
|
12
|
+
|
13
13
|
ssh_options[:forward_agent] = true
|
14
|
-
|
15
|
-
# database.yml
|
14
|
+
|
15
|
+
# database.yml: we never keep it in our repository
|
16
16
|
namespace :dbconfig do
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
17
|
+
desc 'Create database.yml in shared/config'
|
18
|
+
task :copy_database_config do
|
19
|
+
run "mkdir -p #{shared_path}/config"
|
20
|
+
put File.read('config/database.yml'), "#{shared_path}/config/database.yml"
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Link in the production database.yml'
|
24
|
+
task :link do
|
25
|
+
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
|
26
|
+
end
|
27
27
|
end
|
28
|
-
|
29
|
-
after
|
28
|
+
|
29
|
+
after 'deploy:update_code' do
|
30
30
|
dbconfig.link
|
31
31
|
end
|
32
32
|
|
@@ -37,4 +37,4 @@ configuration.load do
|
|
37
37
|
after :deploy do
|
38
38
|
deploy.cleanup
|
39
39
|
end
|
40
|
-
end
|
40
|
+
end
|
data/lib/openminds_deploy/git.rb
CHANGED
@@ -3,38 +3,37 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::C
|
|
3
3
|
configuration.load do
|
4
4
|
# Lighttpd stuff
|
5
5
|
namespace :lighttpd do
|
6
|
-
desc
|
6
|
+
desc 'Restart the web server'
|
7
7
|
task :restart, :roles => :app do
|
8
|
-
run
|
8
|
+
run 'lighty restart'
|
9
9
|
end
|
10
10
|
|
11
|
-
desc
|
11
|
+
desc 'Stop the web server'
|
12
12
|
task :stop, :roles => :app do
|
13
|
-
run
|
13
|
+
run 'lighty stop'
|
14
14
|
end
|
15
15
|
|
16
|
-
desc
|
16
|
+
desc 'Start the web server'
|
17
17
|
task :start, :roles => :app do
|
18
|
-
run
|
18
|
+
run 'lighty start'
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
# Standard deploy actions overwritten
|
23
23
|
namespace :deploy do
|
24
|
-
desc
|
24
|
+
desc 'Restart your application'
|
25
25
|
task :restart do
|
26
26
|
lighttpd::restart
|
27
27
|
end
|
28
28
|
|
29
|
-
desc
|
29
|
+
desc 'Start your application'
|
30
30
|
task :start do
|
31
31
|
lighttpd::start
|
32
32
|
end
|
33
33
|
|
34
|
-
desc
|
34
|
+
desc 'Stop your application'
|
35
35
|
task :stop do
|
36
36
|
lighttpd::stop
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
-
|
@@ -2,32 +2,31 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::C
|
|
2
2
|
|
3
3
|
configuration.load do
|
4
4
|
namespace :passenger do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
desc 'Restart the web server'
|
6
|
+
task :restart, :roles => :app do
|
7
|
+
run "touch #{current_release}/tmp/restart.txt"
|
8
|
+
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
[:start, :stop].each do |t|
|
11
|
+
desc "#{t} task is a no-op with passenger"
|
12
|
+
task t, :roles => :app do ; end
|
13
|
+
end
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
16
|
namespace :deploy do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
desc 'Restart your application'
|
18
|
+
task :restart do
|
19
|
+
passenger::restart
|
20
|
+
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
desc 'Start your application'
|
23
|
+
task :start do
|
24
|
+
passenger::restart
|
25
|
+
end
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
desc 'Stop your application'
|
28
|
+
task :stop do
|
29
|
+
passenger::stop
|
30
|
+
end
|
32
31
|
end
|
33
|
-
end
|
32
|
+
end
|
data/lib/openminds_deploy/svn.rb
CHANGED
@@ -2,5 +2,5 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::C
|
|
2
2
|
|
3
3
|
configuration.load do
|
4
4
|
set :scm, :svn
|
5
|
-
set :scm_password, Proc.new {
|
6
|
-
end
|
5
|
+
set :scm_password, Proc.new {CLI.password_prompt 'SVN Password: '}
|
6
|
+
end
|
metadata
CHANGED
@@ -1,26 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openminds_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jan De Poorter
|
14
|
+
- Joren De Groof
|
15
|
+
- Jeroen Jacobs
|
14
16
|
autorequire:
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date:
|
20
|
+
date: 2011-03-29 00:00:00 +02:00
|
19
21
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
name: capistrano
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 3
|
32
|
+
segments:
|
33
|
+
- 0
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
22
37
|
description: The most commonly used tasks in Capistrano recipes
|
23
|
-
email:
|
38
|
+
email: devel@openminds.be
|
24
39
|
executables: []
|
25
40
|
|
26
41
|
extensions: []
|
@@ -28,19 +43,17 @@ extensions: []
|
|
28
43
|
extra_rdoc_files:
|
29
44
|
- README.rdoc
|
30
45
|
files:
|
31
|
-
- README.rdoc
|
32
|
-
- Rakefile
|
33
|
-
- VERSION
|
34
|
-
- lib/openminds_deploy.rb
|
35
46
|
- lib/openminds_deploy/defaults.rb
|
36
47
|
- lib/openminds_deploy/git.rb
|
37
48
|
- lib/openminds_deploy/lighttpd.rb
|
38
49
|
- lib/openminds_deploy/passenger.rb
|
39
50
|
- lib/openminds_deploy/rails3.rb
|
40
51
|
- lib/openminds_deploy/svn.rb
|
41
|
-
- openminds_deploy.
|
52
|
+
- lib/openminds_deploy/version.rb
|
53
|
+
- lib/openminds_deploy.rb
|
54
|
+
- README.rdoc
|
42
55
|
has_rdoc: true
|
43
|
-
homepage:
|
56
|
+
homepage: http://openminds.be
|
44
57
|
licenses: []
|
45
58
|
|
46
59
|
post_install_message:
|
data/Rakefile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'jeweler'
|
3
|
-
require 'openminds_jeweler'
|
4
|
-
Jeweler::Tasks.new do |gem|
|
5
|
-
gem.name = "openminds_deploy"
|
6
|
-
gem.summary = %Q{Common capistrano recipes for Openminds applications}
|
7
|
-
gem.description = %Q{The most commonly used tasks in Capistrano recipes}
|
8
|
-
gem.email = "jan@openminds.be"
|
9
|
-
# gem.homepage = "http://github.com/jomz/gorilla-capistrano-recipes"
|
10
|
-
gem.authors = ["Jan De Poorter"]
|
11
|
-
end
|
12
|
-
Jeweler::GemcutterTasks.new
|
13
|
-
rescue LoadError
|
14
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler openminds_jeweler"
|
15
|
-
end
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.6
|
data/openminds_deploy.gemspec
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{openminds_deploy}
|
8
|
-
s.version = "0.0.6"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Jan De Poorter"]
|
12
|
-
s.date = %q{2010-10-11}
|
13
|
-
s.description = %q{The most commonly used tasks in Capistrano recipes}
|
14
|
-
s.email = %q{jan@openminds.be}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"README.rdoc"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
"README.rdoc",
|
20
|
-
"Rakefile",
|
21
|
-
"VERSION",
|
22
|
-
"lib/openminds_deploy.rb",
|
23
|
-
"lib/openminds_deploy/defaults.rb",
|
24
|
-
"lib/openminds_deploy/git.rb",
|
25
|
-
"lib/openminds_deploy/lighttpd.rb",
|
26
|
-
"lib/openminds_deploy/passenger.rb",
|
27
|
-
"lib/openminds_deploy/rails3.rb",
|
28
|
-
"lib/openminds_deploy/svn.rb",
|
29
|
-
"openminds_deploy.gemspec"
|
30
|
-
]
|
31
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
32
|
-
s.require_paths = ["lib"]
|
33
|
-
s.rubygems_version = %q{1.3.7}
|
34
|
-
s.summary = %q{Common capistrano recipes for Openminds applications}
|
35
|
-
|
36
|
-
if s.respond_to? :specification_version then
|
37
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
38
|
-
s.specification_version = 3
|
39
|
-
|
40
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
-
else
|
42
|
-
end
|
43
|
-
else
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|