capistrano-ops_works 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/README.md +40 -37
- data/lib/capistrano/ops_works/version.rb +1 -1
- data/lib/capistrano/tasks/ops_works.rake +2 -0
- metadata +2 -1
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -25,50 +25,53 @@ If you haven't installed [Capistrano](https://github.com/capistrano/capistrano),
|
|
25
25
|
Require the gem in your Capfile (example taken from default generated Capfile)
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
28
|
+
###########
|
29
|
+
# Capfile #
|
30
|
+
###########
|
31
|
+
|
32
|
+
# Load DSL and Setup Up Stages
|
33
|
+
require 'capistrano/setup'
|
34
|
+
|
35
|
+
# Includes default deployment tasks
|
36
|
+
require 'capistrano/deploy'
|
37
|
+
|
38
|
+
require 'capistrano/ops_works'
|
39
|
+
|
40
|
+
# Includes tasks from other gems included in your Gemfile
|
41
|
+
#
|
42
|
+
# For documentation on these, see for example:
|
43
|
+
#
|
44
|
+
# https://github.com/capistrano/rvm
|
45
|
+
# https://github.com/capistrano/rbenv
|
46
|
+
# https://github.com/capistrano/chruby
|
47
|
+
# https://github.com/capistrano/bundler
|
48
|
+
# https://github.com/capistrano/rails/tree/master/assets
|
49
|
+
# https://github.com/capistrano/rails/tree/master/migrations
|
50
|
+
#
|
51
|
+
# require 'capistrano/rvm'
|
52
|
+
# require 'capistrano/rbenv'
|
53
|
+
# require 'capistrano/chruby'
|
54
|
+
# require 'capistrano/bundler'
|
55
|
+
# require 'capistrano/rails/assets'
|
56
|
+
# require 'capistrano/rails/migrations'
|
57
|
+
|
58
|
+
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
|
59
|
+
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
|
58
60
|
```
|
59
61
|
|
60
62
|
In the appropriate stage deploy file, add your OpsWorks details
|
61
63
|
|
62
64
|
```ruby
|
65
|
+
#############################
|
66
|
+
# /config/deploy/staging.rb #
|
67
|
+
#############################
|
63
68
|
|
64
|
-
|
65
|
-
set :stage, :staging
|
66
|
-
|
67
|
-
set :access_key_id, '<aws_access_key_id>'
|
68
|
-
set :secret_access_key, '<aws_secret_access_key>'
|
69
|
-
set :stack_id, '<opsworks_stack_id>'
|
70
|
-
set :app_id, '<opsworks_app_id>'
|
69
|
+
set :stage, :staging
|
71
70
|
|
71
|
+
set :access_key_id, '<aws_access_key_id>'
|
72
|
+
set :secret_access_key, '<aws_secret_access_key>'
|
73
|
+
set :stack_id, '<opsworks_stack_id>'
|
74
|
+
set :app_id, '<opsworks_app_id>'
|
72
75
|
```
|
73
76
|
|
74
77
|
Check the task list using
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'rake'
|
1
2
|
require 'capistrano/ops_works'
|
2
3
|
|
3
4
|
namespace :opsworks do
|
@@ -38,6 +39,7 @@ namespace :opsworks do
|
|
38
39
|
task :migrate do
|
39
40
|
puts start_deploy({"migrate"=>["true"]})
|
40
41
|
end
|
42
|
+
task :migrations => :migrate
|
41
43
|
|
42
44
|
desc "Checks your app_id for validity"
|
43
45
|
task :check do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-ops_works
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -67,6 +67,7 @@ extensions: []
|
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
69
|
- .gitignore
|
70
|
+
- .travis.yml
|
70
71
|
- Gemfile
|
71
72
|
- LICENSE.txt
|
72
73
|
- README.md
|