8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/simple_perf/cli/update.rb', line 8
def execute
opts = Trollop::options do
version SimplePerf::VERSION
banner "\nUpdates CloudFormation stack parameters.\n\nUsage:\nsimple_perf update -e ENVIRONMENT -n STACK_NAME -c COUNT\n"
opt :help, "Display Help"
opt :environment, "Set the target environment", :type => :string
opt :name, "Stack name to manage", :type => :string
opt :count, "Number of jmeter instances", :type => :string
end
Trollop::die :environment, "is required but not specified" unless opts[:environment]
Trollop::die :name, "is required but not specified" unless opts[:name]
Trollop::die :count, "is required but not specified" unless opts[:count]
command = 'simple_deploy update' +
' -e ' + opts[:environment] +
' -n ' + opts[:name] +
' -a MinimumInstances=' + opts[:count] +
' -a MaximumInstances=' + opts[:count]
Shared::pretty_print `#{command}`
end
|