Class: Bosh::Aws::BoshManifest
Instance Attribute Summary collapse
#hm_director_password, #hm_director_user, #route53_receipt, #vpc_receipt
Instance Method Summary
collapse
#access_key_id, #availability_zone, #cache_access_key_id, #cache_bucket_name, #cache_secret_access_key, #certificate, #compiled_package_cache?, #director_ssl, #get_template, #key_pair_name, #name, #private_key_path, #region, #secret_access_key, #ssl_certs, #subnet, #vpc_config
Constructor Details
#initialize(vpc_receipt, route53_receipt, director_uuid, rds_receipt, options = {}) ⇒ BoshManifest
Returns a new instance of BoshManifest.
9
10
11
12
13
14
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 9
def initialize(vpc_receipt, route53_receipt, director_uuid, rds_receipt, options={})
super(vpc_receipt, route53_receipt, options)
@director_uuid = director_uuid
@rds_receipt = rds_receipt
@stemcell_name = 'bosh-aws-xen-ubuntu'
end
|
Instance Attribute Details
#director_uuid ⇒ Object
Returns the value of attribute director_uuid.
5
6
7
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 5
def director_uuid
@director_uuid
end
|
#rds_receipt ⇒ Object
Returns the value of attribute rds_receipt.
5
6
7
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 5
def rds_receipt
@rds_receipt
end
|
#stemcell_name ⇒ Object
Returns the value of attribute stemcell_name.
7
8
9
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 7
def stemcell_name
@stemcell_name
end
|
Instance Method Details
#bosh_deployment_name ⇒ Object
28
29
30
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 28
def bosh_deployment_name
"vpc-bosh-#{name}"
end
|
#bosh_rds_host ⇒ Object
44
45
46
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 44
def bosh_rds_host
bosh_rds_properties['address']
end
|
#bosh_rds_password ⇒ Object
52
53
54
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 52
def bosh_rds_password
bosh_rds_properties['roles'].first['password']
end
|
#bosh_rds_port ⇒ Object
48
49
50
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 48
def bosh_rds_port
bosh_rds_properties['port']
end
|
#bosh_rds_properties ⇒ Object
40
41
42
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 40
def bosh_rds_properties
rds_receipt['deployment_manifest']['properties']['bosh']
end
|
#bosh_rds_user ⇒ Object
56
57
58
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 56
def bosh_rds_user
bosh_rds_properties['roles'].first['name']
end
|
#deployment_name ⇒ Object
20
21
22
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 20
def deployment_name
"bosh"
end
|
#director_ssl_cert ⇒ Object
36
37
38
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 36
def director_ssl_cert
certificate.certificate.gsub("\n", "\n ")
end
|
#director_ssl_key ⇒ Object
32
33
34
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 32
def director_ssl_key
certificate.key.gsub("\n", "\n ")
end
|
#file_name ⇒ Object
16
17
18
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 16
def file_name
"bosh.yml"
end
|
#to_y ⇒ Object
RSpec overloads to_yaml when you set up expectations on an object; so to_y is just a way to get directly at the to_yaml implementation without fighting RSpec.
62
63
64
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 62
def to_y
ERB.new(File.read(get_template("bosh.yml.erb"))).result(binding)
end
|
#to_yaml ⇒ Object
66
67
68
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 66
def to_yaml
to_y
end
|
#vip ⇒ Object
24
25
26
|
# File 'lib/bosh_cli_plugin_aws/bosh_manifest.rb', line 24
def vip
route53_receipt['elastic_ips']['bosh']['ips'][0] || warning('Missing vip field')
end
|