lib/simple_deploy/cli.rb in simple_deploy-0.2.3 vs lib/simple_deploy/cli.rb in simple_deploy-0.2.4

- old
+ new

@@ -20,42 +20,47 @@ simple_deploy attributes -n STACK_NAME -e ENVIRONMENT simple_deploy events -n STACK_NAME -e ENVIRONMENT simple_deploy resources -n STACK_NAME -e ENVIRONMENT simple_deploy outputs -n STACK_NAME -e ENVIRONMENT simple_deploy template -n STACK_NAME -e ENVIRONMENT +simple_deploy parameters -n STACK_NAME -e ENVIRONMENT +Attributes are specified as '=' seperated key value pairs. Multiple can be specified. For example: + +simple_deploy create -t ~/my-template.json -e my-env -n test-stack -a arg1=val1 arg2=vol2 + EOS opt :help, "Display Help" - opt :attributes, "CSV list of updates attributes", :type => :string + opt :attributes, "CSV list of updates attributes", :type => :strings opt :environment, "Set the target environment", :type => :string opt :name, "Stack name to manage", :type => :string opt :template, "Path to the template file", :type => :string end @cmd = ARGV.shift unless @cmd - puts "Please specify a command." + puts "\nPlease specify a command.\n" exit 1 end read_attributes unless @cmd == 'environments' @config = Config.new.environment @opts[:environment] unless environment_provided? - puts "Please specify an environment." + puts "\nPlease specify an environment.\n\n" Config.new.environments.keys.each { |e| puts e } exit 1 end end case @cmd when 'create', 'delete', 'deploy', 'destroy', 'instances', 'status', 'attributes', 'events', 'resources', - 'outputs', 'template', 'update' + 'outputs', 'template', 'update', 'parameters' @stack = Stack.new :environment => @opts[:environment], :name => @opts[:name], :config => @config end @@ -78,13 +83,13 @@ @stack.update :attributes => attributes puts "#{@opts[:name]} updated." when 'instances' @stack.instances.each { |s| puts s } when 'list' - puts Stack.list(:config => @config) + puts Stackster::StackLister.new.all when 'template' jj @stack.template - when 'events', 'outputs', 'resources', 'status' + when 'events', 'outputs', 'resources', 'status', 'parameters' puts (@stack.send @cmd.to_sym).to_yaml else puts "Unknown command. Use -h for help." end end