bosh-bootstrap 0.14.0 → 0.14.1

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: b5ea6f814d89322a4ce8eecc1e9e56d6a8c77578
4
- data.tar.gz: a9808b7ddf7eed80eca2fdb9cdf5f973bd14916e
3
+ metadata.gz: e3238fa74762c2cb66869506e04fd4b1e27d8cfa
4
+ data.tar.gz: 79d009099d3035550f43ce73d4a3f7703516f670
5
5
  SHA512:
6
- metadata.gz: 91325833e973b0ca5dbf52d9d5b7090bd7bc2c982169e0c15eab750b3da66b968898ab303cfbfc9a5c03c294c0303786a2aa66c0f8c7466444a0c21c508af53f
7
- data.tar.gz: a3e81665b3fcaf6617520af632c2311a5dbcaec9eb27ed3de125964dcdaa33c5c61bfeb683338d31f3f39fbad3a6b33608136796dc57e0b0123eb4432693f88b
6
+ metadata.gz: 907a2aeb2f8ee2e4bd400474b90282c5ec3e2e9c3d07e0b848d2e6ad19f18fe99570adaa13639bd29f7c424a4e00d4f3edbc3613f432c4b645189db10b14185a
7
+ data.tar.gz: 0113d4800c5d799f2223300790278a02a86af09e3971242e9ceee9da6e359f1d2cbf476b5f95acd00d9d537bfa77c7842e38005b4a6715adfe3d883f6c5b0a9a
data/ChangeLog.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Change Log
2
2
  ==========
3
3
 
4
- `bosh-bootstrap` is a command line tool that you can run on your laptop and automatically get a microbosh (and an inception VM) deployed on AWS (with OpenStack & vSphere coming soon).
4
+ `bosh-bootstrap` is a command line tool that you can run on your laptop and automatically get a Micro BOSH deployed on AWS, OpenStack, or vSphere.
5
5
 
6
6
  ```
7
7
  gem install bosh-bootstrap
@@ -11,8 +11,10 @@ bosh-bootstrap deploy
11
11
  v0.14
12
12
 
13
13
  - default target directory is current director, rather than `~/.microbosh`
14
+ - fixed to use new stemcells
14
15
  - [aws] VPC support - detects if VPCs available and allows selection, then select of subset, then creates security groups into the VPC
15
16
  - [aws] Using m3.medium instead of m1.medium
17
+ - [aws vpc] network type: manual for vpc
16
18
 
17
19
  v0.13
18
20
  -----
@@ -5,7 +5,7 @@ module Bosh::Bootstrap::MicroboshProviders
5
5
 
6
6
  def to_hash
7
7
  data = super.merge({
8
- "network"=>{"type"=>"dynamic", "vip"=>public_ip},
8
+ "network"=>network_configuration,
9
9
  "resources"=>
10
10
  {"persistent_disk"=>persistent_disk,
11
11
  "cloud_properties"=>resources_cloud_properties},
@@ -24,6 +24,25 @@ module Bosh::Bootstrap::MicroboshProviders
24
24
  data
25
25
  end
26
26
 
27
+ def network_configuration
28
+ if vpc?
29
+ {
30
+ "type" =>"manual",
31
+ "ip" => public_ip,
32
+ "dns" => [vpc_dns(public_ip)],
33
+ "cloud_properties" => {
34
+ "subnet" => settings.address.subnet_id
35
+ }
36
+ }
37
+
38
+ else
39
+ {
40
+ "type"=>"dynamic",
41
+ "vip"=>public_ip
42
+ }
43
+ end
44
+ end
45
+
27
46
  def persistent_disk
28
47
  settings.bosh.persistent_disk
29
48
  end
@@ -74,6 +93,13 @@ module Bosh::Bootstrap::MicroboshProviders
74
93
  aws_region == "us-east-1"
75
94
  end
76
95
 
96
+ def vpc?
97
+ settings.address["subnet_id"]
98
+ end
99
+
100
+ def vpc_dns(ip_address)
101
+ ip_address.gsub(/^(\d+)\.(\d+)\..*/, '\1.\2.0.2')
102
+ end
77
103
  end
78
104
  end
79
105
  Bosh::Bootstrap::MicroboshProviders.register_provider("aws", Bosh::Bootstrap::MicroboshProviders::AWS)
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Bootstrap
3
- VERSION = "0.14.0"
3
+ VERSION = "0.14.1"
4
4
  end
5
5
  end
@@ -1,35 +1,35 @@
1
- ---
1
+ ---
2
2
  name: test-bosh
3
- logging:
3
+ logging:
4
4
  level: DEBUG
5
- network:
5
+ network:
6
6
  type: dynamic
7
7
  vip: 1.2.3.4
8
- resources:
8
+ resources:
9
9
  persistent_disk: 16384
10
- cloud_properties:
11
- instance_type: m1.medium
10
+ cloud_properties:
11
+ instance_type: m3.medium
12
12
  availability_zone: us-west-2a
13
- cloud:
13
+ cloud:
14
14
  plugin: aws
15
- properties:
16
- aws:
15
+ properties:
16
+ aws:
17
17
  access_key_id: ACCESS
18
18
  secret_access_key: SECRET
19
19
  region: us-west-2
20
20
  ec2_endpoint: ec2.us-west-2.amazonaws.com
21
- default_security_groups:
21
+ default_security_groups:
22
22
  - ssh
23
23
  - dns_server
24
24
  - bosh
25
25
  default_key_name: test-bosh
26
26
  ec2_private_key: ~/.microbosh/ssh/test-bosh
27
- apply_spec:
28
- agent:
29
- blobstore:
27
+ apply_spec:
28
+ agent:
29
+ blobstore:
30
30
  address: 1.2.3.4
31
- nats:
31
+ nats:
32
32
  address: 1.2.3.4
33
- properties:
34
- aws_registry:
33
+ properties:
34
+ aws_registry:
35
35
  address: 1.2.3.4
@@ -1,34 +1,34 @@
1
- ---
1
+ ---
2
2
  name: test-bosh
3
- logging:
3
+ logging:
4
4
  level: DEBUG
5
- network:
5
+ network:
6
6
  type: dynamic
7
7
  vip: 1.2.3.4
8
- resources:
8
+ resources:
9
9
  persistent_disk: 16384
10
- cloud_properties:
11
- instance_type: m1.medium
12
- cloud:
10
+ cloud_properties:
11
+ instance_type: m3.medium
12
+ cloud:
13
13
  plugin: aws
14
- properties:
15
- aws:
14
+ properties:
15
+ aws:
16
16
  access_key_id: ACCESS
17
17
  secret_access_key: SECRET
18
18
  region: us-west-2
19
19
  ec2_endpoint: ec2.us-west-2.amazonaws.com
20
- default_security_groups:
20
+ default_security_groups:
21
21
  - ssh
22
22
  - dns_server
23
23
  - bosh
24
24
  default_key_name: test-bosh
25
25
  ec2_private_key: ~/.microbosh/ssh/test-bosh
26
- apply_spec:
27
- agent:
28
- blobstore:
26
+ apply_spec:
27
+ agent:
28
+ blobstore:
29
29
  address: 1.2.3.4
30
- nats:
30
+ nats:
31
31
  address: 1.2.3.4
32
- properties:
33
- aws_registry:
32
+ properties:
33
+ aws_registry:
34
34
  address: 1.2.3.4
@@ -1,36 +1,38 @@
1
- ---
1
+ ---
2
2
  name: test-bosh
3
- logging:
3
+ logging:
4
4
  level: DEBUG
5
- network:
6
- type: dynamic
7
- vip: 1.2.3.4
8
- cloud_properties:
9
- subnet: $SUBNET_ID$
10
- resources:
5
+ network:
6
+ type: manual
7
+ ip: 1.2.3.4
8
+ dns:
9
+ - 1.2.0.2
10
+ cloud_properties:
11
+ subnet: subnet-123456
12
+ resources:
11
13
  persistent_disk: 16384
12
- cloud_properties:
13
- instance_type: m1.medium
14
- cloud:
14
+ cloud_properties:
15
+ instance_type: m3.medium
16
+ cloud:
15
17
  plugin: aws
16
- properties:
17
- aws:
18
+ properties:
19
+ aws:
18
20
  access_key_id: ACCESS
19
21
  secret_access_key: SECRET
20
22
  region: us-west-2
21
23
  ec2_endpoint: ec2.us-west-2.amazonaws.com
22
- default_security_groups:
24
+ default_security_groups:
23
25
  - ssh
24
26
  - dns_server
25
27
  - bosh
26
28
  default_key_name: test-bosh
27
29
  ec2_private_key: ~/.microbosh/ssh/test-bosh
28
- apply_spec:
29
- agent:
30
- blobstore:
30
+ apply_spec:
31
+ agent:
32
+ blobstore:
31
33
  address: 1.2.3.4
32
- nats:
34
+ nats:
33
35
  address: 1.2.3.4
34
- properties:
35
- aws_registry:
36
+ properties:
37
+ aws_registry:
36
38
  address: 1.2.3.4
@@ -26,24 +26,24 @@ begin
26
26
 
27
27
  it "runs deploy command" do
28
28
  cmd = double(Bosh::Bootstrap::Cli::Commands::Deploy)
29
- cmd.should_receive(:perform)
29
+ expect(cmd).to receive(:perform)
30
30
  Bosh::Bootstrap::Cli::Commands::Deploy.stub(:new).and_return(cmd)
31
31
  cli.deploy
32
32
  end
33
33
 
34
34
  it "runs delete command" do
35
35
  cmd = double(Bosh::Bootstrap::Cli::Commands::Delete)
36
- cmd.should_receive(:perform)
36
+ expect(cmd).to receive(:perform)
37
37
  Bosh::Bootstrap::Cli::Commands::Delete.stub(:new).and_return(cmd)
38
38
  cli.delete
39
39
  end
40
40
 
41
41
  it "runs ssh command" do
42
42
  cmd = double(Bosh::Bootstrap::Cli::Commands::SSH)
43
- cmd.should_receive(:perform)
43
+ expect(cmd).to receive(:perform)
44
44
  Bosh::Bootstrap::Cli::Commands::SSH.stub(:new).and_return(cmd)
45
45
  cli.ssh
46
46
  end
47
47
  end
48
48
  rescue LoadError
49
- end
49
+ end
@@ -11,8 +11,8 @@ describe Bosh::Bootstrap::Cli::Commands::Delete do
11
11
  it "deletes microbosh VM" do
12
12
  setting "bosh.name", "test-bosh"
13
13
  mkdir_p(File.join(settings_dir, "deployments"))
14
- subject.should_receive(:sh).with("bundle exec bosh -n micro deployment test-bosh")
15
- subject.should_receive(:sh).with("bundle exec bosh -n micro delete")
14
+ expect(subject).to receive(:sh).with("bundle exec bosh -n micro deployment test-bosh")
15
+ expect(subject).to receive(:sh).with("bundle exec bosh -n micro delete")
16
16
  subject.perform
17
17
  end
18
18
  end
@@ -46,6 +46,26 @@ describe Bosh::Bootstrap::MicroboshProviders::AWS do
46
46
  yaml_files_match(microbosh_yml, spec_asset("microbosh_yml/micro_bosh.aws_ec2.us-west-2a.yml"))
47
47
  end
48
48
 
49
+ it "creates micro_bosh.yml manifest" do
50
+ setting "provider.name", "aws"
51
+ setting "provider.region", "us-west-2"
52
+ setting "provider.credentials.aws_access_key_id", "ACCESS"
53
+ setting "provider.credentials.aws_secret_access_key", "SECRET"
54
+ setting "address.ip", "1.2.3.4"
55
+ setting "address.vpc_id", "vpc-123456"
56
+ setting "address.subnet_id", "subnet-123456"
57
+ setting "key_pair.path", "~/.microbosh/ssh/test-bosh"
58
+ setting "bosh.name", "test-bosh"
59
+ setting "bosh.salted_password", "salted_password"
60
+ setting "bosh.persistent_disk", 16384
61
+
62
+ subject = Bosh::Bootstrap::MicroboshProviders::AWS.new(microbosh_yml, settings)
63
+
64
+ subject.create_microbosh_yml(settings)
65
+ expect(File).to be_exists(microbosh_yml)
66
+ yaml_files_match(microbosh_yml, spec_asset("microbosh_yml/micro_bosh.aws_vpc.yml"))
67
+ end
68
+
49
69
  describe "stemcell" do
50
70
  before do
51
71
  setting "provider.name", "aws"
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.0
4
+ version: 0.14.1
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-03 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cyoi