Sha256: 9ff648389e2aa65578978d00e540b52712e8c3719890b1cefc533481ad2e9d1a

Contents?: true

Size: 791 Bytes

Versions: 1

Compression:

Stored size: 791 Bytes

Contents

require "lib/ec2-starter"

service_options = {
  :access_key_id => "YOUR KEY",
  :secret_access_key => "YOUR SECRET",
  :server => "eu-west-1.ec2.amazonaws.com" # Target Zone
}

start_options = {
  :instance_type => "t1.micro",
  :key_name => "YOUR KEY",
  :availability_zone => "eu-west-1a",
  :architecture => "x86_64",
  :kernel_id => 'aki-4feec43b', # your kernel, remove if not needed
  :ssh_user => 'deploy',
  :ssh_keys => ['/Users/your_user/.ssh/your_key']
  :sudo_password => nil # set if necessary
}

Ec2Starter.start 'YOUR AMI_ID', service_options, start_options do
  ip 'YOUR ELASTIC IP'
  volume :volume_id => 'YOUR VOLUME', :mount_point => '/dev/sdf'
  
  command :sudo => '/root/attach_volume.sh' # Shell command on the instance
  command '/home/your_user/some_script.sh'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ec2-starter-0.1.0 example.rb