engineyard 1.0.2 → 1.1.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.
- data/lib/engineyard/cli.rb +47 -19
 - data/lib/engineyard/error.rb +1 -1
 - data/lib/engineyard/model/instance.rb +1 -1
 - data/lib/engineyard/thor.rb +20 -2
 - data/lib/engineyard/version.rb +1 -1
 - data/spec/engineyard/cli_spec.rb +18 -0
 - data/spec/ey/ey_spec.rb +7 -0
 - data/spec/ey/ssh_spec.rb +108 -34
 - data/spec/support/fake_awsm.ru +37 -16
 - data/spec/support/shared_behavior.rb +8 -8
 - metadata +27 -27
 
    
        data/lib/engineyard/cli.rb
    CHANGED
    
    | 
         @@ -9,6 +9,8 @@ module EY 
     | 
|
| 
       9 
9 
     | 
    
         
             
                autoload :Recipes, 'engineyard/cli/recipes'
         
     | 
| 
       10 
10 
     | 
    
         
             
                autoload :Web,     'engineyard/cli/web'
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
      
 12 
     | 
    
         
            +
                check_unknown_options!
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
       12 
14 
     | 
    
         
             
                include Thor::Actions
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
       14 
16 
     | 
    
         
             
                def self.start(*)
         
     | 
| 
         @@ -151,7 +153,7 @@ module EY 
     | 
|
| 
       151 
153 
     | 
    
         
             
                  end
         
     | 
| 
       152 
154 
     | 
    
         
             
                end
         
     | 
| 
       153 
155 
     | 
    
         | 
| 
       154 
     | 
    
         
            -
                desc "ssh [COMMAND] [--all] [--environment ENVIRONMENT]", "Open an ssh session, or run a command."
         
     | 
| 
      
 156 
     | 
    
         
            +
                desc "ssh [COMMAND] [--all] [--environment ENVIRONMENT]", "Open an ssh session to the master app server, or run a command."
         
     | 
| 
       155 
157 
     | 
    
         
             
                long_desc <<-DESC
         
     | 
| 
       156 
158 
     | 
    
         
             
                  If a command is supplied, it will be run, otherwise a session will be
         
     | 
| 
       157 
159 
     | 
    
         
             
                  opened. The application master is used for environments with clusters.
         
     | 
| 
         @@ -166,30 +168,54 @@ module EY 
     | 
|
| 
       166 
168 
     | 
    
         
             
                  :desc => "Environment to ssh into"
         
     | 
| 
       167 
169 
     | 
    
         
             
                method_option :all, :type => :boolean, :aliases => %(-a),
         
     | 
| 
       168 
170 
     | 
    
         
             
                  :desc => "Run command on all servers"
         
     | 
| 
      
 171 
     | 
    
         
            +
                method_option :app_servers, :type => :boolean,
         
     | 
| 
      
 172 
     | 
    
         
            +
                  :desc => "Run command on all application servers"
         
     | 
| 
      
 173 
     | 
    
         
            +
                method_option :db_servers, :type => :boolean,
         
     | 
| 
      
 174 
     | 
    
         
            +
                  :desc => "Run command on the database servers"
         
     | 
| 
      
 175 
     | 
    
         
            +
                method_option :db_master, :type => :boolean,
         
     | 
| 
      
 176 
     | 
    
         
            +
                  :desc => "Run command on the master database server"
         
     | 
| 
      
 177 
     | 
    
         
            +
                method_option :db_slaves, :type => :boolean,
         
     | 
| 
      
 178 
     | 
    
         
            +
                  :desc => "Run command on the slave database servers"
         
     | 
| 
      
 179 
     | 
    
         
            +
                method_option :utilities, :type => :array, :lazy_default => true,
         
     | 
| 
      
 180 
     | 
    
         
            +
                  :desc => "Run command on the utility servers with the given names. If no names are given, run on all utility servers."
         
     | 
| 
       169 
181 
     | 
    
         | 
| 
       170 
182 
     | 
    
         
             
                def ssh(cmd=nil)
         
     | 
| 
       171 
     | 
    
         
            -
                  env 
     | 
| 
      
 183 
     | 
    
         
            +
                  env   = fetch_environment(options[:environment])
         
     | 
| 
      
 184 
     | 
    
         
            +
                  hosts = ssh_hosts(options, env)
         
     | 
| 
       172 
185 
     | 
    
         | 
| 
       173 
     | 
    
         
            -
                  if  
     | 
| 
       174 
     | 
    
         
            -
                    raise NoCommandError.new unless cmd
         
     | 
| 
      
 186 
     | 
    
         
            +
                  raise NoCommandError.new if cmd.nil? and hosts.count != 1
         
     | 
| 
       175 
187 
     | 
    
         | 
| 
       176 
     | 
    
         
            -
             
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
      
 188 
     | 
    
         
            +
                  hosts.each do |host|
         
     | 
| 
      
 189 
     | 
    
         
            +
                    system "ssh #{env.username}@#{host} #{cmd}"
         
     | 
| 
      
 190 
     | 
    
         
            +
                  end
         
     | 
| 
      
 191 
     | 
    
         
            +
                end
         
     | 
| 
       179 
192 
     | 
    
         | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
                     
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
      
 193 
     | 
    
         
            +
                no_tasks do
         
     | 
| 
      
 194 
     | 
    
         
            +
                  def ssh_host_filter(opts)
         
     | 
| 
      
 195 
     | 
    
         
            +
                    return lambda {|instance| true }                                                if opts[:all]
         
     | 
| 
      
 196 
     | 
    
         
            +
                    return lambda {|instance| %w(solo app app_master    ).include?(instance.role) } if opts[:app_servers]
         
     | 
| 
      
 197 
     | 
    
         
            +
                    return lambda {|instance| %w(solo db_master db_slave).include?(instance.role) } if opts[:db_servers ]
         
     | 
| 
      
 198 
     | 
    
         
            +
                    return lambda {|instance| %w(solo db_master         ).include?(instance.role) } if opts[:db_master  ]
         
     | 
| 
      
 199 
     | 
    
         
            +
                    return lambda {|instance| %w(db_slave               ).include?(instance.role) } if opts[:db_slaves  ]
         
     | 
| 
      
 200 
     | 
    
         
            +
                    return lambda {|instance| %w(util                   ).include?(instance.role) &&
         
     | 
| 
      
 201 
     | 
    
         
            +
                                                         opts[:utilities].include?(instance.name) } if opts[:utilities  ]
         
     | 
| 
      
 202 
     | 
    
         
            +
                    return lambda {|instance| %w(solo app_master        ).include?(instance.role) }
         
     | 
| 
      
 203 
     | 
    
         
            +
                  end
         
     | 
| 
      
 204 
     | 
    
         
            +
             
     | 
| 
      
 205 
     | 
    
         
            +
                  def ssh_hosts(opts, env)
         
     | 
| 
      
 206 
     | 
    
         
            +
                    if opts[:utilities] and not opts[:utilities].respond_to?(:include?)
         
     | 
| 
      
 207 
     | 
    
         
            +
                      includes_everything = []
         
     | 
| 
      
 208 
     | 
    
         
            +
                      class << includes_everything
         
     | 
| 
      
 209 
     | 
    
         
            +
                        def include?(*) true end
         
     | 
| 
       185 
210 
     | 
    
         
             
                      end
         
     | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
                  else
         
     | 
| 
       188 
     | 
    
         
            -
                    if env.app_master
         
     | 
| 
       189 
     | 
    
         
            -
                      system "ssh #{env.username}@#{env.app_master.public_hostname} #{cmd}"
         
     | 
| 
      
 211 
     | 
    
         
            +
                      filter = ssh_host_filter(opts.merge(:utilities => includes_everything))
         
     | 
| 
       190 
212 
     | 
    
         
             
                    else
         
     | 
| 
       191 
     | 
    
         
            -
                       
     | 
| 
      
 213 
     | 
    
         
            +
                      filter = ssh_host_filter(opts)
         
     | 
| 
       192 
214 
     | 
    
         
             
                    end
         
     | 
| 
      
 215 
     | 
    
         
            +
             
     | 
| 
      
 216 
     | 
    
         
            +
                    instances = env.instances.select {|instance| filter[instance] }
         
     | 
| 
      
 217 
     | 
    
         
            +
                    raise NoInstancesError.new(env.name) if instances.empty?
         
     | 
| 
      
 218 
     | 
    
         
            +
                    return instances.map { |instance| instance.public_hostname }
         
     | 
| 
       193 
219 
     | 
    
         
             
                  end
         
     | 
| 
       194 
220 
     | 
    
         
             
                end
         
     | 
| 
       195 
221 
     | 
    
         | 
| 
         @@ -246,10 +272,12 @@ module EY 
     | 
|
| 
       246 
272 
     | 
    
         
             
                      list.find{|task| task[0] =~ /^#{base} #{name}/ }
         
     | 
| 
       247 
273 
     | 
    
         
             
                    end
         
     | 
| 
       248 
274 
     | 
    
         
             
                    list -= deploy_cmds
         
     | 
| 
      
 275 
     | 
    
         
            +
             
     | 
| 
       249 
276 
     | 
    
         
             
                    EY.ui.print_help(deploy_cmds)
         
     | 
| 
       250 
277 
     | 
    
         
             
                    EY.ui.say
         
     | 
| 
       251 
278 
     | 
    
         | 
| 
       252 
     | 
    
         
            -
                     
     | 
| 
      
 279 
     | 
    
         
            +
                    self.class.subcommands.each do |name|
         
     | 
| 
      
 280 
     | 
    
         
            +
                      klass = self.class.subcommand_class_for(name)
         
     | 
| 
       253 
281 
     | 
    
         
             
                      list.reject!{|cmd| cmd[0] =~ /^#{base} #{name}/}
         
     | 
| 
       254 
282 
     | 
    
         
             
                      EY.ui.say "#{name.capitalize} commands:"
         
     | 
| 
       255 
283 
     | 
    
         
             
                      tasks = klass.printable_tasks.reject{|t| t[0] =~ /help$/ }
         
     | 
| 
         @@ -266,7 +294,7 @@ module EY 
     | 
|
| 
       266 
294 
     | 
    
         | 
| 
       267 
295 
     | 
    
         
             
                    self.class.send(:class_options_help, shell)
         
     | 
| 
       268 
296 
     | 
    
         
             
                    EY.ui.say "See '#{base} help COMMAND' for more information on a specific command."
         
     | 
| 
       269 
     | 
    
         
            -
                  elsif klass =  
     | 
| 
      
 297 
     | 
    
         
            +
                  elsif klass = self.class.subcommand_class_for(cmds.first)
         
     | 
| 
       270 
298 
     | 
    
         
             
                    klass.new.help(*cmds[1..-1])
         
     | 
| 
       271 
299 
     | 
    
         
             
                  else
         
     | 
| 
       272 
300 
     | 
    
         
             
                    super
         
     | 
    
        data/lib/engineyard/error.rb
    CHANGED
    
    
| 
         @@ -3,7 +3,7 @@ require 'escape' 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module EY
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Model
         
     | 
| 
       5 
5 
     | 
    
         
             
                class Instance < ApiStruct.new(:id, :role, :name, :status, :amazon_id, :public_hostname, :environment)
         
     | 
| 
       6 
     | 
    
         
            -
                  EYDEPLOY_VERSION = ENV["EY_DEPLOY_VERSION"] || "1.0 
     | 
| 
      
 6 
     | 
    
         
            +
                  EYDEPLOY_VERSION = ENV["EY_DEPLOY_VERSION"] || "1.1.0"
         
     | 
| 
       7 
7 
     | 
    
         
             
                  EXIT_STATUS = Hash.new { |h,k| raise EY::Error, "ey-deploy version checker exited with unknown status code #{k}" }
         
     | 
| 
       8 
8 
     | 
    
         
             
                  EXIT_STATUS.merge!({
         
     | 
| 
       9 
9 
     | 
    
         
             
                    255 => :ssh_failed,
         
     | 
    
        data/lib/engineyard/thor.rb
    CHANGED
    
    | 
         @@ -82,14 +82,32 @@ module EY 
     | 
|
| 
       82 
82 
     | 
    
         
             
                  end
         
     | 
| 
       83 
83 
     | 
    
         | 
| 
       84 
84 
     | 
    
         
             
                  def self.banner(task, task_help = false, subcommand = false)
         
     | 
| 
       85 
     | 
    
         
            -
                     
     | 
| 
      
 85 
     | 
    
         
            +
                    subcommand_banner = to_s.split(/::/).map{|s| s.downcase}[2..-1]
         
     | 
| 
      
 86 
     | 
    
         
            +
                    subcommand_banner = if subcommand_banner.size > 0
         
     | 
| 
      
 87 
     | 
    
         
            +
                                          subcommand_banner.join(' ')
         
     | 
| 
      
 88 
     | 
    
         
            +
                                        else
         
     | 
| 
      
 89 
     | 
    
         
            +
                                          nil
         
     | 
| 
      
 90 
     | 
    
         
            +
                                        end
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
       86 
92 
     | 
    
         
             
                    task = (task_help ? task.formatted_usage(self, false, subcommand) : task.name)
         
     | 
| 
       87 
     | 
    
         
            -
                    [banner_base,  
     | 
| 
      
 93 
     | 
    
         
            +
                    [banner_base, subcommand_banner, task].compact.join(" ")
         
     | 
| 
       88 
94 
     | 
    
         
             
                  end
         
     | 
| 
       89 
95 
     | 
    
         | 
| 
       90 
96 
     | 
    
         
             
                  def self.handle_no_task_error(task)
         
     | 
| 
       91 
97 
     | 
    
         
             
                    raise UndefinedTaskError, "Could not find command #{task.inspect}."
         
     | 
| 
       92 
98 
     | 
    
         
             
                  end
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                  def self.subcommand(name, klass)
         
     | 
| 
      
 101 
     | 
    
         
            +
                    @@subcommand_class_for ||= {}
         
     | 
| 
      
 102 
     | 
    
         
            +
                    @@subcommand_class_for[name] = klass
         
     | 
| 
      
 103 
     | 
    
         
            +
                    super
         
     | 
| 
      
 104 
     | 
    
         
            +
                  end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                  def self.subcommand_class_for(name)
         
     | 
| 
      
 107 
     | 
    
         
            +
                    @@subcommand_class_for ||= {}
         
     | 
| 
      
 108 
     | 
    
         
            +
                    @@subcommand_class_for[name]
         
     | 
| 
      
 109 
     | 
    
         
            +
                  end
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
       93 
111 
     | 
    
         
             
                end
         
     | 
| 
       94 
112 
     | 
    
         | 
| 
       95 
113 
     | 
    
         
             
                protected
         
     | 
    
        data/lib/engineyard/version.rb
    CHANGED
    
    
    
        data/spec/engineyard/cli_spec.rb
    CHANGED
    
    | 
         @@ -11,6 +11,24 @@ describe EY::CLI do 
     | 
|
| 
       11 
11 
     | 
    
         
             
                EY.ui.should be_an(EY::CLI::UI)
         
     | 
| 
       12 
12 
     | 
    
         
             
              end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
      
 14 
     | 
    
         
            +
              it "provides help" do
         
     | 
| 
      
 15 
     | 
    
         
            +
                out = capture_stdout do
         
     | 
| 
      
 16 
     | 
    
         
            +
                  EY::CLI.start(["help"])
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                out.should include("ey deploy")
         
     | 
| 
      
 20 
     | 
    
         
            +
                out.should include("ey ssh")
         
     | 
| 
      
 21 
     | 
    
         
            +
                out.should include("ey web enable")
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              it "delegates help" do
         
     | 
| 
      
 25 
     | 
    
         
            +
                out = capture_stdout do
         
     | 
| 
      
 26 
     | 
    
         
            +
                  EY::CLI.start(%w[help web enable])
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                out.should match(/remove the maintenance page/i)
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       14 
32 
     | 
    
         
             
              it "provides error classes" do
         
     | 
| 
       15 
33 
     | 
    
         
             
                EY::EnvironmentError.should be
         
     | 
| 
       16 
34 
     | 
    
         
             
                EY::BranchMismatchError.should be
         
     | 
    
        data/spec/ey/ey_spec.rb
    CHANGED
    
    | 
         @@ -13,4 +13,11 @@ describe "ey" do 
     | 
|
| 
       13 
13 
     | 
    
         
             
                  @err.should include("Could not find command")
         
     | 
| 
       14 
14 
     | 
    
         
             
                end
         
     | 
| 
       15 
15 
     | 
    
         
             
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              context "run a command and a bad flag" do
         
     | 
| 
      
 18 
     | 
    
         
            +
                it "tells the user that is not a valid flag" do
         
     | 
| 
      
 19 
     | 
    
         
            +
                  ey "help --expect-failure", :expect_failure => true
         
     | 
| 
      
 20 
     | 
    
         
            +
                  @err.should include("Unknown switches")
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
       16 
23 
     | 
    
         
             
            end
         
     | 
    
        data/spec/ey/ssh_spec.rb
    CHANGED
    
    | 
         @@ -11,6 +11,47 @@ shared_examples_for "running ey ssh" do 
     | 
|
| 
       11 
11 
     | 
    
         
             
              end
         
     | 
| 
       12 
12 
     | 
    
         
             
            end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
      
 14 
     | 
    
         
            +
            shared_examples_for "running ey ssh for select role" do
         
     | 
| 
      
 15 
     | 
    
         
            +
              given "integration"
         
     | 
| 
      
 16 
     | 
    
         
            +
              include Spec::Helpers::SharedIntegrationTestUtils
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              def extra_ey_options
         
     | 
| 
      
 19 
     | 
    
         
            +
                {:prepend_to_path => {'ssh' => "#!/bin/sh\necho ssh $*"}}
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              def command_to_run(opts)
         
     | 
| 
      
 23 
     | 
    
         
            +
                cmd = "ssh #{opts[:ssh_command]}"
         
     | 
| 
      
 24 
     | 
    
         
            +
                cmd << " #{@ssh_flag}"
         
     | 
| 
      
 25 
     | 
    
         
            +
                cmd << " --environment #{opts[:env]}" if opts[:env]
         
     | 
| 
      
 26 
     | 
    
         
            +
                cmd
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              it "runs the command on the right servers" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                api_scenario "one app, one environment"
         
     | 
| 
      
 31 
     | 
    
         
            +
                run_ey(:ssh_command => "ls", :env => 'giblets', :verbose => true)
         
     | 
| 
      
 32 
     | 
    
         
            +
                @hosts.each do |host|
         
     | 
| 
      
 33 
     | 
    
         
            +
                  @raw_ssh_commands.select do |command|
         
     | 
| 
      
 34 
     | 
    
         
            +
                    command =~ /^ssh turkey@#{host}.+ ls$/
         
     | 
| 
      
 35 
     | 
    
         
            +
                  end.should_not be_empty
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
                @raw_ssh_commands.select do |command|
         
     | 
| 
      
 38 
     | 
    
         
            +
                  command =~ /^ssh turkey.+ ls$/
         
     | 
| 
      
 39 
     | 
    
         
            +
                end.count.should == @hosts.count
         
     | 
| 
      
 40 
     | 
    
         
            +
              end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
              it "raises an error when there are no matching hosts" do
         
     | 
| 
      
 43 
     | 
    
         
            +
                api_scenario "one app, one environment, no instances"
         
     | 
| 
      
 44 
     | 
    
         
            +
                run_ey({:ssh_command => "ls", :env => 'giblets', :verbose => true}, :expect_failure => true)
         
     | 
| 
      
 45 
     | 
    
         
            +
              end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
              it "responds correctly when there is no command" do
         
     | 
| 
      
 48 
     | 
    
         
            +
                if @hosts.count != 1
         
     | 
| 
      
 49 
     | 
    
         
            +
                  api_scenario "one app, one environment"
         
     | 
| 
      
 50 
     | 
    
         
            +
                  run_ey({:env => 'giblets', :verbose => true}, :expect_failure => true)
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
            end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
       14 
55 
     | 
    
         
             
            describe "ey ssh" do
         
     | 
| 
       15 
56 
     | 
    
         
             
              it_should_behave_like "running ey ssh"
         
     | 
| 
       16 
57 
     | 
    
         | 
| 
         @@ -20,7 +61,7 @@ describe "ey ssh" do 
     | 
|
| 
       20 
61 
     | 
    
         | 
| 
       21 
62 
     | 
    
         
             
              it "complains if it has no app master" do
         
     | 
| 
       22 
63 
     | 
    
         
             
                ey "ssh -e bakon", :expect_failure => true
         
     | 
| 
       23 
     | 
    
         
            -
                @err.should =~ /'bakon' does not have  
     | 
| 
      
 64 
     | 
    
         
            +
                @err.should =~ /'bakon' does not have any matching instances/
         
     | 
| 
       24 
65 
     | 
    
         
             
              end
         
     | 
| 
       25 
66 
     | 
    
         | 
| 
       26 
67 
     | 
    
         
             
            end
         
     | 
| 
         @@ -59,56 +100,89 @@ describe "ey ssh with a command" do 
     | 
|
| 
       59 
100 
     | 
    
         
             
              it_should_behave_like "it takes an environment name"
         
     | 
| 
       60 
101 
     | 
    
         
             
            end
         
     | 
| 
       61 
102 
     | 
    
         | 
| 
      
 103 
     | 
    
         
            +
            describe "ey ssh --all" do
         
     | 
| 
      
 104 
     | 
    
         
            +
              before do
         
     | 
| 
      
 105 
     | 
    
         
            +
                @ssh_flag = "--all"
         
     | 
| 
      
 106 
     | 
    
         
            +
                @hosts = %w(app_hostname 
         
     | 
| 
      
 107 
     | 
    
         
            +
                            app_master_hostname 
         
     | 
| 
      
 108 
     | 
    
         
            +
                            util_fluffy_hostname 
         
     | 
| 
      
 109 
     | 
    
         
            +
                            util_rocky_hostname 
         
     | 
| 
      
 110 
     | 
    
         
            +
                            db_master_hostname 
         
     | 
| 
      
 111 
     | 
    
         
            +
                            db_slave_1_hostname 
         
     | 
| 
      
 112 
     | 
    
         
            +
                            db_slave_2_hostname)
         
     | 
| 
      
 113 
     | 
    
         
            +
              end
         
     | 
| 
       62 
114 
     | 
    
         | 
| 
       63 
     | 
    
         
            -
            describe "ey ssh --all with a command" do
         
     | 
| 
       64 
115 
     | 
    
         
             
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 116 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
      
 117 
     | 
    
         
            +
            end
         
     | 
| 
       65 
118 
     | 
    
         | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
                 
     | 
| 
       69 
     | 
    
         
            -
                 
     | 
| 
       70 
     | 
    
         
            -
                cmd
         
     | 
| 
      
 119 
     | 
    
         
            +
            describe "ey ssh --app-servers" do
         
     | 
| 
      
 120 
     | 
    
         
            +
              before do
         
     | 
| 
      
 121 
     | 
    
         
            +
                @ssh_flag = "--app-servers"
         
     | 
| 
      
 122 
     | 
    
         
            +
                @hosts = %w(app_hostname app_master_hostname)
         
     | 
| 
       71 
123 
     | 
    
         
             
              end
         
     | 
| 
       72 
124 
     | 
    
         | 
| 
       73 
     | 
    
         
            -
               
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                run_ey(:env => 'giblets', :verbose => true)
         
     | 
| 
       76 
     | 
    
         
            -
                @raw_ssh_commands.count do |command|
         
     | 
| 
       77 
     | 
    
         
            -
                  command =~ /^ssh turkey@.+ ls$/
         
     | 
| 
       78 
     | 
    
         
            -
                end.should == 4
         
     | 
| 
       79 
     | 
    
         
            -
              end
         
     | 
| 
      
 125 
     | 
    
         
            +
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 126 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
       80 
127 
     | 
    
         
             
            end
         
     | 
| 
       81 
128 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
            describe "ey ssh -- 
     | 
| 
      
 129 
     | 
    
         
            +
            describe "ey ssh --db-master" do
         
     | 
| 
      
 130 
     | 
    
         
            +
              before do
         
     | 
| 
      
 131 
     | 
    
         
            +
                @ssh_flag = "--db-master"
         
     | 
| 
      
 132 
     | 
    
         
            +
                @hosts = %w(db_master_hostname)
         
     | 
| 
      
 133 
     | 
    
         
            +
              end
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
       83 
135 
     | 
    
         
             
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 136 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
      
 137 
     | 
    
         
            +
            end
         
     | 
| 
       84 
138 
     | 
    
         | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
                 
     | 
| 
       88 
     | 
    
         
            -
                 
     | 
| 
       89 
     | 
    
         
            -
                cmd
         
     | 
| 
      
 139 
     | 
    
         
            +
            describe "ey ssh --db-slaves" do
         
     | 
| 
      
 140 
     | 
    
         
            +
              before do
         
     | 
| 
      
 141 
     | 
    
         
            +
                @ssh_flag = "--db-slaves"
         
     | 
| 
      
 142 
     | 
    
         
            +
                @hosts = %w(db_slave_1_hostname db_slave_2_hostname)
         
     | 
| 
       90 
143 
     | 
    
         
             
              end
         
     | 
| 
       91 
144 
     | 
    
         | 
| 
       92 
     | 
    
         
            -
               
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
      
 145 
     | 
    
         
            +
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 146 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
      
 147 
     | 
    
         
            +
            end
         
     | 
| 
      
 148 
     | 
    
         
            +
             
     | 
| 
      
 149 
     | 
    
         
            +
            describe "ey ssh --db-servers" do
         
     | 
| 
      
 150 
     | 
    
         
            +
              before do
         
     | 
| 
      
 151 
     | 
    
         
            +
                @ssh_flag = "--db-servers"
         
     | 
| 
      
 152 
     | 
    
         
            +
                @hosts = %w(db_master_hostname db_slave_1_hostname db_slave_2_hostname)
         
     | 
| 
       96 
153 
     | 
    
         
             
              end
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 156 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
       97 
157 
     | 
    
         
             
            end
         
     | 
| 
       98 
158 
     | 
    
         | 
| 
       99 
     | 
    
         
            -
            describe "ey ssh -- 
     | 
| 
      
 159 
     | 
    
         
            +
            describe "ey ssh --utilities" do
         
     | 
| 
      
 160 
     | 
    
         
            +
              before do
         
     | 
| 
      
 161 
     | 
    
         
            +
                @ssh_flag = "--utilities"
         
     | 
| 
      
 162 
     | 
    
         
            +
                @hosts = %w(util_fluffy_hostname util_rocky_hostname)
         
     | 
| 
      
 163 
     | 
    
         
            +
              end
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
       100 
165 
     | 
    
         
             
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 166 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
      
 167 
     | 
    
         
            +
            end
         
     | 
| 
       101 
168 
     | 
    
         | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                 
     | 
| 
       105 
     | 
    
         
            -
                 
     | 
| 
       106 
     | 
    
         
            -
                cmd
         
     | 
| 
      
 169 
     | 
    
         
            +
            describe "ey ssh --utilities fluffy" do
         
     | 
| 
      
 170 
     | 
    
         
            +
              before do
         
     | 
| 
      
 171 
     | 
    
         
            +
                @ssh_flag = "--utilities fluffy"
         
     | 
| 
      
 172 
     | 
    
         
            +
                @hosts = %w(util_fluffy_hostname)
         
     | 
| 
       107 
173 
     | 
    
         
             
              end
         
     | 
| 
       108 
174 
     | 
    
         | 
| 
       109 
     | 
    
         
            -
               
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
      
 175 
     | 
    
         
            +
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 176 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
      
 177 
     | 
    
         
            +
            end
         
     | 
| 
      
 178 
     | 
    
         
            +
             
     | 
| 
      
 179 
     | 
    
         
            +
            describe "ey ssh --utilities fluffy rocky" do
         
     | 
| 
      
 180 
     | 
    
         
            +
              before do
         
     | 
| 
      
 181 
     | 
    
         
            +
                @ssh_flag = "--utilities fluffy rocky"
         
     | 
| 
      
 182 
     | 
    
         
            +
                @hosts = %w(util_fluffy_hostname util_rocky_hostname)
         
     | 
| 
       113 
183 
     | 
    
         
             
              end
         
     | 
| 
      
 184 
     | 
    
         
            +
             
     | 
| 
      
 185 
     | 
    
         
            +
              it_should_behave_like "running ey ssh"
         
     | 
| 
      
 186 
     | 
    
         
            +
              it_should_behave_like "running ey ssh for select role"
         
     | 
| 
       114 
187 
     | 
    
         
             
            end
         
     | 
| 
      
 188 
     | 
    
         
            +
             
     | 
    
        data/spec/support/fake_awsm.ru
    CHANGED
    
    | 
         @@ -151,7 +151,7 @@ private 
     | 
|
| 
       151 
151 
     | 
    
         
             
                            "id" => 27220,
         
     | 
| 
       152 
152 
     | 
    
         
             
                            "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       153 
153 
     | 
    
         
             
                            "role" => "solo",
         
     | 
| 
       154 
     | 
    
         
            -
                            "public_hostname" => " 
     | 
| 
      
 154 
     | 
    
         
            +
                            "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}],
         
     | 
| 
       155 
155 
     | 
    
         
             
                        "name" => "giblets",
         
     | 
| 
       156 
156 
     | 
    
         
             
                        "apps" => [],
         
     | 
| 
       157 
157 
     | 
    
         
             
                        "instances_count" => 1,
         
     | 
| 
         @@ -163,7 +163,7 @@ private 
     | 
|
| 
       163 
163 
     | 
    
         
             
                          "id" => 27220,
         
     | 
| 
       164 
164 
     | 
    
         
             
                          "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       165 
165 
     | 
    
         
             
                          "role" => "solo",
         
     | 
| 
       166 
     | 
    
         
            -
                          "public_hostname" => " 
     | 
| 
      
 166 
     | 
    
         
            +
                          "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}}]
         
     | 
| 
       167 
167 
     | 
    
         
             
                  end
         
     | 
| 
       168 
168 
     | 
    
         
             
                end # UnlinkedApp
         
     | 
| 
       169 
169 
     | 
    
         | 
| 
         @@ -175,28 +175,49 @@ private 
     | 
|
| 
       175 
175 
     | 
    
         
             
                        "name" => nil,
         
     | 
| 
       176 
176 
     | 
    
         
             
                        "status" => "running",
         
     | 
| 
       177 
177 
     | 
    
         
             
                        "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       178 
     | 
    
         
            -
                        "public_hostname" => " 
     | 
| 
      
 178 
     | 
    
         
            +
                        "public_hostname" => "app_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
       179 
179 
     | 
    
         
             
                      }, {
         
     | 
| 
       180 
180 
     | 
    
         
             
                        "id" => 22721,
         
     | 
| 
       181 
181 
     | 
    
         
             
                        "name" => nil,
         
     | 
| 
       182 
182 
     | 
    
         
             
                        "role" => "db_master",
         
     | 
| 
       183 
183 
     | 
    
         
             
                        "status" => "running",
         
     | 
| 
       184 
184 
     | 
    
         
             
                        "amazon_id" => "i-d4cdddbf",
         
     | 
| 
       185 
     | 
    
         
            -
                        "public_hostname" => " 
     | 
| 
      
 185 
     | 
    
         
            +
                        "public_hostname" => "db_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
      
 186 
     | 
    
         
            +
                      }, {
         
     | 
| 
      
 187 
     | 
    
         
            +
                        "id" => 22724,
         
     | 
| 
      
 188 
     | 
    
         
            +
                        "name" => nil,
         
     | 
| 
      
 189 
     | 
    
         
            +
                        "role" => "db_slave",
         
     | 
| 
      
 190 
     | 
    
         
            +
                        "status" => "running",
         
     | 
| 
      
 191 
     | 
    
         
            +
                        "amazon_id" => "i-asdfasdfaj",
         
     | 
| 
      
 192 
     | 
    
         
            +
                        "public_hostname" => "db_slave_1_hostname.compute-1.amazonaws.com",
         
     | 
| 
      
 193 
     | 
    
         
            +
                      }, {
         
     | 
| 
      
 194 
     | 
    
         
            +
                        "id" => 22725,
         
     | 
| 
      
 195 
     | 
    
         
            +
                        "name" => nil,
         
     | 
| 
      
 196 
     | 
    
         
            +
                        "role" => "db_slave",
         
     | 
| 
      
 197 
     | 
    
         
            +
                        "status" => "running",
         
     | 
| 
      
 198 
     | 
    
         
            +
                        "amazon_id" => "i-asdfasdfaj",
         
     | 
| 
      
 199 
     | 
    
         
            +
                        "public_hostname" => "db_slave_2_hostname.compute-1.amazonaws.com",
         
     | 
| 
       186 
200 
     | 
    
         
             
                      }, {
         
     | 
| 
       187 
201 
     | 
    
         
             
                        "id" => 22722,
         
     | 
| 
       188 
202 
     | 
    
         
             
                        "role" => "app",
         
     | 
| 
       189 
203 
     | 
    
         
             
                        "name" => nil,
         
     | 
| 
       190 
204 
     | 
    
         
             
                        "status" => "building",
         
     | 
| 
       191 
205 
     | 
    
         
             
                        "amazon_id" => "i-d2e3f1b9",
         
     | 
| 
       192 
     | 
    
         
            -
                        "public_hostname" => " 
     | 
| 
      
 206 
     | 
    
         
            +
                        "public_hostname" => "app_hostname.compute-1.amazonaws.com",
         
     | 
| 
       193 
207 
     | 
    
         
             
                      }, {
         
     | 
| 
       194 
208 
     | 
    
         
             
                        "id" => 22723,
         
     | 
| 
       195 
209 
     | 
    
         
             
                        "role" => "util",
         
     | 
| 
       196 
210 
     | 
    
         
             
                        "name" => "fluffy",
         
     | 
| 
       197 
211 
     | 
    
         
             
                        "status" => "running",
         
     | 
| 
       198 
212 
     | 
    
         
             
                        "amazon_id" => "i-80e3f1eb",
         
     | 
| 
       199 
     | 
    
         
            -
                        "public_hostname" => " 
     | 
| 
      
 213 
     | 
    
         
            +
                        "public_hostname" => "util_fluffy_hostname.compute-1.amazonaws.com",
         
     | 
| 
      
 214 
     | 
    
         
            +
                      }, {
         
     | 
| 
      
 215 
     | 
    
         
            +
                        "id" => 22727,
         
     | 
| 
      
 216 
     | 
    
         
            +
                        "role" => "util",
         
     | 
| 
      
 217 
     | 
    
         
            +
                        "name" => "rocky",
         
     | 
| 
      
 218 
     | 
    
         
            +
                        "status" => "running",
         
     | 
| 
      
 219 
     | 
    
         
            +
                        "amazon_id" => "i-80etf1eb",
         
     | 
| 
      
 220 
     | 
    
         
            +
                        "public_hostname" => "util_rocky_hostname.compute-1.amazonaws.com",
         
     | 
| 
       200 
221 
     | 
    
         
             
                      }]
         
     | 
| 
       201 
222 
     | 
    
         
             
                  end
         
     | 
| 
       202 
223 
     | 
    
         
             
                  private :_instances
         
     | 
| 
         @@ -308,7 +329,7 @@ private 
     | 
|
| 
       308 
329 
     | 
    
         
             
                                "id" => 27220,
         
     | 
| 
       309 
330 
     | 
    
         
             
                                "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       310 
331 
     | 
    
         
             
                                "role" => "solo",
         
     | 
| 
       311 
     | 
    
         
            -
                                "public_hostname" => " 
     | 
| 
      
 332 
     | 
    
         
            +
                                "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}],
         
     | 
| 
       312 
333 
     | 
    
         
             
                            "name" => "giblets",
         
     | 
| 
       313 
334 
     | 
    
         
             
                            "apps" => apps,
         
     | 
| 
       314 
335 
     | 
    
         
             
                            "instances_count" => 1,
         
     | 
| 
         @@ -320,7 +341,7 @@ private 
     | 
|
| 
       320 
341 
     | 
    
         
             
                              "id" => 27220,
         
     | 
| 
       321 
342 
     | 
    
         
             
                              "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       322 
343 
     | 
    
         
             
                              "role" => "solo",
         
     | 
| 
       323 
     | 
    
         
            -
                              "public_hostname" => " 
     | 
| 
      
 344 
     | 
    
         
            +
                              "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}
         
     | 
| 
       324 
345 
     | 
    
         
             
                          }, {
         
     | 
| 
       325 
346 
     | 
    
         
             
                            "ssh_username" => "ham",
         
     | 
| 
       326 
347 
     | 
    
         
             
                            "instances" => [],
         
     | 
| 
         @@ -342,7 +363,7 @@ private 
     | 
|
| 
       342 
363 
     | 
    
         
             
                            "id" => 27220,
         
     | 
| 
       343 
364 
     | 
    
         
             
                            "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       344 
365 
     | 
    
         
             
                            "role" => "solo",
         
     | 
| 
       345 
     | 
    
         
            -
                            "public_hostname" => " 
     | 
| 
      
 366 
     | 
    
         
            +
                            "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}],
         
     | 
| 
       346 
367 
     | 
    
         
             
                        "name" => "giblets",
         
     | 
| 
       347 
368 
     | 
    
         
             
                        "apps" => [{
         
     | 
| 
       348 
369 
     | 
    
         
             
                            "name" => "rails232app",
         
     | 
| 
         @@ -356,7 +377,7 @@ private 
     | 
|
| 
       356 
377 
     | 
    
         
             
                          "id" => 27220,
         
     | 
| 
       357 
378 
     | 
    
         
             
                          "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       358 
379 
     | 
    
         
             
                          "role" => "solo",
         
     | 
| 
       359 
     | 
    
         
            -
                          "public_hostname" => " 
     | 
| 
      
 380 
     | 
    
         
            +
                          "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}
         
     | 
| 
       360 
381 
     | 
    
         
             
                      }, {
         
     | 
| 
       361 
382 
     | 
    
         
             
                        "ssh_username" => "ham",
         
     | 
| 
       362 
383 
     | 
    
         
             
                        "instances" => [],
         
     | 
| 
         @@ -399,7 +420,7 @@ private 
     | 
|
| 
       399 
420 
     | 
    
         
             
                      "status" => "running",
         
     | 
| 
       400 
421 
     | 
    
         
             
                      "name" => nil,
         
     | 
| 
       401 
422 
     | 
    
         
             
                      "role" => "solo",
         
     | 
| 
       402 
     | 
    
         
            -
                      "public_hostname" => " 
     | 
| 
      
 423 
     | 
    
         
            +
                      "public_hostname" => "app_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
       403 
424 
     | 
    
         
             
                      "id" => 75428,
         
     | 
| 
       404 
425 
     | 
    
         
             
                      "amazon_id" => "i-051195b9",
         
     | 
| 
       405 
426 
     | 
    
         
             
                    }
         
     | 
| 
         @@ -489,7 +510,7 @@ private 
     | 
|
| 
       489 
510 
     | 
    
         
             
                                "id" => 27220,
         
     | 
| 
       490 
511 
     | 
    
         
             
                                "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       491 
512 
     | 
    
         
             
                                "role" => "solo",
         
     | 
| 
       492 
     | 
    
         
            -
                                "public_hostname" => " 
     | 
| 
      
 513 
     | 
    
         
            +
                                "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}],
         
     | 
| 
       493 
514 
     | 
    
         
             
                            "name" => "railsapp_production",
         
     | 
| 
       494 
515 
     | 
    
         
             
                            "apps" => apps,
         
     | 
| 
       495 
516 
     | 
    
         
             
                            "instances_count" => 1,
         
     | 
| 
         @@ -501,7 +522,7 @@ private 
     | 
|
| 
       501 
522 
     | 
    
         
             
                              "id" => 27220,
         
     | 
| 
       502 
523 
     | 
    
         
             
                              "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       503 
524 
     | 
    
         
             
                              "role" => "solo",
         
     | 
| 
       504 
     | 
    
         
            -
                              "public_hostname" => " 
     | 
| 
      
 525 
     | 
    
         
            +
                              "public_hostname" => "app_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
       505 
526 
     | 
    
         
             
                            },
         
     | 
| 
       506 
527 
     | 
    
         
             
                          }, {
         
     | 
| 
       507 
528 
     | 
    
         
             
                            "ssh_username" => "ham",
         
     | 
| 
         @@ -529,7 +550,7 @@ private 
     | 
|
| 
       529 
550 
     | 
    
         
             
                                "status" => "running",
         
     | 
| 
       530 
551 
     | 
    
         
             
                                "id" => 59395,
         
     | 
| 
       531 
552 
     | 
    
         
             
                                "role" => "solo",
         
     | 
| 
       532 
     | 
    
         
            -
                                "public_hostname" => " 
     | 
| 
      
 553 
     | 
    
         
            +
                                "public_hostname" => "app_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
       533 
554 
     | 
    
         
             
                              }],
         
     | 
| 
       534 
555 
     | 
    
         
             
                            "name" => "railsapp_staging_2",
         
     | 
| 
       535 
556 
     | 
    
         
             
                            "apps" => apps,
         
     | 
| 
         @@ -555,7 +576,7 @@ private 
     | 
|
| 
       555 
576 
     | 
    
         
             
                            "id" => 27220,
         
     | 
| 
       556 
577 
     | 
    
         
             
                            "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
       557 
578 
     | 
    
         
             
                            "role" => "solo",
         
     | 
| 
       558 
     | 
    
         
            -
                            "public_hostname" => " 
     | 
| 
      
 579 
     | 
    
         
            +
                            "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"}],
         
     | 
| 
       559 
580 
     | 
    
         
             
                        "name" => "railsapp_production",
         
     | 
| 
       560 
581 
     | 
    
         
             
                        "apps" => [{
         
     | 
| 
       561 
582 
     | 
    
         
             
                            "name" => "rails232app",
         
     | 
| 
         @@ -565,7 +586,7 @@ private 
     | 
|
| 
       565 
586 
     | 
    
         
             
                        "id" => 200,
         
     | 
| 
       566 
587 
     | 
    
         
             
                        "framework_env" => "production",
         
     | 
| 
       567 
588 
     | 
    
         
             
                        "app_master" => {
         
     | 
| 
       568 
     | 
    
         
            -
                          "public_hostname" => " 
     | 
| 
      
 589 
     | 
    
         
            +
                          "public_hostname" => "app_master_hostname.compute-1.amazonaws.com",
         
     | 
| 
       569 
590 
     | 
    
         
             
                          "status" => "running",
         
     | 
| 
       570 
591 
     | 
    
         
             
                          "id" => 27220,
         
     | 
| 
       571 
592 
     | 
    
         
             
                          "amazon_id" => 'i-ddbbdd92',
         
     | 
| 
         @@ -32,7 +32,7 @@ shared_examples_for "it takes an environment name" do 
     | 
|
| 
       32 
32 
     | 
    
         
             
                verify_ran(make_scenario({
         
     | 
| 
       33 
33 
     | 
    
         
             
                      :environment      => 'giblets',
         
     | 
| 
       34 
34 
     | 
    
         
             
                      :application      => 'rails232app',
         
     | 
| 
       35 
     | 
    
         
            -
                      :master_hostname  => ' 
     | 
| 
      
 35 
     | 
    
         
            +
                      :master_hostname  => 'app_master_hostname.compute-1.amazonaws.com',
         
     | 
| 
       36 
36 
     | 
    
         
             
                      :ssh_username     => 'turkey',
         
     | 
| 
       37 
37 
     | 
    
         
             
                    }))
         
     | 
| 
       38 
38 
     | 
    
         
             
              end
         
     | 
| 
         @@ -59,7 +59,7 @@ shared_examples_for "it takes an environment name" do 
     | 
|
| 
       59 
59 
     | 
    
         
             
                  verify_ran(make_scenario({
         
     | 
| 
       60 
60 
     | 
    
         
             
                        :environment      => 'railsapp_production',
         
     | 
| 
       61 
61 
     | 
    
         
             
                        :application      => 'rails232app',
         
     | 
| 
       62 
     | 
    
         
            -
                        :master_hostname  => ' 
     | 
| 
      
 62 
     | 
    
         
            +
                        :master_hostname  => 'app_master_hostname.compute-1.amazonaws.com',
         
     | 
| 
       63 
63 
     | 
    
         
             
                        :ssh_username     => 'turkey',
         
     | 
| 
       64 
64 
     | 
    
         
             
                      }))
         
     | 
| 
       65 
65 
     | 
    
         
             
                end
         
     | 
| 
         @@ -82,7 +82,7 @@ shared_examples_for "it takes an app name" do 
     | 
|
| 
       82 
82 
     | 
    
         
             
                  verify_ran(make_scenario({
         
     | 
| 
       83 
83 
     | 
    
         
             
                        :environment      => 'giblets',
         
     | 
| 
       84 
84 
     | 
    
         
             
                        :application      => 'rails232app',
         
     | 
| 
       85 
     | 
    
         
            -
                        :master_hostname  => ' 
     | 
| 
      
 85 
     | 
    
         
            +
                        :master_hostname  => 'app_master_hostname.compute-1.amazonaws.com',
         
     | 
| 
       86 
86 
     | 
    
         
             
                        :ssh_username     => 'turkey',
         
     | 
| 
       87 
87 
     | 
    
         
             
                      }))
         
     | 
| 
       88 
88 
     | 
    
         
             
                end
         
     | 
| 
         @@ -95,7 +95,7 @@ shared_examples_for "it takes an app name" do 
     | 
|
| 
       95 
95 
     | 
    
         
             
                  verify_ran(make_scenario({
         
     | 
| 
       96 
96 
     | 
    
         
             
                        :environment      => 'giblets',
         
     | 
| 
       97 
97 
     | 
    
         
             
                        :application      => 'rails232app',
         
     | 
| 
       98 
     | 
    
         
            -
                        :master_hostname  => ' 
     | 
| 
      
 98 
     | 
    
         
            +
                        :master_hostname  => 'app_master_hostname.compute-1.amazonaws.com',
         
     | 
| 
       99 
99 
     | 
    
         
             
                        :ssh_username     => 'turkey',
         
     | 
| 
       100 
100 
     | 
    
         
             
                      }))
         
     | 
| 
       101 
101 
     | 
    
         
             
                end
         
     | 
| 
         @@ -125,12 +125,12 @@ shared_examples_for "it invokes ey-deploy" do 
     | 
|
| 
       125 
125 
     | 
    
         | 
| 
       126 
126 
     | 
    
         
             
                it "passes along instance information to ey-deploy" do
         
     | 
| 
       127 
127 
     | 
    
         
             
                  instance_args = [
         
     | 
| 
       128 
     | 
    
         
            -
                    Regexp.quote(" 
     | 
| 
       129 
     | 
    
         
            -
                    Regexp.quote(" 
     | 
| 
       130 
     | 
    
         
            -
                    Regexp.quote(" 
     | 
| 
      
 128 
     | 
    
         
            +
                    Regexp.quote("app_master_hostname.compute-1.amazonaws.com,app_master"),
         
     | 
| 
      
 129 
     | 
    
         
            +
                    Regexp.quote("app_hostname.compute-1.amazonaws.com,app"),
         
     | 
| 
      
 130 
     | 
    
         
            +
                    Regexp.quote("util_fluffy_hostname.compute-1.amazonaws.com,util,fluffy"),
         
     | 
| 
       131 
131 
     | 
    
         
             
                  ]
         
     | 
| 
       132 
132 
     | 
    
         | 
| 
       133 
     | 
    
         
            -
                  db_instance = Regexp.quote(" 
     | 
| 
      
 133 
     | 
    
         
            +
                  db_instance = Regexp.quote("db_master_hostname.compute-1.amazonaws.com,db_master")
         
     | 
| 
       134 
134 
     | 
    
         | 
| 
       135 
135 
     | 
    
         
             
                  # apps + utilities are all mentioned
         
     | 
| 
       136 
136 
     | 
    
         
             
                  instance_args.each do |i|
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 1
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 1
         
     | 
| 
       8 
9 
     | 
    
         
             
              - 0
         
     | 
| 
       9 
     | 
    
         
            -
               
     | 
| 
       10 
     | 
    
         
            -
              version: 1.0.2
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 1.1.0
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - EY Cloud Team
         
     | 
| 
         @@ -15,23 +15,21 @@ autorequire: 
     | 
|
| 
       15 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date: 2010- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2010-08-04 00:00:00 -07:00
         
     | 
| 
       19 
19 
     | 
    
         
             
            default_executable: ey
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       23 
23 
     | 
    
         
             
                none: false
         
     | 
| 
       24 
24 
     | 
    
         
             
                requirements: 
         
     | 
| 
       25 
     | 
    
         
            -
                - -  
     | 
| 
      
 25 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       26 
26 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       27 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 27 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
       28 
28 
     | 
    
         
             
                    segments: 
         
     | 
| 
       29 
29 
     | 
    
         
             
                    - 0
         
     | 
| 
       30 
     | 
    
         
            -
                     
     | 
| 
       31 
     | 
    
         
            -
                    - 8
         
     | 
| 
       32 
     | 
    
         
            -
                    version: 0.13.8
         
     | 
| 
      
 30 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
       33 
31 
     | 
    
         
             
              requirement: *id001
         
     | 
| 
       34 
     | 
    
         
            -
              name:  
     | 
| 
      
 32 
     | 
    
         
            +
              name: termios
         
     | 
| 
       35 
33 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       37 
35 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -43,10 +41,11 @@ dependencies: 
     | 
|
| 
       43 
41 
     | 
    
         
             
                    hash: 7
         
     | 
| 
       44 
42 
     | 
    
         
             
                    segments: 
         
     | 
| 
       45 
43 
     | 
    
         
             
                    - 1
         
     | 
| 
       46 
     | 
    
         
            -
                    -  
     | 
| 
       47 
     | 
    
         
            -
                     
     | 
| 
      
 44 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 45 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 46 
     | 
    
         
            +
                    version: 1.5.2
         
     | 
| 
       48 
47 
     | 
    
         
             
              requirement: *id002
         
     | 
| 
       49 
     | 
    
         
            -
              name:  
     | 
| 
      
 48 
     | 
    
         
            +
              name: highline
         
     | 
| 
       50 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       51 
50 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       52 
51 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -55,28 +54,30 @@ dependencies: 
     | 
|
| 
       55 
54 
     | 
    
         
             
                requirements: 
         
     | 
| 
       56 
55 
     | 
    
         
             
                - - ~>
         
     | 
| 
       57 
56 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       58 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 57 
     | 
    
         
            +
                    hash: 39
         
     | 
| 
       59 
58 
     | 
    
         
             
                    segments: 
         
     | 
| 
       60 
     | 
    
         
            -
                    -  
     | 
| 
       61 
     | 
    
         
            -
                    -  
     | 
| 
       62 
     | 
    
         
            -
                    -  
     | 
| 
       63 
     | 
    
         
            -
                    version:  
     | 
| 
      
 59 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 60 
     | 
    
         
            +
                    - 14
         
     | 
| 
      
 61 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 62 
     | 
    
         
            +
                    version: 0.14.0
         
     | 
| 
       64 
63 
     | 
    
         
             
              requirement: *id003
         
     | 
| 
       65 
     | 
    
         
            -
              name:  
     | 
| 
      
 64 
     | 
    
         
            +
              name: thor
         
     | 
| 
       66 
65 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       67 
66 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       68 
67 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       69 
68 
     | 
    
         
             
              version_requirements: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
       70 
69 
     | 
    
         
             
                none: false
         
     | 
| 
       71 
70 
     | 
    
         
             
                requirements: 
         
     | 
| 
       72 
     | 
    
         
            -
                - -  
     | 
| 
      
 71 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       73 
72 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       74 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 73 
     | 
    
         
            +
                    hash: 23
         
     | 
| 
       75 
74 
     | 
    
         
             
                    segments: 
         
     | 
| 
       76 
75 
     | 
    
         
             
                    - 0
         
     | 
| 
       77 
     | 
    
         
            -
                     
     | 
| 
      
 76 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 77 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 78 
     | 
    
         
            +
                    version: 0.0.4
         
     | 
| 
       78 
79 
     | 
    
         
             
              requirement: *id004
         
     | 
| 
       79 
     | 
    
         
            -
              name:  
     | 
| 
      
 80 
     | 
    
         
            +
              name: escape
         
     | 
| 
       80 
81 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       81 
82 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       82 
83 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -101,14 +102,13 @@ dependencies: 
     | 
|
| 
       101 
102 
     | 
    
         
             
                requirements: 
         
     | 
| 
       102 
103 
     | 
    
         
             
                - - ~>
         
     | 
| 
       103 
104 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       104 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 105 
     | 
    
         
            +
                    hash: 7
         
     | 
| 
       105 
106 
     | 
    
         
             
                    segments: 
         
     | 
| 
       106 
     | 
    
         
            -
                    -  
     | 
| 
       107 
     | 
    
         
            -
                    - 0
         
     | 
| 
      
 107 
     | 
    
         
            +
                    - 1
         
     | 
| 
       108 
108 
     | 
    
         
             
                    - 4
         
     | 
| 
       109 
     | 
    
         
            -
                    version:  
     | 
| 
      
 109 
     | 
    
         
            +
                    version: "1.4"
         
     | 
| 
       110 
110 
     | 
    
         
             
              requirement: *id006
         
     | 
| 
       111 
     | 
    
         
            -
              name:  
     | 
| 
      
 111 
     | 
    
         
            +
              name: rest-client
         
     | 
| 
       112 
112 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       113 
113 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       114 
114 
     | 
    
         
             
            description: This gem allows you to deploy your rails application to the Engine Yard cloud directly from the command line.
         
     |