capwagen 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +34 -5
- data/lib/capwagen/version.rb +1 -1
- data/lib/capwagen.rb +17 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -1,17 +1,43 @@
|
|
1
1
|
# Capwagen
|
2
2
|
|
3
|
-
Capistrano integration for
|
4
|
-
|
3
|
+
[Capistrano](https://github.com/capistrano/capistrano) integration for
|
4
|
+
[Kraftwagen](http://kraftwagen.org) based Drupal projects.
|
5
|
+
|
6
|
+
This brings single command, secure (SSH), multi-target deployments to
|
7
|
+
Drupal projects. Capistrano is written in the [Ruby](http://ruby-lang.org)
|
8
|
+
programming language, but it has proven itself in the realm of PHP with
|
9
|
+
projects like [Capifony](http://capifony.org) (Capistrano for Symfony),
|
10
|
+
[capistrano-drupal](https://github.com/previousnext/capistrano-drupal) and
|
11
|
+
[WordPress Capistrano Deploy](https://github.com/nathanielks/Wordpress-Capistrano-Deploy).
|
12
|
+
|
13
|
+
Since Capistrano is so widely used, it has clearly proven to be a reliable
|
14
|
+
method of automating deployments.
|
15
|
+
|
16
|
+
|
17
|
+
## Assumptions
|
18
|
+
|
19
|
+
Capistrano is "opinionated software", it has very firm ideas about how
|
20
|
+
things ought to be done, and is not very flexible in that regard.
|
21
|
+
Some of the assumptions behind these opinions are:
|
22
|
+
|
23
|
+
* You use SSH to access the remote servers (so *no* native FTP support).
|
24
|
+
* You either have (1) the same password to all target machines, or (2)
|
25
|
+
public keys in place to allow passwordless access (preferred).
|
26
|
+
|
27
|
+
If you cannot live with these assumptions, Capistrano is likely not
|
28
|
+
the right tool for you.
|
5
29
|
|
6
|
-
**This is very inmature code at the moment. DO NOT use it for production
|
7
|
-
deployments unless you do not care about breaking your production site.**
|
8
30
|
|
9
31
|
## Installation
|
10
32
|
|
33
|
+
Simple, but assumes you have Ruby version 1.8.7+, and the
|
34
|
+
[gems](http://rubygems.org) command available:
|
35
|
+
|
11
36
|
```
|
12
37
|
gem install capwagen
|
13
38
|
```
|
14
39
|
|
40
|
+
|
15
41
|
## Adding Capwagen to your project
|
16
42
|
|
17
43
|
```
|
@@ -19,10 +45,13 @@ cd /path/to/project/src
|
|
19
45
|
capwagen .
|
20
46
|
```
|
21
47
|
|
22
|
-
|
48
|
+
Now change `./cap/deploy.rb` to fit your configuration.
|
49
|
+
|
23
50
|
|
24
51
|
## Running a deployment
|
25
52
|
|
53
|
+
As easy as:
|
54
|
+
|
26
55
|
```
|
27
56
|
cd /path/top/project/src
|
28
57
|
cap deploy
|
data/lib/capwagen/version.rb
CHANGED
data/lib/capwagen.rb
CHANGED
@@ -35,6 +35,14 @@ module Capwagen
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
task :install do
|
39
|
+
transaction do
|
40
|
+
update_code
|
41
|
+
create_symlink
|
42
|
+
find_and_execute_task("kraftwagen:install")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
38
46
|
# We override the default finalize update task, because our logic for
|
39
47
|
# filling projects with the correct symlinks, is completely different from
|
40
48
|
# Rails projects.
|
@@ -89,6 +97,12 @@ module Capwagen
|
|
89
97
|
|
90
98
|
# The Kraftwagen namespace contains the Kraftwagen update process
|
91
99
|
namespace :kraftwagen do
|
100
|
+
task :install do
|
101
|
+
initialize_database
|
102
|
+
find_and_execute_task("drupal:cache_clear")
|
103
|
+
update
|
104
|
+
end
|
105
|
+
|
92
106
|
task :update do
|
93
107
|
apply_module_dependencies
|
94
108
|
updatedb
|
@@ -99,6 +113,9 @@ module Capwagen
|
|
99
113
|
find_and_execute_task("drupal:cache_clear")
|
100
114
|
end
|
101
115
|
|
116
|
+
task :initialize_database do
|
117
|
+
run "cd #{latest_release} && #{drush_cmd} site-install #{install_profile} --yes"
|
118
|
+
end
|
102
119
|
task :apply_module_dependencies do
|
103
120
|
run "cd #{latest_release} && #{drush_cmd} kw-apply-module-dependencies #{kraftwagen_environment}"
|
104
121
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capwagen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|