bosh-gen 0.18.4 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +79 -75
- data/README.md +41 -18
- data/bosh-gen.gemspec +1 -0
- data/lib/bosh/gen/cli.rb +6 -0
- data/lib/bosh/gen/generators/bosh_cli_plugin_generator.rb +33 -0
- data/lib/bosh/gen/generators/bosh_cli_plugin_generator/templates/lib/bosh/cli/commands/%underscore_plugin_name%.rb.tt +9 -0
- data/lib/bosh/gen/generators/errand_generator.rb +0 -1
- data/lib/bosh/gen/version.rb +1 -1
- metadata +25 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 031e74cb3b6fe9d24db20ecb0baa3a0b1edcf91a
|
4
|
+
data.tar.gz: 6f7525aae7f6a47717148cf8b64fdbf42d14b805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc468c3526c7b47b18be0034562b93701c91713d288c70d29066ba06d16f8f49048835bbd2e946ce879f568c4e27fd0d57a7957d38af94dac1ae4dc9f1b29c8d
|
7
|
+
data.tar.gz: 29260e1fd9349b54fec9022a35a57221edfc6fd14dbd2c7ebc63e9d564bf7d4f5e1ad9b1bd0710b619ba8692edb1eb1fc2444c30ce090308ed1085b3f580ec8e
|
data/ChangeLog.md
CHANGED
@@ -1,73 +1,77 @@
|
|
1
1
|
Change Log
|
2
2
|
==========
|
3
3
|
|
4
|
+
v0.19.0
|
5
|
+
|
6
|
+
- `cli-plugin` - generates a BOSH CLI plugin stub (Ruby code)
|
7
|
+
|
4
8
|
v0.18.0
|
5
9
|
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
+
- `errand` - generates an errand-style job template
|
11
|
+
- `copy_property` helper now in bosh-templates gem
|
12
|
+
- `manifest` - `resource_pools` no longer specifies a `size` (modern BOSH has auto-sizing) (v0.18.1)
|
13
|
+
- `manifest` - use modern flexible `jobs.templates` format (v0.18.2)
|
10
14
|
|
11
15
|
v0.17.0
|
12
16
|
-------
|
13
17
|
|
14
|
-
-
|
15
|
-
-
|
16
|
-
-
|
18
|
+
- `new` - no more read-only credentials; no more encryption keys
|
19
|
+
- `new` - no more --s3/--swift flags; prompts instead
|
20
|
+
- `share release` - easily upload a final release and get a public URL to share (v0.17.1)
|
17
21
|
|
18
22
|
v0.16.0
|
19
23
|
-------
|
20
24
|
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
-
|
25
|
+
- `new` creates an initial job of the same name.
|
26
|
+
- default to running job process as vcap:vcap [v0.16.1]
|
27
|
+
- Default $INCLUDE_PATH & $LD_LIBRARY_PATH to '' if not set [v0.16.1]
|
28
|
+
- Fix make_manifest for aws-ec2 [v0.16.2]
|
29
|
+
- Remove references to OpenStack until we have spiff templates generated [v0.16.2]
|
26
30
|
|
27
31
|
The initial job is configured to have the xyz.leader_address property, and an example conf file that shows how to use it.
|
28
32
|
|
29
33
|
v0.15.0
|
30
34
|
-------
|
31
35
|
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
36
|
+
- Create packages from existing Aptitude .deb packages with `package --apt`
|
37
|
+
- Assume project & job names have hyphens in templates
|
38
|
+
- Templates default to latest stemcell [Aristoteles Neto]
|
35
39
|
|
36
40
|
v0.14.0
|
37
41
|
-------
|
38
42
|
|
39
|
-
-
|
40
|
-
-
|
43
|
+
- templates/make_manifest & example spiff templates generated
|
44
|
+
- no more static example bosh-lite.yml templates
|
41
45
|
|
42
46
|
v0.13.0
|
43
47
|
-------
|
44
48
|
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
+
- bosh-lite example manifests generated for new releases
|
50
|
+
- created folder always has -boshrelease suffix [v0.13.1]
|
51
|
+
- use public https in generated readme [v0.13.2]
|
52
|
+
- bosh-lite-solo.yml is a template [v0.13.3]
|
49
53
|
|
50
54
|
v0.12.0
|
51
55
|
-------
|
52
56
|
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
57
|
+
- Supports bosh_cli 1.5.0.pre gems
|
58
|
+
- dev.yml uses same release name as final.yml for blob reuse
|
59
|
+
- sets reuse_compilation_vms: true now
|
60
|
+
- generated project README focuses on final releases [v0.12.1]
|
61
|
+
- Default bucket name is project folder name [v0.12.1]
|
58
62
|
|
59
63
|
v0.11.0
|
60
64
|
-------
|
61
65
|
|
62
66
|
Added:
|
63
67
|
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
68
|
+
- New blobstore provider: OpenStack Swift [thanks Ferran!]
|
69
|
+
- `package` --src/-s specifies already internal sources/blobs; example: --src 'myapp/\**/*'
|
70
|
+
- `job` includes an empty `templates/config` to suggest where config templates should go
|
67
71
|
|
68
72
|
Improved:
|
69
73
|
|
70
|
-
-
|
74
|
+
- `new` - --s3 flag looks for `~/.bosh_s3_credentials` file for default AWS S3 credentials
|
71
75
|
|
72
76
|
For common defaults on s3 blobstore credentials, create an`~/.bosh_s3_credentials` file that looks like:
|
73
77
|
|
@@ -80,44 +84,44 @@ readwrite_secret_access_key: XXX
|
|
80
84
|
|
81
85
|
Other changes:
|
82
86
|
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
87
|
+
- Using 1.0 release candidate for bosh_cli
|
88
|
+
- `micro` - fix accidental gitignore of prepare/prepare_spec
|
89
|
+
- `new` - `bosh-gen new project-boshrelease`; name is "project", initial dev name is "project-dev"
|
90
|
+
- `manifest` - default stemcell is bosh-stemcell-0.6.4
|
91
|
+
- `manifest` - creates `#{name}.yml` instead of `#{name}/manifest.yml`
|
92
|
+
- `job` - example file not in a subfolder anymore
|
89
93
|
|
90
94
|
v0.10.0
|
91
95
|
-------
|
92
96
|
|
93
97
|
Added:
|
94
98
|
|
95
|
-
-
|
99
|
+
- `micro` - create a "micro" job that packages all/some jobs into a single VM
|
96
100
|
|
97
101
|
Improved:
|
98
102
|
|
99
|
-
-
|
103
|
+
- `new` - read/write credentials now in private.yml; more useful default README
|
100
104
|
|
101
105
|
v0.9.0
|
102
106
|
------
|
103
107
|
|
104
108
|
Major news
|
105
109
|
|
106
|
-
-
|
110
|
+
- `job` - more powerful initial scripts; templates nested in folders; scripts are much cleaner to read; scripts in bin/ & helpers/ do not have ERb; only data/properties.sh.erb & config/ are for ERb.
|
107
111
|
|
108
112
|
Other changes:
|
109
113
|
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
+
- `package` - detects .zip files (in addition to .tar.gz) and includes useful default unpacking script in `packaging`; describe available env vars in `packaging` script
|
115
|
+
- `manifest` - auto-detects current BOSH UUID
|
116
|
+
- `extract-pkg` - now a single argument - the path of the source package folder
|
117
|
+
- `extract-job` - now a single argument - the path of the source job folder
|
114
118
|
|
115
119
|
v0.8.0
|
116
120
|
------
|
117
121
|
|
118
122
|
Changed:
|
119
123
|
|
120
|
-
-
|
124
|
+
- `package` - the `packaging` script include default tar/configure/make sequence for all tarballs
|
121
125
|
|
122
126
|
For example, `bosh-gen package nginx -f ..../blobs/nginx/`, the resulting `packaging` is:
|
123
127
|
|
@@ -138,101 +142,101 @@ make install
|
|
138
142
|
|
139
143
|
Changed:
|
140
144
|
|
141
|
-
-
|
142
|
-
-
|
145
|
+
- `extract-job` & `extract-pkg` - copies files mentioned in specs
|
146
|
+
- `package` - large files go into blobs/ folder
|
143
147
|
|
144
148
|
### v0.8.2
|
145
149
|
|
146
150
|
Bug fixes:
|
147
151
|
|
148
|
-
-
|
152
|
+
- `extract-pkg` - missing #source_file helper
|
149
153
|
|
150
154
|
v0.7.0
|
151
155
|
------
|
152
156
|
|
153
157
|
Added:
|
154
158
|
|
155
|
-
-
|
159
|
+
- `extract-pkg` - extract a package and its dependencies from a target release
|
156
160
|
|
157
161
|
Changed/Renamed:
|
158
162
|
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
163
|
+
- `extract` -> `extract-job`
|
164
|
+
- `new` -> `.gitignore` includes `.vagrant`, to support `bosh-solo`
|
165
|
+
- `manifest` -> update to soon-to-be-released stemcell 0.6.2
|
162
166
|
|
163
167
|
v0.6.0
|
164
168
|
------
|
165
169
|
|
166
170
|
Added:
|
167
171
|
|
168
|
-
-
|
172
|
+
- `extract` - extract a job and its dependent packages to the current release
|
169
173
|
|
170
174
|
### v0.6.1
|
171
175
|
|
172
|
-
-
|
173
|
-
-
|
176
|
+
- `new` - ignore .blobs folder in releases
|
177
|
+
- `manifest` - persistent_disk is an integer; added to common job too
|
174
178
|
|
175
179
|
### v0.6.2
|
176
180
|
|
177
|
-
-
|
178
|
-
-
|
181
|
+
- `manifest` - provided IP addresses are distributed across jobs until it runs out
|
182
|
+
- `manifest` - fix to allocation of persistent disk
|
179
183
|
|
180
184
|
v0.5.0
|
181
185
|
------
|
182
186
|
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
187
|
+
- `job` - takes a COMMAND argument
|
188
|
+
- `source --blob/-b` - file stored in blobs/ folder instead of src/
|
189
|
+
- `source` - packaging script includes standard configure/make/make install if .tar.gz or .tgz
|
186
190
|
|
187
191
|
v0.4
|
188
192
|
----
|
189
193
|
|
190
|
-
-
|
191
|
-
-
|
192
|
-
-
|
193
|
-
-
|
194
|
-
-
|
194
|
+
- `job` - added --ruby flag to include a ruby/rack-specifc ctl script
|
195
|
+
- releases include a rake task to document what properties are required
|
196
|
+
- `manifest` - has a --disk/-d flag to assign a persistent disk to all VMs (common pool)
|
197
|
+
- `job` - export some variables in ctl scripts so they are available to application
|
198
|
+
- `job` - ctl script has logs/tail/clearlogs commands
|
195
199
|
|
196
200
|
v0.3
|
197
201
|
----
|
198
202
|
|
199
203
|
Added:
|
200
204
|
|
201
|
-
-
|
202
|
-
-
|
205
|
+
- `template` - add a template/file to a job
|
206
|
+
- `source` - download and add a source file/tarball to a package
|
203
207
|
|
204
208
|
### v0.3.1 (never released)
|
205
209
|
|
206
210
|
Added:
|
207
211
|
|
208
|
-
-
|
212
|
+
- `manifest` - generate a deployment manifest for a release
|
209
213
|
|
210
214
|
Fixed:
|
211
215
|
|
212
|
-
-
|
216
|
+
- `job` - creates a monit script and a stub control script
|
213
217
|
|
214
218
|
### v0.3.2
|
215
219
|
|
216
|
-
-
|
217
|
-
-
|
220
|
+
- `job` - ctl file has TODO to remind about PID file
|
221
|
+
- `job` - use the provided release path to detect jobs
|
218
222
|
|
219
223
|
### v0.3.3
|
220
224
|
|
221
|
-
-
|
225
|
+
- `manifest` - introspect the release project for release + job information
|
222
226
|
|
223
227
|
### v0.3.4
|
224
228
|
|
225
|
-
-
|
229
|
+
- `manifest` - Force us-east-1e to ensure all VMs and volumes are always in the same AZ
|
226
230
|
|
227
231
|
v0.2
|
228
232
|
----
|
229
233
|
|
230
234
|
Added:
|
231
235
|
|
232
|
-
-
|
233
|
-
-
|
236
|
+
- `package` - create package scaffold, including source files
|
237
|
+
- `job` - create job scaffold
|
234
238
|
|
235
239
|
v0.1
|
236
240
|
----
|
237
241
|
|
238
|
-
-
|
242
|
+
- `new` - create new release
|
data/README.md
CHANGED
@@ -198,12 +198,12 @@ Look at all that goodness!
|
|
198
198
|
|
199
199
|
A quick summary of these files:
|
200
200
|
|
201
|
-
-
|
202
|
-
-
|
203
|
-
-
|
204
|
-
-
|
205
|
-
-
|
206
|
-
-
|
201
|
+
- The `monit` script uses `bin/monit_debugger` to help you debug any glitches in starting/stopping processes.
|
202
|
+
- `ctl_setup.sh` setups up lots of common folders and env vars.
|
203
|
+
- `ctl_utils.sh` comes from cf-release's common/utils.sh with some extra helper functions
|
204
|
+
- `data/properties.sh.erb` is where you extract any `<%= properties.cassandra... %>` values from the deployment manifest.
|
205
|
+
- `bin/cassandra_ctl` no longer needs to be an unreadable ERb template! Use the env variables you create in `data/properties.sh.erb` and normal bash if statements instead of ERb `<% if ... %>` templates.
|
206
|
+
- `examples/...` is a folder for documenting example, valid deployment manifest properties for the release.
|
207
207
|
|
208
208
|
In `bin/cassandra_ctl` you now change "TODO" to `cassandra` and the rest of the tutorial is left to you, dear cassandra lover.
|
209
209
|
|
@@ -221,9 +221,9 @@ Share BOSH releases
|
|
221
221
|
|
222
222
|
To share your BOSH release with other BOSH users you need ONLY:
|
223
223
|
|
224
|
-
-
|
225
|
-
-
|
226
|
-
-
|
224
|
+
- Use a public blobstore (such as AWS S3)
|
225
|
+
- Use a public source control repository
|
226
|
+
- Optionally, publicly share pre-created final release tarballs via a HTTP URL.
|
227
227
|
|
228
228
|
### Share release tarballs via HTTP
|
229
229
|
|
@@ -249,13 +249,13 @@ They no longer require your BOSH release repo to access the BOSH release.
|
|
249
249
|
|
250
250
|
You are welcome to re-use the BOSH user community facilities:
|
251
251
|
|
252
|
-
-
|
253
|
-
-
|
252
|
+
- Use the shared AWS S3 account (currently over 30 BOSH release blobstores).
|
253
|
+
- Place your release git repository in the [@cloudfoundry-community](https://github.com/cloudfoundry-community) GitHub account (over 50 people have access).
|
254
254
|
|
255
255
|
One time only, please email [Dr Nic Williams](mailto:drnicwilliams@gmail.com) and he will set you up with access:
|
256
256
|
|
257
|
-
-
|
258
|
-
-
|
257
|
+
- Read/write credentials to the AWS S3 account for your BOSH release blobstores/buckets
|
258
|
+
- Access to create [@cloudfoundry-community](https://github.com/cloudfoundry-community) GitHub repositories for your BOSH releases
|
259
259
|
|
260
260
|
When he gives you the AWS S3 credentials, place them in the `~/.fog` file and you'll easily be able to reuse them for each new BOSH release:
|
261
261
|
|
@@ -278,11 +278,34 @@ Choose an auto-detected infrastructure: 2
|
|
278
278
|
|
279
279
|
You'll only need to do this once. Yes, it would be awesome if there was some public service to do this nicely. Want to build it?
|
280
280
|
|
281
|
+
Create BOSH CLI plugins
|
282
|
+
-----------------------
|
283
|
+
|
284
|
+
You can now (v0.19.0+) quickly create a BOSH CLI plugin within a RubyGem (to share), BOSH workspace or release (local to that project).
|
285
|
+
|
286
|
+
Inside your RubyGem, BOSH workspace or release:
|
287
|
+
|
288
|
+
```
|
289
|
+
$ bosh-gen cli-plugin setup-deployment
|
290
|
+
create lib
|
291
|
+
create lib/bosh/cli/commands/setup_deployment.rb
|
292
|
+
```
|
293
|
+
|
294
|
+
The `setup_deployment.rb` file will now be automatically picked up by `bosh` CLI locally OR if you distribute your project as a RubyGem:
|
295
|
+
|
296
|
+
```
|
297
|
+
$ bosh setup deployment
|
298
|
+
WARNING: loading local plugin: lib/bosh/cli/commands/setup_deployment.rb
|
299
|
+
TODO
|
300
|
+
```
|
301
|
+
|
302
|
+
Note: the hyphenated name `setup-deployment` becomes a space-separated command `setup deployment`.
|
303
|
+
|
281
304
|
Contributing
|
282
305
|
------------
|
283
306
|
|
284
|
-
1.
|
285
|
-
2.
|
286
|
-
3.
|
287
|
-
4.
|
288
|
-
5.
|
307
|
+
1. Fork it
|
308
|
+
2. Create your feature branch (`git checkout -b my-new-feature`\)
|
309
|
+
3. Commit your changes (`git commit -am 'Added some feature'`\)
|
310
|
+
4. Push to the branch (`git push origin my-new-feature`\)
|
311
|
+
5. Create new Pull Request
|
data/bosh-gen.gemspec
CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.add_dependency "cyoi", "~> 0.10"
|
24
24
|
gem.add_dependency "fog", "~> 1.11"
|
25
25
|
gem.add_dependency "readwritesettings", "~> 3.0"
|
26
|
+
gem.add_dependency "activesupport", ">= 4.0", "< 5.0"
|
26
27
|
|
27
28
|
gem.add_development_dependency "rake"
|
28
29
|
gem.add_development_dependency "rspec-fire"
|
data/lib/bosh/gen/cli.rb
CHANGED
@@ -135,6 +135,12 @@ module Bosh
|
|
135
135
|
[name, release_path, ip_addresses, job_names, flags])
|
136
136
|
end
|
137
137
|
|
138
|
+
desc "cli-plugin NAME", "Add a BOSH CLI plugin into this project"
|
139
|
+
def cli_plugin(plugin_name)
|
140
|
+
require 'bosh/gen/generators/bosh_cli_plugin_generator'
|
141
|
+
Bosh::Gen::Generators::BoshCliPluginGenerator.start([plugin_name])
|
142
|
+
end
|
143
|
+
|
138
144
|
no_tasks do
|
139
145
|
def cyan; "\033[36m" end
|
140
146
|
def clear; "\033[0m" end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
require 'active_support/core_ext/string'
|
3
|
+
|
4
|
+
module Bosh::Gen
|
5
|
+
module Generators
|
6
|
+
class BoshCliPluginGenerator < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
argument :plugin_name
|
10
|
+
|
11
|
+
def self.source_root
|
12
|
+
File.join(File.dirname(__FILE__), "bosh_cli_plugin_generator", "templates")
|
13
|
+
end
|
14
|
+
|
15
|
+
def install_plugin
|
16
|
+
directory "lib"
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
def underscore_plugin_name
|
21
|
+
plugin_name.gsub(/\W+/, '_')
|
22
|
+
end
|
23
|
+
|
24
|
+
def spaced_plugin_name
|
25
|
+
plugin_name.gsub(/\W+/, ' ')
|
26
|
+
end
|
27
|
+
|
28
|
+
def camelcase_plugin_name
|
29
|
+
underscore_plugin_name.camelcase
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/bosh/gen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
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:
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -108,6 +108,26 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: activesupport
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '4.0'
|
118
|
+
- - "<"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '5.0'
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '4.0'
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '5.0'
|
111
131
|
- !ruby/object:Gem::Dependency
|
112
132
|
name: rake
|
113
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,6 +178,8 @@ files:
|
|
158
178
|
- lib/bosh/cli/commands/share_release.rb
|
159
179
|
- lib/bosh/gen.rb
|
160
180
|
- lib/bosh/gen/cli.rb
|
181
|
+
- lib/bosh/gen/generators/bosh_cli_plugin_generator.rb
|
182
|
+
- lib/bosh/gen/generators/bosh_cli_plugin_generator/templates/lib/bosh/cli/commands/%underscore_plugin_name%.rb.tt
|
161
183
|
- lib/bosh/gen/generators/deployment_manifest_generator.rb
|
162
184
|
- lib/bosh/gen/generators/errand_generator.rb
|
163
185
|
- lib/bosh/gen/generators/errand_generator/templates/.gitkeep
|
@@ -328,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
350
|
version: '0'
|
329
351
|
requirements: []
|
330
352
|
rubyforge_project:
|
331
|
-
rubygems_version: 2.
|
353
|
+
rubygems_version: 2.4.3
|
332
354
|
signing_key:
|
333
355
|
specification_version: 4
|
334
356
|
summary: ''
|