bosh-bootstrap 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/ChangeLog.md +1 -0
- data/README.md +61 -50
- data/bin/bosh-bootstrap +4 -0
- data/bosh-bootstrap.gemspec +1 -1
- data/lib/bosh-bootstrap/microbosh_providers/openstack.rb +4 -0
- data/lib/bosh-bootstrap/version.rb +1 -1
- data/spec/assets/microbosh_yml/micro_bosh.openstack.boot_from_volume.yml +2 -0
- data/spec/assets/microbosh_yml/micro_bosh.openstack.neutron_manual.yml +2 -0
- data/spec/assets/microbosh_yml/micro_bosh.openstack.neutron_vip.yml +2 -0
- data/spec/assets/microbosh_yml/micro_bosh.openstack.nova_vip.yml +2 -0
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjZlN2JmYTU2MzkzYmI1M2YwZGQ3NmY3MzIyZmIwNmIwYzc0YzM2Ng==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MDNiYTk0Mjk2ZTc1YWFhMTVkMjIxMmI4Yzc5Y2NmOGQxMTY3ZGE2Ng==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzM5MTI0ZThkMWFjOTIxOTUyZjJkN2U1YmEwY2QwYmY5MjgyOGNjZjY5YTEy
|
10
|
+
MGU5ZmU0MGZlMDFkNjkxN2M3NzI5NjcxN2VhZWY0OGQ0Nzc5NTU5NDVjMjcy
|
11
|
+
ZjhmNGJlZDE4YWJkYjdhMGRmY2VlMTBiODAyODUxNjAyMzBlYzA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
Y2I1NTIzZDIwZGE0MDg3ZDM4ZDY3NmQ5ZmFjNjVjYjQ3ZDliZTllMzk3YmFl
|
14
|
+
Y2I5Y2I4MzI1Njk3M2UyODRhMTRmZDk4ZGQzMWExYjBiMTRkNjk5ZTY4OTJm
|
15
|
+
ZjlhMzYwYjZjNDJkMjU2YWIzMmNjOGFmYTA2ZDc3ZDE4ZmYxODQ=
|
data/ChangeLog.md
CHANGED
@@ -16,6 +16,7 @@ v0.13
|
|
16
16
|
- only create 3 security groups instead of many (fix for new AWS accounts and OpenStack tenants with small quotas)
|
17
17
|
- testing for ruby 2.1.0; though BOSH still requires 1.9.3 at time of writing
|
18
18
|
- upgrade rspec for 3.0 and using expect/to syntax
|
19
|
+
- ignore SSL verification [v0.13.1] - to be made optional in future
|
19
20
|
|
20
21
|
v0.12
|
21
22
|
-----
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
Bosh Bootstrap
|
2
|
+
==============
|
2
3
|
|
3
4
|
In order to deploy Cloud Foundry, and a growing number of other complex systems, you will need a bosh. bosh provides a complete lifecycle manager/deployer for complex systems. Cloud Foundry is a very complex system when it comes to deployment/upgrades.
|
4
5
|
|
@@ -53,23 +54,27 @@ $ bosh-bootstrap delete
|
|
53
54
|
Deleting micro bosh VM...
|
54
55
|
```
|
55
56
|
|
56
|
-
It is now very simple to bootstrap a micro bosh from a single, local CLI.
|
57
|
+
It is now very simple to bootstrap a micro bosh from a single, local CLI.
|
57
58
|
|
58
59
|
To be cute about it, the Bosh Bootstrap aims to provide lifecycle management for the bosh lifecycle manager. Zing! See the "Deep dive into deploy command" section below for greater understanding why the Bosh Bootstrap is very useful.
|
59
60
|
|
60
61
|
[![Gem Version](https://badge.fury.io/rb/bosh-bootstrap.png)](http://badge.fury.io/rb/bosh-bootstrap) [![Build Status](https://travis-ci.org/StarkAndWayne/bosh-bootstrap.png?branch=master)](https://travis-ci.org/StarkAndWayne/bosh-bootstrap) [![Code Climate](https://codeclimate.com/github/StarkAndWayne/bosh-bootstrap.png)](https://codeclimate.com/github/StarkAndWayne/bosh-bootstrap)
|
61
62
|
|
62
|
-
|
63
|
+
Installation
|
64
|
+
------------
|
63
65
|
|
64
66
|
This bootstrap tool is distributed as a RubyGem for Ruby 1.9+.
|
65
67
|
|
66
68
|
```
|
67
69
|
$ ruby -v
|
68
70
|
ruby 1.9.3p385 ...
|
69
|
-
$ gem install bosh-bootstrap
|
71
|
+
$ gem install fog bosh-bootstrap
|
70
72
|
```
|
71
73
|
|
72
|
-
|
74
|
+
NOTE: the `fog` gem is explicitly installed above to ensure you get a very recent version. It is a manual installation due to version conflicts with `bosh` own dependency on fog.
|
75
|
+
|
76
|
+
Usage
|
77
|
+
-----
|
73
78
|
|
74
79
|
Bosh Bootstrap is available primarily as a standalone CLI `bosh-bootstrap`. If you have the bosh CLI installed, then it is also available as a bosh plugin via `bosh bootstrap`. This readme assumes the former usage.
|
75
80
|
|
@@ -130,17 +135,17 @@ Deployment set to '/Users/drnic/.microbosh/deployments/firstbosh/micro_bosh.yml'
|
|
130
135
|
bundle exec bosh -n micro deploy ami-43f49d2a
|
131
136
|
|
132
137
|
Deploy Micro BOSH
|
133
|
-
using existing stemcell (00:00:00)
|
134
|
-
creating VM from ami-43f49d2a (00:01:10)
|
135
|
-
waiting for the agent (00:02:34)
|
136
|
-
create disk (00:00:02)
|
137
|
-
mount disk (00:00:19)
|
138
|
-
fetching apply spec (00:00:00)
|
139
|
-
stopping agent services (00:00:02)
|
140
|
-
applying micro BOSH spec (00:00:16)
|
141
|
-
starting agent services (00:00:00)
|
142
|
-
waiting for the director (00:00:59)
|
143
|
-
Done 11/11 00:05:40
|
138
|
+
using existing stemcell (00:00:00)
|
139
|
+
creating VM from ami-43f49d2a (00:01:10)
|
140
|
+
waiting for the agent (00:02:34)
|
141
|
+
create disk (00:00:02)
|
142
|
+
mount disk (00:00:19)
|
143
|
+
fetching apply spec (00:00:00)
|
144
|
+
stopping agent services (00:00:02)
|
145
|
+
applying micro BOSH spec (00:00:16)
|
146
|
+
starting agent services (00:00:00)
|
147
|
+
waiting for the director (00:00:59)
|
148
|
+
Done 11/11 00:05:40
|
144
149
|
WARNING! Your target has been changed to `https://107.21.94.132:25555'!
|
145
150
|
Deployment set to '/Users/drnic/.microbosh/deployments/firstbosh/micro_bosh.yml'
|
146
151
|
Deployed `firstbosh/micro_bosh.yml' to `https://firstbosh:25555', took 00:05:40 to complete
|
@@ -171,7 +176,8 @@ provider:
|
|
171
176
|
az: us-east-1c
|
172
177
|
```
|
173
178
|
|
174
|
-
|
179
|
+
SSH access
|
180
|
+
----------
|
175
181
|
|
176
182
|
You can open an SSH shell to your micro bosh:
|
177
183
|
|
@@ -179,7 +185,8 @@ You can open an SSH shell to your micro bosh:
|
|
179
185
|
$ bosh-bootstrap ssh
|
180
186
|
```
|
181
187
|
|
182
|
-
|
188
|
+
Deleting micro bosh
|
189
|
+
-------------------
|
183
190
|
|
184
191
|
The `bosh-bootstrap delete` command will delete the target micro-bosh.
|
185
192
|
|
@@ -187,7 +194,8 @@ The `bosh-bootstrap delete` command will delete the target micro-bosh.
|
|
187
194
|
$ bosh-bootstrap delete
|
188
195
|
```
|
189
196
|
|
190
|
-
|
197
|
+
Deep dive into the Bosh Bootstrap deploy command
|
198
|
+
------------------------------------------------
|
191
199
|
|
192
200
|
What is actually happening when you run `bosh-bootstrap deploy`?
|
193
201
|
|
@@ -201,9 +209,9 @@ $ bosh micro deploy ami-43f49d2a
|
|
201
209
|
|
202
210
|
Unfortunately for this simple scenario, there are many little prerequisite steps before those three commands. Bosh Bootstrap replaces pages and pages of step-by-step instructions with a single command line that does everything. It even allows you to upgrade your micro bosh with newer bosh releases:
|
203
211
|
|
204
|
-
|
205
|
-
|
206
|
-
|
212
|
+
- public machine images (AMIs on AWS)
|
213
|
+
- publicly available stemcells
|
214
|
+
- custom stemcells generated from the bosh repository.
|
207
215
|
|
208
216
|
To understand exactly what the `bosh-bootstrap deploy` command is doing, let's start with what the running parts of bosh are and how `bosh micro deploy` deploys them.
|
209
217
|
|
@@ -211,14 +219,14 @@ To understand exactly what the `bosh-bootstrap deploy` command is doing, let's s
|
|
211
219
|
|
212
220
|
A running bosh, whether it is running on a single server or a cluster of servers, is a collection of processes. The core of bosh is the Director and the Blobstore. The remaining processes provide support, storage or messaging.
|
213
221
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
+
- The Director, the public API for the bosh CLI and coordinator of bosh behavior
|
223
|
+
- The Blobstore, to store and retrieve precompiled packages
|
224
|
+
- Agents, run on each server within deployments
|
225
|
+
- The Health Manager, to track the state of deployed systems (the infrastructure and running jobs)
|
226
|
+
- Internal DNS, called PowerDNS, for internal unique naming of servers within bosh deployments
|
227
|
+
- Registry, for example AWS Registry, for tracking the infrastructure that has been provisioned (servers, persistent disks)
|
228
|
+
- PostgreSQL
|
229
|
+
- Redis
|
222
230
|
|
223
231
|
When you deploy a bosh using the bosh micro deployer (`bosh micro deploy`) or indirectly via the Bosh Bootstrap, you are actually deploying a bosh release that describes a bosh (see [release](https://github.com/cloudfoundry/bosh/tree/master/release) folder). The processes listed above are called "jobs" and you can see the full list of jobs inside a bosh within the [jobs/ directory](https://github.com/cloudfoundry/bosh/tree/master/release/jobs) of the `bosh` repository.
|
224
232
|
|
@@ -234,15 +242,14 @@ A micro bosh server is a normal running server built from a base OS image that a
|
|
234
242
|
|
235
243
|
In bosh terminology, call these pre-packaged base OS images "stemcells".
|
236
244
|
|
237
|
-
|
238
245
|
### Configuring a micro bosh
|
239
246
|
|
240
247
|
The command above will not work without first providing bosh micro deployer with configuration details. The stemcell file alone is not sufficient information. When we deploy or update a micro bosh we need to provide the following:
|
241
248
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
249
|
+
- A static IP address - this IP address will be bound to the initial micro bosh server, and when the micro bosh is updated in future and the server is thrown away and replaced, then it is bound to the replacement servers
|
250
|
+
- Server properties - the instance type (such as m1.large on AWS) or RAM/CPU combination (on vSphere)
|
251
|
+
- Server persistent disk - a single persistent, attached disk volume will be provisioned and mounted at `/var/vcap/store`; when the micro bosh is updated is is unmounted, unattached from the current server and then reattached and remounted to the upgraded server
|
252
|
+
- Infrastructure API credentials - the magic permissions for the micro bosh to provision servers and persistent disks for its bosh deployments
|
246
253
|
|
247
254
|
This information is to go into a file called `/path/to/deployments/NAME/micro_bosh.yml`. Before `bosh micro deploy` is run, we first need to tell bosh micro deployer which file contains the micro bosh deployment manifest.
|
248
255
|
|
@@ -278,15 +285,15 @@ This process takes the majority of the time to deploy a new/replacement micro bo
|
|
278
285
|
|
279
286
|
One of the feature of the Bosh Bootstrap is that you can run it from your local laptop if you:
|
280
287
|
|
281
|
-
|
282
|
-
|
288
|
+
- Use AWS region us-east-1 (where there is a public AMI available)
|
289
|
+
- Use OpenStack or vSphere
|
283
290
|
|
284
291
|
### When do I need an inception server?
|
285
292
|
|
286
293
|
There are occasions when it is preferable or required to provision a initial server (called an [inception server](https://github.com/drnic/inception-server)) and to run Bosh Bootstrap (`bosh-bootstrap deploy`) within that.
|
287
294
|
|
288
|
-
|
289
|
-
|
295
|
+
- Using a AWS region other than us-east-1 (you need to be in that region to create an AMI)
|
296
|
+
- You want much faster internet between your terminal (an ssh session into your inception server) and your micro bosh and deployed servers
|
290
297
|
|
291
298
|
To provision an [inception server](https://github.com/drnic/inception-server):
|
292
299
|
|
@@ -299,7 +306,8 @@ $ inception ssh
|
|
299
306
|
|
300
307
|
Like Bosh Bootstrap, it will prompt for the infrastructure/cloud provider that you want, your credentials and then do everything for you automatically.
|
301
308
|
|
302
|
-
|
309
|
+
Internal configuration/settings
|
310
|
+
-------------------------------
|
303
311
|
|
304
312
|
Once you've used the CLI it stores your settings for your bosh, so that you can re-run the tool for upgrades or other future functionality.
|
305
313
|
|
@@ -307,20 +315,20 @@ By default, the settings file is stored at `~/.microbosh/settings.yml`.
|
|
307
315
|
|
308
316
|
For an AWS bosh it looks like:
|
309
317
|
|
310
|
-
```
|
311
|
-
---
|
312
|
-
bosh:
|
318
|
+
```yaml
|
319
|
+
---
|
320
|
+
bosh:
|
313
321
|
name: firstbosh
|
314
|
-
provider:
|
322
|
+
provider:
|
315
323
|
name: aws
|
316
|
-
credentials:
|
324
|
+
credentials:
|
317
325
|
provider: AWS
|
318
326
|
aws_access_key_id: ACCESS
|
319
327
|
aws_secret_access_key: SECRET
|
320
328
|
region: us-east-1
|
321
|
-
address:
|
329
|
+
address:
|
322
330
|
ip: 107.21.194.123
|
323
|
-
key_pair:
|
331
|
+
key_pair:
|
324
332
|
name: firstbosh
|
325
333
|
fingerprint: 3c:09:26:84:df:43:92:d7:bb:31:05:e2:77:84:58:c7:d0:aa:27:18
|
326
334
|
private_key: |-
|
@@ -332,7 +340,8 @@ key_pair:
|
|
332
340
|
-----END RSA PRIVATE KEY-----
|
333
341
|
```
|
334
342
|
|
335
|
-
|
343
|
+
Contributing
|
344
|
+
------------
|
336
345
|
|
337
346
|
1. Fork it
|
338
347
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
@@ -340,10 +349,12 @@ key_pair:
|
|
340
349
|
4. Push to the branch (`git push origin my-new-feature`)
|
341
350
|
5. Create new Pull Request
|
342
351
|
|
343
|
-
|
352
|
+
Copyright
|
353
|
+
---------
|
344
354
|
|
345
355
|
All documentation and source code is copyright of Stark & Wayne LLC.
|
346
356
|
|
347
|
-
|
357
|
+
Subscription and Support
|
358
|
+
------------------------
|
348
359
|
|
349
360
|
This documentation & tool is freely available to all people and companies coming to Cloud Foundry and bosh.
|
data/bin/bosh-bootstrap
CHANGED
data/bosh-bootstrap.gemspec
CHANGED
@@ -22,7 +22,7 @@ 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.9.
|
25
|
+
gem.add_dependency "cyoi", "~> 0.9.2"
|
26
26
|
gem.add_dependency "fog", "~> 1.11"
|
27
27
|
gem.add_dependency "readwritesettings", "~> 3.0"
|
28
28
|
gem.add_dependency "thor", "~> 0.18"
|
@@ -102,6 +102,10 @@ module Bosh::Bootstrap::MicroboshProviders
|
|
102
102
|
"default_security_groups"=>security_groups,
|
103
103
|
"default_key_name"=>microbosh_name,
|
104
104
|
"private_key"=>private_key_path,
|
105
|
+
# TODO: Only ignore SSL verification if requested by user
|
106
|
+
"connection_options"=>{
|
107
|
+
"ssl_verify_peer"=>false
|
108
|
+
},
|
105
109
|
"boot_from_volume"=>boot_from_volume}
|
106
110
|
end
|
107
111
|
|
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.13.
|
4
|
+
version: 0.13.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-06-
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cyoi
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.9.
|
19
|
+
version: 0.9.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.9.
|
26
|
+
version: 0.9.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fog
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,70 +70,70 @@ dependencies:
|
|
70
70
|
name: redcard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - '>='
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - '>='
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rbvmomi
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - '>='
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - '>='
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '>='
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '>='
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec-fire
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - '>='
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - '>='
|
122
|
+
- - ! '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: fakeweb
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - '>='
|
129
|
+
- - ! '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - '>='
|
136
|
+
- - ! '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: Bootstrap a micro bosh universe from one CLI
|
@@ -217,12 +217,12 @@ require_paths:
|
|
217
217
|
- lib
|
218
218
|
required_ruby_version: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - '>='
|
220
|
+
- - ! '>='
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '1.9'
|
223
223
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
224
|
requirements:
|
225
|
-
- - '>='
|
225
|
+
- - ! '>='
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: '0'
|
228
228
|
requirements: []
|