bosh-bootstrap 0.14.3 → 0.14.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 107abb3ad26122e0fa2fb1e8b2eab29b753ab9e5
4
- data.tar.gz: 25d5e7ef383295c216ba761477fdbab6d58a934d
3
+ metadata.gz: 1db1e4c9d26c75736374f95c83f8f4e83e2b6e6d
4
+ data.tar.gz: 474aa72f98edcaed2359487fc0805b5c7d5a07f3
5
5
  SHA512:
6
- metadata.gz: 6909070081d3a519a4b270f8b637d8c03e5e42f6088836b1d6ba5bf9de0303b3a5fe1f4b4d593ebf3df6dc4fd66abcfa700445bf129021edd5995459cab0e7bb
7
- data.tar.gz: 4fffaadec6c276db11f36501f46832002418a478ea51ddb56e4bedb9e5675b2a51b5780d59babd7df76867ef59331ddebcb74423e0bc42343ee7894829e6cfe5
6
+ metadata.gz: 9f5a0a079b6c45979830d32455c860ba7e6d9b475d260ca8e4357e8adeba174a09a4e3b19d1f4dfeaf46381d3762cba167e72f0c85a032db8b783e901cac62f9
7
+ data.tar.gz: 76e4cf43cf5649fa63e7f78687825864f31e28626adb72ab440d2774eb4f82625228bb871307bd8dffc2a699129d4ee3f6473336399e9947600d8ac8707614fc
data/ChangeLog.md CHANGED
@@ -17,6 +17,7 @@ v0.14
17
17
  - [aws vpc] network type: manual for vpc
18
18
  - [aws] reuse existing bosh stemcell AMIs - automatically detects if a stemcell has been uploaded/converted into an AMI [v0.14.2]
19
19
  - [openstack] reuse existing bosh stemcell images - automatically detects if a stemcell has been uploaded/converted into an OpenStack image [v0.14.3]
20
+ - [aws vpc] security groups are uniquely named per VPC [v0.14.4]
20
21
 
21
22
  v0.13
22
23
  -----
@@ -62,9 +62,15 @@ module Bosh::Bootstrap::MicroboshProviders
62
62
  end
63
63
 
64
64
  def security_groups
65
- ["ssh",
66
- "dns_server",
67
- "bosh"]
65
+ sg_suffix=""
66
+ if vpc?
67
+ sg_suffix="-#{settings.address.vpc_id}"
68
+ end
69
+ [
70
+ "ssh#{sg_suffix}",
71
+ "dns-server#{sg_suffix}",
72
+ "bosh#{sg_suffix}"
73
+ ]
68
74
  end
69
75
 
70
76
  def aws_region
@@ -113,7 +113,7 @@ module Bosh::Bootstrap::MicroboshProviders
113
113
 
114
114
  def security_groups
115
115
  ["ssh",
116
- "dns_server",
116
+ "dns-server",
117
117
  "bosh"]
118
118
  end
119
119
 
@@ -8,20 +8,23 @@ module Bosh::Bootstrap::NetworkProviders
8
8
 
9
9
  def perform(settings)
10
10
  attributes = {}
11
+ sg_suffix = ""
11
12
  if vpc_id = settings.exists?("address.vpc_id")
12
13
  attributes[:vpc_id] = vpc_id
14
+ sg_suffix = "-#{vpc_id}"
13
15
  end
14
16
  security_groups.each do |name, ports|
15
- cyoi_provider_client.create_security_group(name.to_s, name.to_s, {ports: ports}, attributes)
17
+ sg_name = "#{name}#{sg_suffix}"
18
+ cyoi_provider_client.create_security_group(sg_name, name.to_s, {ports: ports}, attributes)
16
19
  end
17
20
  end
18
21
 
19
22
  protected
20
23
  def security_groups
21
24
  {
22
- ssh: 22,
23
- dns_server: { protocol: "udp", ports: (53..53) },
24
- bosh: [4222, 6868, 25250, 25555, 25777]
25
+ "ssh" => 22,
26
+ "dns-server" => { protocol: "udp", ports: (53..53) },
27
+ "bosh" => [4222, 6868, 25250, 25555, 25777]
25
28
  }
26
29
  end
27
30
  end
@@ -8,7 +8,7 @@ module Bosh::Bootstrap::NetworkProviders
8
8
 
9
9
  def perform(settings)
10
10
  cyoi_provider_client.create_security_group("ssh", "ssh", 22)
11
- cyoi_provider_client.create_security_group("dns_server", "dns_server", protocol: "udp", ports: (53..53) )
11
+ cyoi_provider_client.create_security_group("dns-server", "dns-server", protocol: "udp", ports: (53..53) )
12
12
  cyoi_provider_client.create_security_group("bosh", "bosh", [4222, 6868, 25250, 25555, 25777] )
13
13
  end
14
14
 
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Bootstrap
3
- VERSION = "0.14.3"
3
+ VERSION = "0.14.4"
4
4
  end
5
5
  end
@@ -20,7 +20,7 @@ cloud:
20
20
  ec2_endpoint: ec2.us-west-2.amazonaws.com
21
21
  default_security_groups:
22
22
  - ssh
23
- - dns_server
23
+ - dns-server
24
24
  - bosh
25
25
  default_key_name: test-bosh
26
26
  ec2_private_key: ~/.microbosh/ssh/test-bosh
@@ -19,7 +19,7 @@ cloud:
19
19
  ec2_endpoint: ec2.us-west-2.amazonaws.com
20
20
  default_security_groups:
21
21
  - ssh
22
- - dns_server
22
+ - dns-server
23
23
  - bosh
24
24
  default_key_name: test-bosh
25
25
  ec2_private_key: ~/.microbosh/ssh/test-bosh
@@ -22,9 +22,9 @@ cloud:
22
22
  region: us-west-2
23
23
  ec2_endpoint: ec2.us-west-2.amazonaws.com
24
24
  default_security_groups:
25
- - ssh
26
- - dns_server
27
- - bosh
25
+ - ssh-vpc-123456
26
+ - dns-server-vpc-123456
27
+ - bosh-vpc-123456
28
28
  default_key_name: test-bosh
29
29
  ec2_private_key: ~/.microbosh/ssh/test-bosh
30
30
  apply_spec:
@@ -22,7 +22,7 @@ cloud:
22
22
  region: REGION
23
23
  default_security_groups:
24
24
  - ssh
25
- - dns_server
25
+ - dns-server
26
26
  - bosh
27
27
  default_key_name: test-bosh
28
28
  private_key: ~/.microbosh/ssh/test-bosh
@@ -22,7 +22,7 @@ cloud:
22
22
  region: REGION
23
23
  default_security_groups:
24
24
  - ssh
25
- - dns_server
25
+ - dns-server
26
26
  - bosh
27
27
  default_key_name: test-bosh
28
28
  private_key: ~/.microbosh/ssh/test-bosh
@@ -22,7 +22,7 @@ cloud:
22
22
  region: REGION
23
23
  default_security_groups:
24
24
  - ssh
25
- - dns_server
25
+ - dns-server
26
26
  - bosh
27
27
  default_key_name: test-bosh
28
28
  private_key: ~/.microbosh/ssh/test-bosh
@@ -20,7 +20,7 @@ cloud:
20
20
  region: REGION
21
21
  default_security_groups:
22
22
  - ssh
23
- - dns_server
23
+ - dns-server
24
24
  - bosh
25
25
  default_key_name: test-bosh
26
26
  private_key: ~/.microbosh/ssh/test-bosh
@@ -16,7 +16,7 @@ describe Bosh::Bootstrap::NetworkProviders::AWS do
16
16
  it "creates EC2 security groups it needs" do
17
17
  expected_groups = [
18
18
  ["ssh", "ssh", ports: 22],
19
- ["dns_server", "dns_server", ports: { protocol: "udp", ports: (53..53) }],
19
+ ["dns-server", "dns-server", ports: { protocol: "udp", ports: (53..53) }],
20
20
  ["bosh", "bosh", ports: [4222, 6868, 25250, 25555, 25777]]
21
21
  ]
22
22
  expected_groups.each do |security_group_name, description, ports|
@@ -28,9 +28,9 @@ describe Bosh::Bootstrap::NetworkProviders::AWS do
28
28
  it "creates VPC security groups it needs" do
29
29
  setting "address.vpc_id", "vpc-id-1234"
30
30
  expected_groups = [
31
- ["ssh", "ssh", ports: 22],
32
- ["dns_server", "dns_server", ports: { protocol: "udp", ports: (53..53) }],
33
- ["bosh", "bosh", ports: [4222, 6868, 25250, 25555, 25777]]
31
+ ["ssh-vpc-id-1234", "ssh", ports: 22],
32
+ ["dns-server-vpc-id-1234", "dns-server", ports: { protocol: "udp", ports: (53..53) }],
33
+ ["bosh-vpc-id-1234", "bosh", ports: [4222, 6868, 25250, 25555, 25777]]
34
34
  ]
35
35
  expected_groups.each do |security_group_name, description, ports|
36
36
  expect(cyoi_provider_client).to receive(:create_security_group).
@@ -15,7 +15,7 @@ describe Bosh::Bootstrap::NetworkProviders::OpenStack do
15
15
  it "creates security groups it needs" do
16
16
  expected_groups = [
17
17
  ["ssh", "ssh", 22],
18
- ["dns_server", "dns_server", { protocol: "udp", ports: (53..53) }],
18
+ ["dns-server", "dns-server", { protocol: "udp", ports: (53..53) }],
19
19
  ["bosh", "bosh", [4222, 6868, 25250, 25555, 25777]]
20
20
  ]
21
21
  expected_groups.each do |security_group_name, description, ports|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr Nic Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-10 00:00:00.000000000 Z
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cyoi
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  version: '0'
243
243
  requirements: []
244
244
  rubyforge_project:
245
- rubygems_version: 2.2.1
245
+ rubygems_version: 2.2.2
246
246
  signing_key:
247
247
  specification_version: 4
248
248
  summary: bosh-bootstrap configures and deploys a microbosh deployed on either AWS