lib/aws_ec2/cli.rb in aws-ec2-0.3.0 vs lib/aws_ec2/cli.rb in aws-ec2-0.4.0
- old
+ new
@@ -3,25 +3,27 @@
class_option :verbose, type: :boolean
class_option :noop, type: :boolean
class_option :profile, desc: "profile name to use"
desc "create NAME", "create ec2 instance"
- option :ami, desc: "ami name, if specified an ami will be created at the end of user data"
long_desc Help.text(:create)
+ option :ami_name, desc: "when specified, an ami creation script is appended to the user-data script"
+ option :auto_terminate, type: :boolean, default: false, desc: "automatically terminate the instance at the end of user-data"
+ option :source_ami, desc: "override the source image_id in profile"
def create(name)
Create.new(options.merge(name: name)).run
end
- desc "spot NAME", "create spot ec2 instance"
- long_desc Help.text(:spot)
- def spot(name)
- Spot.new(options.merge(name: name)).run
+ desc "ami NAME", "launches instance and uses it create AMI"
+ long_desc Help.text(:ami)
+ option :auto_terminate, type: :boolean, default: true, desc: "automatically terminate the instance at the end of user-data"
+ def ami(name)
+ Ami.new(options.merge(name: name)).run
end
- desc "userdata NAME", "displays generated userdata script"
- option :ami, desc: "ami name, if specified an ami will be created at the end of user data"
- long_desc Help.text(:user_data)
- def userdata(name)
- UserData.new(options.merge(name: name)).run
+ desc "compile_scripts", "compiles app/scripts into tmp/app/scripts"
+ long_desc Help.text(:compile_scripts)
+ def compile_scripts
+ CompileScripts.new(options).compile
end
end
end