ec2launcher 1.6.15 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +28 -0
- data/Rakefile +11 -2
- data/lib/ec2launcher/block_device_builder.rb +6 -4
- data/lib/ec2launcher/dynamic_hostname_generator.rb +56 -0
- data/lib/ec2launcher/hostname_generator.rb +30 -20
- data/lib/ec2launcher/hostnames/host_name_generation.rb +42 -0
- data/lib/ec2launcher/init_options.rb +10 -0
- data/lib/ec2launcher/route53.rb +6 -0
- data/lib/ec2launcher/version.rb +1 -1
- data/lib/ec2launcher.rb +98 -50
- data/startup-scripts/setup.rb +23 -15
- data/startup-scripts/setup_instance.rb +66 -5
- data/test/spec/dynamic_hostname_generator_spec.rb +29 -0
- data/test/spec/hostnames/host_name_generation_spec.rb +42 -0
- data/test/test_helper.rb +0 -1
- data/test/unit/block_device_builder.rb +102 -0
- data/test/{ec2launcher → unit}/dsl/config_parser_test.rb +1 -0
- data/test/unit/route53_test.rb +184 -0
- metadata +25 -19
- data/.gitignore +0 -17
- data/bin/ec2launcher +0 -38
- data/ec2launcher.gemspec +0 -24
- data/yard_extensions/dsl_attribute_handler.rb +0 -14
data/bin/ec2launcher
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Copyright (c) 2012 Sean Laurent
|
4
|
-
#
|
5
|
-
require 'erb'
|
6
|
-
|
7
|
-
require 'ec2launcher'
|
8
|
-
require 'ec2launcher/init_options'
|
9
|
-
require 'ec2launcher/terminator'
|
10
|
-
|
11
|
-
opt_parser = EC2Launcher::InitOptions.new
|
12
|
-
opt_parser.parse(ARGV)
|
13
|
-
|
14
|
-
if opt_parser.command == "init"
|
15
|
-
if File.exists?(opt_parser.location)
|
16
|
-
puts "ERROR! Location '#{opt_parser.location} already exists!"
|
17
|
-
exit 2
|
18
|
-
end
|
19
|
-
Dir.mkdir(opt_parser.location)
|
20
|
-
Dir.chdir(opt_parser.location)
|
21
|
-
|
22
|
-
Dir.mkdir("applications")
|
23
|
-
Dir.mkdir("environments")
|
24
|
-
|
25
|
-
new_config_template = ERB.new(EC2Launcher::Config::DEFAULT_CONFIG_ERB)
|
26
|
-
File.open("config.rb", 'w') {|f| f.write(new_config_template.result)}
|
27
|
-
|
28
|
-
puts "Successfully created #{opt_parser.location}"
|
29
|
-
elsif opt_parser.command =~ /^term/
|
30
|
-
terminator = EC2Launcher::Terminator.new(opt_parser.options.directory)
|
31
|
-
terminator.terminate(opt_parser.hostname, opt_parser.options.access_key, opt_parser.options.secret_key, opt_parser.options.snapshot_removal, opt_parser.options.force)
|
32
|
-
elsif opt_parser.command == "launch"
|
33
|
-
launcher = EC2Launcher::Launcher.new
|
34
|
-
launcher.launch(opt_parser.options)
|
35
|
-
else
|
36
|
-
opt_parser.help
|
37
|
-
exit 1
|
38
|
-
end
|
data/ec2launcher.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/ec2launcher/version', __FILE__)
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["Sean Laurent"]
|
6
|
-
gem.description = %q{Tool to manage application configurations and launch new EC2 instances based on the configurations.}
|
7
|
-
gem.summary = %q{Tool to launch EC2 instances.}
|
8
|
-
gem.homepage = "https://github.com/StudyBlue/ec2launcher"
|
9
|
-
|
10
|
-
gem.license = "Apache 2.0"
|
11
|
-
|
12
|
-
gem.files = `git ls-files`.split($\)
|
13
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
|
-
gem.name = "ec2launcher"
|
16
|
-
gem.require_paths = ["lib"]
|
17
|
-
gem.version = EC2Launcher::VERSION
|
18
|
-
|
19
|
-
gem.add_runtime_dependency "aws-sdk", [">= 1.6.6"]
|
20
|
-
gem.add_runtime_dependency "log4r"
|
21
|
-
|
22
|
-
gem.add_development_dependency "minitest"
|
23
|
-
gem.add_development_dependency "rake"
|
24
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2012 Sean Laurent
|
3
|
-
#
|
4
|
-
|
5
|
-
# Handles YARD documentation for the custom DSL methods
|
6
|
-
class DSLAttributeHandler < YARD::Handlers::Ruby::AttributeHandler
|
7
|
-
handles_method_call(:dsl_accessor)
|
8
|
-
handles_method_call(:dsl_array_accessor)
|
9
|
-
namespace_only
|
10
|
-
|
11
|
-
def process
|
12
|
-
push_state(:scope => :class) { super }
|
13
|
-
end
|
14
|
-
end
|