small_wonder 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -0
- data/lib/small_wonder/configuratorator.rb +2 -2
- data/lib/small_wonder/deploy.rb +10 -2
- data/lib/small_wonder.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -64,6 +64,11 @@ Lastly you can create user defined tasks that get run ("deploy" is the default):
|
|
64
64
|
|
65
65
|
$ small_wonder -p example -a sometask
|
66
66
|
|
67
|
+
Or you can specify multiple tasks using commas:
|
68
|
+
|
69
|
+
$ small_wonder -p example -a sometask,someothertask,athirdtask
|
70
|
+
|
71
|
+
|
67
72
|
#### Chef Data
|
68
73
|
|
69
74
|
During the deployment Small Wonder will save data back to the Chef node. Moreover, status is updated to the task currently being run, so you can see live deployment progress in your searches.
|
@@ -88,7 +88,7 @@ module SmallWonder
|
|
88
88
|
|
89
89
|
def self.copy_files_to_install_dir(node_name, application, path)
|
90
90
|
Net::SSH.start(node_name, SmallWonder::Config.ssh_user) do |ssh|
|
91
|
-
ssh.exec!("echo \"#{
|
91
|
+
ssh.exec!("echo \"#{SmallWonder::Config.sudo_password}\n\" | sudo -S cp -Rf #{SmallWonder::Config.remote_working_dir}/#{application}/* /#{path}/")
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -101,4 +101,4 @@ module SmallWonder
|
|
101
101
|
end
|
102
102
|
|
103
103
|
end
|
104
|
-
end
|
104
|
+
end
|
data/lib/small_wonder/deploy.rb
CHANGED
@@ -3,7 +3,10 @@ module SmallWonder
|
|
3
3
|
def self.run()
|
4
4
|
if SmallWonder::Config.app
|
5
5
|
nodes = SmallWonder::Deploy.node_query()
|
6
|
-
|
6
|
+
|
7
|
+
action = SmallWonder::Config.action.split(",")
|
8
|
+
|
9
|
+
SmallWonder::Deploy.run_action_task(action, SmallWonder::Config.app, nodes)
|
7
10
|
else
|
8
11
|
SmallWonder::Log.error("No application was specified for your deploy, use the '-p' switch.")
|
9
12
|
end
|
@@ -42,6 +45,8 @@ module SmallWonder
|
|
42
45
|
|
43
46
|
sudo_password = ::HighLine.ask("Your sudo password please: ") { |q| q.echo = false }
|
44
47
|
|
48
|
+
SmallWonder::Config.sudo_password = sudo_password
|
49
|
+
|
45
50
|
if SmallWonder::Config.version
|
46
51
|
SmallWonder::Log.info("Got version #{SmallWonder::Config.version} from a command line option, using it as the current version for #{SmallWonder::Config.app}.")
|
47
52
|
else
|
@@ -178,7 +183,10 @@ module SmallWonder
|
|
178
183
|
|
179
184
|
# sub hyphens for underscores to work around having hyphens in method names
|
180
185
|
host.role application.application_name.gsub("-", "_")
|
181
|
-
|
186
|
+
|
187
|
+
action.each do |x|
|
188
|
+
host.send(application.application_name.gsub("-", "_")).__send__(x)
|
189
|
+
end
|
182
190
|
|
183
191
|
# set the application status to final since the deploy is done
|
184
192
|
application.status = "final"
|
data/lib/small_wonder.rb
CHANGED
@@ -92,7 +92,7 @@ module SmallWonder
|
|
92
92
|
when "vicki"
|
93
93
|
system("open http://www.youtube.com/watch?v=ukSvjqwJixw")
|
94
94
|
else
|
95
|
-
SmallWonder::Log.info("Using specified action: #{SmallWonder::Config.action}")
|
95
|
+
SmallWonder::Log.info("Using specified action(s): #{SmallWonder::Config.action}")
|
96
96
|
SmallWonder::Deploy.run
|
97
97
|
end
|
98
98
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: small_wonder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 9
|
10
|
+
version: 0.1.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joe Williams
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-12-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: mixlib-config
|