Class: Scenario::OneAppManySimilarlyNamedEnvs

Inherits:
Base
  • Object
show all
Defined in:
lib/engineyard-cloud-client/test/fake_awsm/scenarios.rb

Overview

TwoAppsSameGitUri

Instance Attribute Summary

Attributes inherited from Base

#git_remote, #user

Instance Method Summary collapse

Constructor Details

#initialize(name = 'One App Similarly Named Envs', email = '[email protected]', pass = '1apptwinrepos') ⇒ OneAppManySimilarlyNamedEnvs

Returns a new instance of OneAppManySimilarlyNamedEnvs.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/engineyard-cloud-client/test/fake_awsm/scenarios.rb', line 280

def initialize(name = 'One App Similarly Named Envs', email = '[email protected]', pass = '1apptwinrepos')
  super
  @app = @account.apps.create({
    "name" => "rails232app",
    "repository_uri" => git_remote
  })

  @env1 = @account.environments.create({
    "ssh_username" => "turkey",
    "name" => "railsapp_production",
    "load_balancer_ip_address" => '127.0.0.0',
    "app_server_stack_name" => "nginx_mongrel",
    "framework_env" => "production",
  })
  @env1.instances.create({
    "status" => "running",
    "amazon_id" => 'i-ddbbdd92',
    "role" => "solo",
    "public_hostname" => "app_master_hostname.compute-1.amazonaws.com"
  })

  @env2 = @account.environments.create({
    "ssh_username" => "ham",
    "name" => "railsapp_staging",
    "load_balancer_ip_address" => '127.3.2.1',
    "app_server_stack_name" => "nginx_passenger",
    "framework_env" => "production",
  })

  @env2.instances.create({
    "public_hostname" => '127.3.2.1',
    "status" => "running",
    "role" => "solo",
  })
  @env3 = @account.environments.create({
    "ssh_username" => "ham",
    "name" => "railsapp_staging_2",
    "app_server_stack_name" => "nginx_passenger",
    "load_balancer_ip_address" => '127.0.0.2',
    "framework_env" => "production",
  })
  @env3.instances.create({
    "status" => "running",
    "role" => "solo",
    "public_hostname" => "ec2-174-129-198-124.compute-1.amazonaws.com",
  })

  @app.app_environments.create(:environment => @env1)
  @app.app_environments.create(:environment => @env2)
  @app.app_environments.create(:environment => @env3)
end