capstrap 0.2.0 → 0.2.1
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.markdown +13 -0
- data/lib/capistrano/ext/capstrap/chef.rb +17 -0
- data/lib/capstrap/cli.rb +18 -0
- data/lib/capstrap/version.rb +1 -1
- metadata +4 -3
data/CHANGELOG.markdown
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# 0.2.1
|
2
|
+
|
3
|
+
* Add `update` task to pull new cookbook and configuration updates and re-run chef
|
4
|
+
# 0.2.0
|
5
|
+
|
6
|
+
* Rename `chefsolo` task to chef
|
7
|
+
* Add `solo` task to install chef cookbook and configuration repositories
|
8
|
+
* Add `execute` task to run chef-solo once environment is prepared
|
9
|
+
* Refactorings of chef capistrano recipes
|
10
|
+
|
11
|
+
# 0.1.0
|
12
|
+
|
13
|
+
* Initial release
|
@@ -55,6 +55,23 @@ module Capstrap
|
|
55
55
|
]
|
56
56
|
rvm_run cmd.join(" && ")
|
57
57
|
end
|
58
|
+
|
59
|
+
desc "Updates and executes chef solo configuration"
|
60
|
+
task :update do
|
61
|
+
cmd = [
|
62
|
+
%{use #{ruby}},
|
63
|
+
%{cd #{cookbooks_path}},
|
64
|
+
%{git pull},
|
65
|
+
%{git submodule init},
|
66
|
+
%{git submodule update},
|
67
|
+
%{cd #{config_path}},
|
68
|
+
%{git submodule init},
|
69
|
+
%{git submodule update},
|
70
|
+
%{cd},
|
71
|
+
%{chef-solo}
|
72
|
+
]
|
73
|
+
rvm_run cmd.join(" && ")
|
74
|
+
end
|
58
75
|
end
|
59
76
|
end
|
60
77
|
end
|
data/lib/capstrap/cli.rb
CHANGED
@@ -102,6 +102,24 @@ module Capstrap
|
|
102
102
|
config.find_and_execute_task "chef:execute:solo"
|
103
103
|
end
|
104
104
|
|
105
|
+
desc "update HOST", "Updates and executes chef solo on remote SSH host HOST"
|
106
|
+
method_option "ruby", :type => :string, :banner =>
|
107
|
+
"Version of ruby to install.", :default => "ree-1.8.7"
|
108
|
+
method_option "cookbooks-path", :type => :string,
|
109
|
+
:banner => "Install path to chef cookbooks git repository.",
|
110
|
+
:default => "/var/chef-solo"
|
111
|
+
method_option "config-path", :type => :string,
|
112
|
+
:banner => "Install path to chef configuration git repository.",
|
113
|
+
:default => "/etc/chef"
|
114
|
+
def update(ssh_host)
|
115
|
+
@ssh_host = ssh_host
|
116
|
+
abort ">> HOST must be set" unless @ssh_host
|
117
|
+
|
118
|
+
setup_config options
|
119
|
+
|
120
|
+
config.find_and_execute_task "chef:execute:update"
|
121
|
+
end
|
122
|
+
|
105
123
|
private
|
106
124
|
|
107
125
|
def config
|
data/lib/capstrap/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Fletcher Nichol
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- .document
|
80
80
|
- .gitignore
|
81
81
|
- .rvmrc
|
82
|
+
- CHANGELOG.markdown
|
82
83
|
- Gemfile
|
83
84
|
- Gemfile.lock
|
84
85
|
- LICENSE
|