Class: MotherBrain::Provisioner::AWS
- Defined in:
- lib/mb/provisioners/aws.rb
Overview
Provisioner adapter for AWS/Eucalyptus
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#down(job, environment, options = {}) ⇒ Object
Terminate instances for the given environment.
-
#up(job, env_name, manifest, plugin, options = {}) ⇒ Array<Hash>
Provision nodes in the environment based on the contents of the given manifest.
Methods inherited from Base
#initialize, register_provisioner, validate_create
Methods included from Logging
add_argument_header, dev, filename, #log_exception, logger, #logger, reset, set_logger, setup
Constructor Details
This class inherits a constructor from MotherBrain::Provisioner::Base
Instance Method Details
#down(job, environment, options = {}) ⇒ Object
Terminate instances for the given environment
41 42 43 44 45 46 47 |
# File 'lib/mb/provisioners/aws.rb', line 41 def down(job, environment, = {}) job.set_status "Searching for instances to terminate" instance_ids = instance_ids_for_environment(environment) terminate_instance_ids job, instance_ids remove_provision_data job, environment, instance_ids end |
#up(job, env_name, manifest, plugin, options = {}) ⇒ Array<Hash>
Provision nodes in the environment based on the contents of the given manifest
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/mb/provisioners/aws.rb', line 24 def up(job, env_name, manifest, plugin, = {}) job.set_status "Starting provision" fog = fog_connection(manifest) (job, manifest) instances = create_instances(job, manifest, fog) store_provision_data job, env_name, instances_as_manifest(instances) verified_instances = verify_instances(job, fog, instances) verify_connection(job, fog, manifest, verified_instances) instances_as_manifest(verified_instances) end |