bosh_cli_plugin_aws 1.2448.0 → 1.2479.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,14 @@ module Bosh
28
28
  route53_receipt['elastic_ips']['bat']['ips'][0] || warning('Missing vip field')
29
29
  end
30
30
 
31
+ def static_ip
32
+ ENV.fetch('BOSH_AWS_STATIC_IP', '10.10.0.29')
33
+ end
34
+
35
+ def second_static_ip
36
+ ENV.fetch('BOSH_AWS_SECOND_STATIC_IP', '10.10.0.30')
37
+ end
38
+
31
39
  def to_y
32
40
  ERB.new(File.read(get_template("bat.yml.erb"))).result(binding)
33
41
  end
@@ -36,6 +36,10 @@ module Bosh
36
36
  vpc_receipt['vpc']['subnets']['bosh1'] || warning('Missing bosh subnet field')
37
37
  end
38
38
 
39
+ def network_type
40
+ subnet ? 'manual' : 'dynamic'
41
+ end
42
+
39
43
  def availability_zone
40
44
  vpc_config['vpc']['subnets']['bosh1']['availability_zone'] || warning('Missing availability zone in vpc.subnets.bosh')
41
45
  end
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Aws
3
- VERSION = '1.2448.0'
3
+ VERSION = '1.2479.0'
4
4
  end
5
5
  end
@@ -0,0 +1,33 @@
1
+ class AddTertiaryAzToVpc < Bosh::Aws::Migration
2
+ include Bosh::Aws::MigrationHelper
3
+
4
+ def execute
5
+ vpc_receipt = load_receipt("aws_vpc_receipt")
6
+
7
+ vpc = Bosh::Aws::VPC.find(ec2, vpc_receipt["vpc"]["id"])
8
+
9
+ new_az = ENV["BOSH_VPC_TERTIARY_AZ"] || raise("must define $BOSH_VPC_TERTIARY_AZ")
10
+
11
+ subnets = {
12
+ "bosh3" => {"availability_zone" => new_az, "cidr" => "10.10.128.0/24", "default_route" => "igw"},
13
+ "cf3" => {"availability_zone" => new_az, "cidr" => "10.10.144.0/20", "default_route" => "cf_nat_box1"},
14
+ "services3" => {"availability_zone" => new_az, "cidr" => "10.10.160.0/20", "default_route" => "cf_nat_box1"},
15
+ }
16
+
17
+ existing_subnets = vpc.subnets
18
+
19
+ subnets.reject! { |subnet, _|
20
+ existing_subnets.include?(subnet).tap do |should_skip|
21
+ say " Skipping already-present subnet #{subnet.inspect}" if should_skip
22
+ end
23
+ }
24
+
25
+ vpc.create_subnets(subnets) { |msg| say " #{msg}" }
26
+ vpc.create_nat_instances(subnets)
27
+ vpc.setup_subnet_routes(subnets) { |msg| say " #{msg}" }
28
+
29
+ vpc_receipt["vpc"]["subnets"] = vpc.subnets
30
+ ensure
31
+ save_receipt("aws_vpc_receipt", vpc_receipt)
32
+ end
33
+ end
@@ -0,0 +1,27 @@
1
+ class CreateDiegoSubnets < Bosh::Aws::Migration
2
+ include Bosh::Aws::MigrationHelper
3
+
4
+ def execute
5
+ vpc_receipt = load_receipt("aws_vpc_receipt")
6
+
7
+ vpc = Bosh::Aws::VPC.find(ec2, vpc_receipt["vpc"]["id"])
8
+
9
+ z1 = ENV["BOSH_VPC_PRIMARY_AZ"] || raise("must define $BOSH_VPC_PRIMARY_AZ")
10
+ z2 = ENV["BOSH_VPC_SECONDARY_AZ"] || raise("must define $BOSH_VPC_SECONDARY_AZ")
11
+ z3 = ENV["BOSH_VPC_TERTIARY_AZ"] || raise("must define $BOSH_VPC_TERTIARY_AZ")
12
+
13
+ subnets = {
14
+ "diego1" => { "availability_zone" => z1, "cidr" => "10.10.50.0/25", "default_route" => "cf_nat_box1" },
15
+ "diego2" => { "availability_zone" => z2, "cidr" => "10.10.114.0/25", "default_route" => "cf_nat_box1" },
16
+ "diego3" => { "availability_zone" => z3, "cidr" => "10.10.178.0/25", "default_route" => "cf_nat_box1" },
17
+ }
18
+
19
+ vpc.create_subnets(subnets) { |msg| say " #{msg}" }
20
+ vpc.create_nat_instances(subnets)
21
+ vpc.setup_subnet_routes(subnets) { |msg| say " #{msg}" }
22
+
23
+ vpc_receipt["vpc"]["subnets"] = vpc.subnets
24
+ ensure
25
+ save_receipt("aws_vpc_receipt", vpc_receipt)
26
+ end
27
+ end
@@ -59,7 +59,9 @@ jobs:
59
59
  default: [dns, gateway]
60
60
 
61
61
  properties:
62
- static_ip: <%= vip %>
62
+ vip: <%= vip %>
63
+ static_ip: <%= static_ip %>
64
+ second_static_ip: <%= second_static_ip %>
63
65
  uuid: <%= director_uuid %>
64
66
  pool_size: 1
65
67
  stemcell:
@@ -69,6 +71,7 @@ properties:
69
71
  key_name: <%= key_pair_name %>
70
72
  mbus: nats://nats:0b450ada9f830085e2cdeff6@micro.<%= domain %>:4222
71
73
  network:
74
+ type: <%= network_type %>
72
75
  cidr: 10.10.0.0/24
73
76
  reserved:
74
77
  - <%= reserved_ip_range %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_cli_plugin_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2448.0
4
+ version: 1.2479.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-22 00:00:00.000000000 Z
12
+ date: 2014-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bosh_cli
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.2448.0
21
+ version: 1.2479.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.2448.0
29
+ version: 1.2479.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bosh_aws_cpi
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 1.2448.0
37
+ version: 1.2479.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.2448.0
45
+ version: 1.2479.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: bosh_cli_plugin_micro
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 1.2448.0
53
+ version: 1.2479.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2448.0
61
+ version: 1.2479.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: bosh-stemcell
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 1.2448.0
69
+ version: 1.2479.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 1.2448.0
77
+ version: 1.2479.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rspec
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '0'
110
110
  description: ! 'BOSH plugin to easily create and delete an AWS VPC
111
111
 
112
- c436f4'
112
+ fc12be'
113
113
  email: support@cloudfoundry.com
114
114
  executables: []
115
115
  extensions: []
@@ -147,6 +147,8 @@ files:
147
147
  - migrations/20130531180445_create_bosh_rds_db.rb
148
148
  - migrations/20130826150635_update_elb_for_websockets.rb
149
149
  - migrations/20130827000001_add_secondary_az_to_vpc.rb
150
+ - migrations/20140422000000_add_tertiary_az_to_vpc.rb
151
+ - migrations/20140422000001_create_diego_subnets.rb
150
152
  - templates/aws_configuration_template.yml.erb
151
153
  - templates/aws_migration.erb
152
154
  - templates/aws_migration_spec.erb
@@ -175,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
177
  version: '0'
176
178
  segments:
177
179
  - 0
178
- hash: -3403532980957862977
180
+ hash: -3040842845637435485
179
181
  requirements: []
180
182
  rubyforge_project:
181
183
  rubygems_version: 1.8.23