bosh-bootstrap 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/.travis.yml +1 -1
- data/ChangeLog.md +106 -87
- data/Gemfile +1 -0
- data/bosh-bootstrap.gemspec +2 -2
- data/lib/bosh-bootstrap/cli/commands/deploy.rb +3 -3
- data/lib/bosh-bootstrap/microbosh_providers/aws.rb +1 -5
- data/lib/bosh-bootstrap/microbosh_providers/base.rb +4 -0
- data/lib/bosh-bootstrap/microbosh_providers/openstack.rb +57 -12
- data/lib/bosh-bootstrap/network.rb +4 -5
- data/lib/bosh-bootstrap/network_providers/aws.rb +5 -9
- data/lib/bosh-bootstrap/network_providers/dummy.rb +1 -1
- data/lib/bosh-bootstrap/network_providers/openstack.rb +6 -18
- data/lib/bosh-bootstrap/version.rb +1 -1
- data/spec/assets/microbosh_yml/micro_bosh.aws_ec2.us-west-2a.yml +1 -5
- data/spec/assets/microbosh_yml/micro_bosh.aws_ec2.yml +1 -5
- data/spec/assets/microbosh_yml/micro_bosh.aws_vpc.yml +1 -5
- data/spec/assets/microbosh_yml/micro_bosh.openstack.boot_from_volume.yml +43 -0
- data/spec/assets/microbosh_yml/micro_bosh.openstack.neutron_manual.yml +43 -0
- data/spec/assets/microbosh_yml/{micro_bosh.openstack.yml → micro_bosh.openstack.neutron_vip.yml} +12 -13
- data/spec/assets/microbosh_yml/micro_bosh.openstack.nova_vip.yml +41 -0
- data/spec/spec_helper.rb +3 -3
- data/spec/support/rspec-fire.rb +9 -0
- data/spec/unit/commands/deploy_spec.rb +73 -60
- data/spec/unit/key_pair_spec.rb +3 -3
- data/spec/unit/microbosh_providers/openstack_spec.rb +87 -18
- data/spec/unit/microbosh_spec.rb +2 -2
- data/spec/unit/network_providers/aws_spec.rb +5 -9
- data/spec/unit/network_providers/openstack_spec.rb +5 -9
- data/spec/unit/network_spec.rb +5 -6
- metadata +28 -20
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
MGQzNWNkMWZkZTE2ODZmMzU2Y2EwY2EwNTQxMDM5YTk0YzJjZDcwOQ==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 3234c415f1c36b95d1afdbff6bddc71547be43c2
|
|
4
|
+
data.tar.gz: 4e45a51e0833104c7f173477579c6b859f6477e3
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
ZThhZjI5NjMyODBjOTZlNDUzMWQ1MGZhMzJlNGVjMmE3MjA3NDVmNGQ2NjBm
|
|
11
|
-
MzY3YzExMGMwODIwOWE3N2Q2YjFkMjI4YWVlOTY2OWNhNzMwODI=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
YzU3ZDQ0ODE4NmJiYjQzYTU1NDlmYWIwZmRkMGY4Njk1NDljZTY3YjZiYzE2
|
|
14
|
-
ZWQ3NTQyZDg1ZjQyYzBiMTRkYWQ4MDQ5YWNjMjdhNjVhZjA3YWI1YjE1ZWZj
|
|
15
|
-
YTgwNDU0MDNkYmU0MDM0YzcyN2ExZjNiODhjZjAzZGFiYjgwMjU=
|
|
6
|
+
metadata.gz: 6dbcaeeca32850eedf92bcf937142b347a461c5719bb9461ecdc8fd554b8b56c7695e16448df206c86cddbbc8dc195fe4d0bb3faa6bfbac4db13fdd14ab8365f
|
|
7
|
+
data.tar.gz: 29598c72646bddb8b601debcb9f7af6180600929ec2e3d6a6743d899ea0741b7ef625c2d5f136e737ae9fb7b309561ef0ec0e923789203eece7cff113625181c
|
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
|
@@ -1,129 +1,148 @@
|
|
|
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
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
6
|
+
```
|
|
7
|
+
gem install bosh-bootstrap
|
|
8
|
+
bosh-bootstrap deploy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
v0.13
|
|
12
|
+
-----
|
|
13
|
+
|
|
14
|
+
- [openstack] Neutron support - detects that Neutron is available and prompts for which subnet to use
|
|
15
|
+
- [openstack] Boot from volume - prompt for which images should be used (QCOW2 vs RAW) and configure MicroBOSH to use boot_from_volume if RAW format required
|
|
16
|
+
- only create 3 security groups instead of many (fix for new AWS accounts and OpenStack tenants with small quotas)
|
|
17
|
+
- testing for ruby 2.1.0; though BOSH still requires 1.9.3 at time of writing
|
|
18
|
+
- upgrade rspec for 3.0 and using expect/to syntax
|
|
19
|
+
|
|
20
|
+
v0.12
|
|
21
|
+
-----
|
|
22
|
+
|
|
23
|
+
- vSphere support [thanks Matt Stine!!]
|
|
24
|
+
|
|
25
|
+
v0.11
|
|
26
|
+
-----
|
|
27
|
+
|
|
28
|
+
- Complete rewrite of bosh-bootstrap in orphan branch
|
|
29
|
+
- CodeClimate score changed from 0.82 to 3.85
|
|
30
|
+
- Initial support for AWS EC2; WIP for OpenStack; initial unit tests for vSphere
|
|
31
|
+
- Interactive Q&A is extracted into [cyoi](https://github.com/drnic/cyoi) (choose-your-own-infrastructure) library
|
|
32
|
+
- Accessing settings is much cleaner; functionality moved into fork of settingslogic called [readwritesettings](https://github.com/drnic/readwritesettings)
|
|
33
|
+
- Inception VM/server is now provisioned via separate CLI project [inception-server](https://github.com/drnic/inception-server)
|
|
34
|
+
- AWS/us-east-1 uses public AMIs; other regions & other CPIs use stemcells
|
|
35
|
+
- CLI via bosh plugin (`bosh bootstrap`) rather than a stand alone CLI (`bosh-bootstrap`)
|
|
36
|
+
- Added `ssh` action to ssh into the microbosh
|
|
37
|
+
- Added `delete` actions to delete the microbosh (but not the IP address and security groups)
|
|
38
|
+
- Add back `bosh-bootstrap` CLI & remove bosh_cli dependency (v0.11.1)
|
|
39
|
+
- Specify which AWS AZ to use via `provider.az` in settings.yml (v0.11.2)
|
|
40
|
+
- Support for OpenStack (also in cyoi 0.4.3) thanks to Ferdy! (v0.11.3)
|
|
41
|
+
- Ensure CLI loads bundler (v0.11.4)
|
|
42
|
+
- rubygem users should be able to install & run from rubygems instead of source workaround (v0.11.5)
|
|
43
|
+
- microbosh volume is smaller 4G and automatically fits on devstack/openstack (v0.11.5; thx @ryfow)
|
|
44
|
+
- Security group `bosh_agent_http` renamed to `bosh_agent_https`, with same 6868 port for talking to bosh_agent running in https mode (`bosh_agent_http` can then be deleted) (v0.11.5)
|
|
45
|
+
- Add port 53/dns security group (v0.11.6)
|
|
46
|
+
- Port 53 open on UDP only as workaround for multi-region AWS (v0.11.7; thx @yudai)
|
|
47
|
+
- Suppress bundler git "fatal" warnings (by converting ~/.microbosh into git repo) (v0.11.8)
|
|
48
|
+
- Update to newer-er-er stemcell paths from Pivotal's s3 bucket (v0.11.9, v0.11.10)
|
|
49
|
+
- Enlarge persistent disk from 4G to 16G (v0.11.11)
|
|
50
|
+
- bosh_cli gems now on rubygems instead of pivotal s3 bucket (v0.11.12)
|
|
51
|
+
- OpenStack improvements to reduce POST API throttling (v0.11.13)
|
|
52
|
+
- Can now update a running microbosh (thanks @lookitup4me) (v0.11.14)
|
|
53
|
+
- OpenStack uses commonly available m1.medium flavor instead of bespoke m1.microbosh (v0.11.14)
|
|
54
|
+
- Properly enlarge persistent disk from 4G to 16G (v0.11.15)
|
|
55
|
+
|
|
56
|
+
v0.10
|
|
57
|
+
-----
|
|
45
58
|
|
|
46
59
|
Available on branch [v0.10](https://github.com/StarkAndWayne/bosh-bootstrap/tree/v0.10).
|
|
47
60
|
|
|
48
61
|
Install using:
|
|
49
62
|
|
|
50
|
-
|
|
63
|
+
```
|
|
64
|
+
gem install bosh-bootstrap -v "~> 0.10.0"
|
|
65
|
+
```
|
|
51
66
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
- Only using latest pre-release bosh gems & stemcells/amis - do not upgrade if you want the old 2012 gems
|
|
68
|
+
- AWS us-east-1 uses a pre-built AMI for extra speed
|
|
69
|
+
- AWS all regions are working (using pre-created stemcell)
|
|
70
|
+
- OpenStack is now working (using pre-created stemcell)
|
|
71
|
+
- `deploy --create-inception` chooses to create an inception VM
|
|
72
|
+
- Using `bosh_cli_plugin_micro` (for `bosh micro`) [was `bosh_deployer`](v1.10.1)
|
|
73
|
+
- `bosh-cloudfoundry` gem installed with prerelease gems (fix in v0.10.1)
|
|
74
|
+
- AWS inception VM gets its attached volume again (v1.10.2)
|
|
60
75
|
|
|
61
|
-
|
|
76
|
+
v0.9
|
|
77
|
+
----
|
|
62
78
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
- v0.8 wasn't working for many people; and neither will v0.9; but its a move in the right direction.
|
|
80
|
+
- Moving towards new 1.5.0 version of bosh that hasn't come out yet formally.
|
|
81
|
+
- AWS us-east-1 will use a pre-created AMI. It saves about 10-15 minutes!
|
|
82
|
+
- AWS other regions will use a pre-created stemcell. I haven't tested this well yet.
|
|
83
|
+
- OpenStack support is still broken because you need to create your own stemcells and for that you need a 12.10 inception VM and that work isn't quite done yet.
|
|
68
84
|
|
|
69
|
-
|
|
85
|
+
v0.8
|
|
86
|
+
----
|
|
70
87
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
- SSH keys used to access inception VM are now generated and stored within the `~/.bosh_bootstrap/ssh` folder. This fixes many issues that many people were having (their keys had passphrases, their fog_default keypair was old). It also allows a manifest file to be shared between people as it contains the private key contents, and the private key file will be recreated if it is missing.
|
|
89
|
+
- existing inception VMs' manifest.yml will be upgraded automatically and a backup file created (just in case)
|
|
90
|
+
- tightening of net-ssh & net-scp gems to ensure the bosh-bootstrap gem can be installed [thx @mmb]
|
|
91
|
+
- preinstall net-ssh/net-scp/fog on inception VM before installing `bosh_deployer` to fix in ability to install `bosh_deployer` 1.4.1 due to latest fog 1.10.0 release (v0.8.2)
|
|
75
92
|
|
|
76
|
-
|
|
93
|
+
v0.7
|
|
94
|
+
----
|
|
77
95
|
|
|
78
96
|
Notable:
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
|
|
98
|
+
- For existing users: please run "deploy --upgrade-deps" as new inception package (runit) added; and jazor/yaml_command CLIs installed
|
|
99
|
+
- Forces use of microbosh stemcell 0.8.1 which work with public gems (latest public stemcell does not work with public gems)
|
|
82
100
|
|
|
83
101
|
Added:
|
|
84
102
|
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
- `mosh` command - connect to Inception VM on trains over flaky internet connections (use instead of `ssh` or `tmux` command) [thx @mrdavidlang]
|
|
104
|
+
- `upgrade-inception` command - to perform an upgrade of the Inception VM without triggering a re-deploy of microbosh.
|
|
87
105
|
|
|
88
106
|
Changes:
|
|
89
107
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
108
|
+
- Inception VM now installs rubygems 2.0.0 & bundler 1.3.0
|
|
109
|
+
- Better idempotence for re-deploying microbosh - will delete&deploy after a failure; will deploy after a deletion.
|
|
110
|
+
- Downloads ubuntu 10.04 ISO to speed up custom stemcell builds
|
|
111
|
+
- Using redcard to ensure ruby 1.9 only
|
|
112
|
+
- `manifest.yml` stores the name of the stemcell created from a custom stemcell build; no longer re-creates stemcell each time
|
|
113
|
+
- git color is enabled on inception VM
|
|
96
114
|
|
|
97
115
|
Work in progress:
|
|
98
116
|
|
|
99
|
-
|
|
100
|
-
|
|
117
|
+
- AWS VPC support was begin by the core bosh team; though work has stopped sadly.
|
|
118
|
+
- Growing number of specs mostly using Fog.mock! mode; tests being run on travis
|
|
101
119
|
|
|
102
120
|
### v0.7.1
|
|
103
121
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
122
|
+
- Make "deploy --private-key" option work [thx @dpw]
|
|
123
|
+
- Add hypervisor for OpenStack stemcells [thx @frodenas]
|
|
124
|
+
- Don't fail if `settings.fog_credentials.openstack_region` doesn't exist
|
|
125
|
+
- Fix README for changed location of bosh-release [thx @scottfrederick]
|
|
126
|
+
- No need to show --latest-stemcell in README tutorial
|
|
109
127
|
|
|
110
|
-
|
|
128
|
+
v0.6
|
|
129
|
+
----
|
|
111
130
|
|
|
112
131
|
Highlights:
|
|
113
132
|
|
|
114
|
-
|
|
115
|
-
|
|
133
|
+
- Defaults to downloading latest stemcell (rather than stable, which are getting old now).
|
|
134
|
+
- Installs the Cloud Foundry plugin for bosh https://github.com/StarkAndWayne/bosh-cloudfoundry
|
|
116
135
|
|
|
117
136
|
Additions:
|
|
118
137
|
|
|
119
|
-
|
|
120
|
-
|
|
138
|
+
- `tmux` - if you have tmux installed, then you can SSH into inception VM with it (thx @mrdavidlang)
|
|
139
|
+
- started a test suite; its small but growing! (thx @mrdavidlang for getting it started)
|
|
121
140
|
|
|
122
141
|
Bug fixes:
|
|
123
142
|
|
|
124
|
-
|
|
143
|
+
- Fog::SSH uses explicit ssh key that was requested to access inception VM
|
|
125
144
|
|
|
126
145
|
Future thoughts:
|
|
127
146
|
|
|
128
|
-
|
|
129
|
-
|
|
147
|
+
- I hate Settingslogic for read-write settings. It's really only a read-only settings DSL. It puts Ruby classes into the YAML. Probably going to rip it out.
|
|
148
|
+
- I am so sorry I took so long to start writing tests. It always seemed such a hard thing to write tests for. But bosh-cloudfoundry project has had good success with internal tests; so we're migrating those ideas into this project.
|
data/Gemfile
CHANGED
data/bosh-bootstrap.gemspec
CHANGED
|
@@ -22,13 +22,13 @@ EOS
|
|
|
22
22
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
23
23
|
gem.require_paths = ["lib"]
|
|
24
24
|
|
|
25
|
-
gem.add_dependency "cyoi", "~> 0.
|
|
25
|
+
gem.add_dependency "cyoi", "~> 0.9.0"
|
|
26
26
|
gem.add_dependency "fog", "~> 1.11"
|
|
27
27
|
gem.add_dependency "readwritesettings", "~> 3.0"
|
|
28
28
|
gem.add_dependency "thor", "~> 0.18"
|
|
29
29
|
gem.add_dependency "redcard"
|
|
30
30
|
gem.add_dependency "rbvmomi"
|
|
31
31
|
gem.add_development_dependency "rake"
|
|
32
|
-
gem.add_development_dependency "rspec"
|
|
32
|
+
gem.add_development_dependency "rspec-fire"
|
|
33
33
|
gem.add_development_dependency "fakeweb"
|
|
34
34
|
end
|
|
@@ -31,7 +31,7 @@ class Bosh::Bootstrap::Cli::Commands::Deploy
|
|
|
31
31
|
reload_settings!
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def
|
|
34
|
+
def cyoi_provider_client
|
|
35
35
|
@provider_client ||= Cyoi::Providers.provider_client(settings.provider)
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ class Bosh::Bootstrap::Cli::Commands::Deploy
|
|
|
42
42
|
reload_settings!
|
|
43
43
|
|
|
44
44
|
# TODO why passing provider_client rather than a Cyoi::Cli::Network object?
|
|
45
|
-
network = Bosh::Bootstrap::Network.new(settings.provider.name,
|
|
45
|
+
network = Bosh::Bootstrap::Network.new(settings.provider.name, cyoi_provider_client)
|
|
46
46
|
network.deploy
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -74,4 +74,4 @@ class Bosh::Bootstrap::Cli::Commands::Deploy
|
|
|
74
74
|
@microbosh ||= Bosh::Bootstrap::Microbosh.new(settings_dir, microbosh_provider)
|
|
75
75
|
@microbosh.deploy(settings)
|
|
76
76
|
end
|
|
77
|
-
end
|
|
77
|
+
end
|
|
@@ -30,13 +30,57 @@ module Bosh::Bootstrap::MicroboshProviders
|
|
|
30
30
|
})
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
33
|
+
# For Nova/Floating IP:
|
|
34
|
+
# network:
|
|
35
|
+
# type: dynamic
|
|
36
|
+
# vip: 1.2.3.4
|
|
37
|
+
# For Neutron/Floating IP:
|
|
38
|
+
# network:
|
|
39
|
+
# type: dynamic
|
|
40
|
+
# vip: 1.2.3.4 # public floating IP
|
|
41
|
+
# cloud_properties:
|
|
42
|
+
# net_id: XXX # internal subnet
|
|
43
|
+
# For Neutron/Internal IP:
|
|
44
|
+
# network:
|
|
45
|
+
# type: manual
|
|
46
|
+
# vip: 10.10.10.3 # an IP in subnets range
|
|
47
|
+
# cloud_properties:
|
|
48
|
+
# net_id: XXX # internal subnet
|
|
36
49
|
def network_configuration
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
if nova?
|
|
51
|
+
{
|
|
52
|
+
"type"=>"dynamic",
|
|
53
|
+
"vip"=>public_ip
|
|
54
|
+
}
|
|
55
|
+
elsif neutron? && using_external_gateway?
|
|
56
|
+
{
|
|
57
|
+
"type"=>"dynamic",
|
|
58
|
+
"vip"=>public_ip,
|
|
59
|
+
"cloud_properties" => {
|
|
60
|
+
"net_id" => settings.address.subnet_id
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
{
|
|
65
|
+
"type"=>"manual",
|
|
66
|
+
"ip"=>public_ip,
|
|
67
|
+
"cloud_properties" => {
|
|
68
|
+
"net_id" => settings.address.subnet_id
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def nova?
|
|
75
|
+
!neutron?
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def neutron?
|
|
79
|
+
settings.exists?("address.subnet_id")
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def using_external_gateway?
|
|
83
|
+
settings.exists?("address.pool_name")
|
|
40
84
|
end
|
|
41
85
|
|
|
42
86
|
def persistent_disk
|
|
@@ -57,7 +101,8 @@ module Bosh::Bootstrap::MicroboshProviders
|
|
|
57
101
|
"region"=>region,
|
|
58
102
|
"default_security_groups"=>security_groups,
|
|
59
103
|
"default_key_name"=>microbosh_name,
|
|
60
|
-
"private_key"=>private_key_path
|
|
104
|
+
"private_key"=>private_key_path,
|
|
105
|
+
"boot_from_volume"=>boot_from_volume}
|
|
61
106
|
end
|
|
62
107
|
|
|
63
108
|
def region
|
|
@@ -70,11 +115,11 @@ module Bosh::Bootstrap::MicroboshProviders
|
|
|
70
115
|
def security_groups
|
|
71
116
|
["ssh",
|
|
72
117
|
"dns_server",
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
118
|
+
"bosh"]
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def boot_from_volume
|
|
122
|
+
!!(settings.provider["options"] && settings.provider.options.boot_from_volume)
|
|
78
123
|
end
|
|
79
124
|
|
|
80
125
|
def stemcell_uri
|
|
@@ -4,11 +4,11 @@ require "bosh-bootstrap/network_providers/dummy"
|
|
|
4
4
|
class Bosh::Bootstrap::Network
|
|
5
5
|
|
|
6
6
|
attr_reader :provider_name
|
|
7
|
-
attr_reader :
|
|
7
|
+
attr_reader :cyoi_provider_client
|
|
8
8
|
|
|
9
|
-
def initialize(provider_name,
|
|
9
|
+
def initialize(provider_name, cyoi_provider_client)
|
|
10
10
|
@provider_name = provider_name
|
|
11
|
-
@
|
|
11
|
+
@cyoi_provider_client = cyoi_provider_client
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def deploy
|
|
@@ -25,9 +25,8 @@ class Bosh::Bootstrap::Network
|
|
|
25
25
|
rescue LoadError
|
|
26
26
|
klass = Bosh::Bootstrap::NetworkProviders.provider_class("dummy")
|
|
27
27
|
end
|
|
28
|
-
klass.new(
|
|
28
|
+
klass.new(cyoi_provider_client)
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
end
|
|
33
|
-
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module Bosh::Bootstrap::NetworkProviders
|
|
2
2
|
class AWS
|
|
3
|
-
attr_reader :
|
|
3
|
+
attr_reader :cyoi_provider_client
|
|
4
4
|
|
|
5
|
-
def initialize(
|
|
6
|
-
@
|
|
5
|
+
def initialize(cyoi_provider_client)
|
|
6
|
+
@cyoi_provider_client = cyoi_provider_client
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def perform
|
|
10
10
|
security_groups.each do |name, ports|
|
|
11
|
-
|
|
11
|
+
cyoi_provider_client.create_security_group(name.to_s, name.to_s, ports: ports)
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
@@ -17,11 +17,7 @@ module Bosh::Bootstrap::NetworkProviders
|
|
|
17
17
|
{
|
|
18
18
|
ssh: 22,
|
|
19
19
|
dns_server: { protocol: "udp", ports: (53..53) },
|
|
20
|
-
|
|
21
|
-
bosh_agent_https: 6868,
|
|
22
|
-
bosh_blobstore: 25250,
|
|
23
|
-
bosh_director: 25555,
|
|
24
|
-
bosh_registry: 25777
|
|
20
|
+
bosh: [4222, 6868, 25250, 25555, 25777]
|
|
25
21
|
}
|
|
26
22
|
end
|
|
27
23
|
end
|
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
module Bosh::Bootstrap::NetworkProviders
|
|
2
2
|
class OpenStack
|
|
3
|
-
attr_reader :
|
|
3
|
+
attr_reader :cyoi_provider_client
|
|
4
4
|
|
|
5
|
-
def initialize(
|
|
6
|
-
@
|
|
5
|
+
def initialize(cyoi_provider_client)
|
|
6
|
+
@cyoi_provider_client = cyoi_provider_client
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def perform
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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) )
|
|
12
|
+
cyoi_provider_client.create_security_group("bosh", "bosh", [4222, 6868, 25250, 25555, 25777] )
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
protected
|
|
16
|
-
def security_groups
|
|
17
|
-
{
|
|
18
|
-
ssh: 22,
|
|
19
|
-
dns_server: { protocol: "udp", ports: (53..53) },
|
|
20
|
-
bosh_nats_server: 4222,
|
|
21
|
-
bosh_agent_https: 6868,
|
|
22
|
-
bosh_blobstore: 25250,
|
|
23
|
-
bosh_director: 25555,
|
|
24
|
-
bosh_registry: 25777
|
|
25
|
-
}
|
|
26
|
-
end
|
|
27
15
|
end
|
|
28
16
|
end
|
|
29
17
|
Bosh::Bootstrap::NetworkProviders.register_provider("openstack", Bosh::Bootstrap::NetworkProviders::OpenStack)
|
|
@@ -21,11 +21,7 @@ cloud:
|
|
|
21
21
|
default_security_groups:
|
|
22
22
|
- ssh
|
|
23
23
|
- dns_server
|
|
24
|
-
-
|
|
25
|
-
- bosh_nats_server
|
|
26
|
-
- bosh_blobstore
|
|
27
|
-
- bosh_director
|
|
28
|
-
- bosh_registry
|
|
24
|
+
- bosh
|
|
29
25
|
default_key_name: test-bosh
|
|
30
26
|
ec2_private_key: ~/.microbosh/ssh/test-bosh
|
|
31
27
|
apply_spec:
|
|
@@ -20,11 +20,7 @@ cloud:
|
|
|
20
20
|
default_security_groups:
|
|
21
21
|
- ssh
|
|
22
22
|
- dns_server
|
|
23
|
-
-
|
|
24
|
-
- bosh_nats_server
|
|
25
|
-
- bosh_blobstore
|
|
26
|
-
- bosh_director
|
|
27
|
-
- bosh_registry
|
|
23
|
+
- bosh
|
|
28
24
|
default_key_name: test-bosh
|
|
29
25
|
ec2_private_key: ~/.microbosh/ssh/test-bosh
|
|
30
26
|
apply_spec:
|
|
@@ -22,11 +22,7 @@ cloud:
|
|
|
22
22
|
default_security_groups:
|
|
23
23
|
- ssh
|
|
24
24
|
- dns_server
|
|
25
|
-
-
|
|
26
|
-
- bosh_nats_server
|
|
27
|
-
- bosh_blobstore
|
|
28
|
-
- bosh_director
|
|
29
|
-
- bosh_registry
|
|
25
|
+
- bosh
|
|
30
26
|
default_key_name: test-bosh
|
|
31
27
|
ec2_private_key: ~/.microbosh/ssh/test-bosh
|
|
32
28
|
apply_spec:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-bosh
|
|
3
|
+
logging:
|
|
4
|
+
level: DEBUG
|
|
5
|
+
network:
|
|
6
|
+
type: manual
|
|
7
|
+
ip: 10.10.10.3
|
|
8
|
+
cloud_properties:
|
|
9
|
+
net_id: 7b8788eb-b49e-4424-9065-75a6b07094ea
|
|
10
|
+
resources:
|
|
11
|
+
persistent_disk: 16384
|
|
12
|
+
cloud_properties:
|
|
13
|
+
instance_type: m1.medium
|
|
14
|
+
cloud:
|
|
15
|
+
plugin: openstack
|
|
16
|
+
properties:
|
|
17
|
+
openstack:
|
|
18
|
+
auth_url: http://10.0.0.2:5000/v2.0/tokens
|
|
19
|
+
username: USER
|
|
20
|
+
api_key: PASSWORD
|
|
21
|
+
tenant: TENANT
|
|
22
|
+
region: REGION
|
|
23
|
+
default_security_groups:
|
|
24
|
+
- ssh
|
|
25
|
+
- dns_server
|
|
26
|
+
- bosh
|
|
27
|
+
default_key_name: test-bosh
|
|
28
|
+
private_key: ~/.microbosh/ssh/test-bosh
|
|
29
|
+
boot_from_volume: true
|
|
30
|
+
apply_spec:
|
|
31
|
+
agent:
|
|
32
|
+
blobstore:
|
|
33
|
+
address: 10.10.10.3
|
|
34
|
+
nats:
|
|
35
|
+
address: 10.10.10.3
|
|
36
|
+
properties:
|
|
37
|
+
director:
|
|
38
|
+
max_threads: 3
|
|
39
|
+
hm:
|
|
40
|
+
resurrector_enabled: true
|
|
41
|
+
ntp:
|
|
42
|
+
- 0.north-america.pool.ntp.org
|
|
43
|
+
- 1.north-america.pool.ntp.org
|