bosh-gen 0.12.1 → 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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGM1ZTE2ODViODkyNjRhOWE2ZWQ5Mzk0ZjlkYmY1MGVhMmQ2NzFiNA==
4
+ ZDk4NGEzNjkzYjkwNmJjMWUwODk1OTUyMDkzYjM3ZTM5YzIyZjc1Yg==
5
5
  data.tar.gz: !binary |-
6
- NDM0YzMwYmFjZGYxMzgyZjNhNTdjYmYwZWVmOTI2OGY1MzAxZTY0Zg==
6
+ ZTg1ZGUwZjM5YmVjYmY4YzkzMmYzYjAxZDM1NjBlODQ2ZTY3OTc4ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTZmY2ZjMzQzNjVhODdjZWFiNGU5NzcyZTFmZWZmM2YwMDg0MTljM2EyNzMx
10
- Yjk1ZmQxNmQwYzA0NTdiM2E1ZTA4ZWZhZTM5ZGE3NjdjYTg0Mjc4ODQ5OTQy
11
- Y2NkNWRkNjY2YzZiNDZmYjFjMGVmZjU5Mjk1MmZkMjdjZmE2MmM=
9
+ MDg5OWJjODRkNDhlMjMxNDhlODAwZDY1OTUxZjJjZmM5ZTQ4OTI5NzliMjJh
10
+ NGQ3OTU2YTI2OGUyMjk2ZTE2YzJjZjBkOGZiYzNhYzQ3OGNhMTY2ZTMzY2Ey
11
+ ZDc3NzIyOWQ0NWI4MjAzNjhjMDRhZGJhZjc4NjhmZDAyOThmODY=
12
12
  data.tar.gz: !binary |-
13
- ZGJkMmYzMzc5NThmYjNmNmEzMTY2MjFhMDQyYTI5YzdkNmRlMWQ0ZmI4ZGEx
14
- NDNhZjdkNjMzNTk2ZmQzYjMzZTdhMDBlNmExMGRmYmQ1Nzk0YmEzMjZmNzRi
15
- ODM5MTk0NTI3N2QxM2M0NTViODdjOGI5M2I5YjdhZmU4YmQ1MjU=
13
+ NWMwMmJjNTY1M2NmM2E5Zjg4Y2Y2MTA3ODM1MGQyMzUwMzkxOGY4NWY0NjEy
14
+ NjkzMTY2ODdkZjQyNzMzYmQzMmYyOTFhMjc5YzI1MmQwZjQ5MGQ0MTNmNjI3
15
+ YjU1OTQ3MDlmMDQ4ODY3Nzk0YzVmNTJkM2RmMWI2NTZiM2RmMGY=
data/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## v0.13.0
4
+
5
+ * bosh-lite example manifests generated for new releases
6
+
3
7
  ## v0.12.0
4
8
 
5
9
  * Supports bosh_cli 1.5.0.pre gems
data/README.md CHANGED
@@ -133,8 +133,6 @@ $ bosh-gen job cassandra -d java7 cassandra
133
133
  create jobs/cassandra/templates/helpers/ctl_setup.sh
134
134
  create jobs/cassandra/templates/helpers/ctl_utils.sh
135
135
  create jobs/cassandra/spec
136
- create examples/cassandra_simple
137
- create examples/cassandra_simple/default.yml
138
136
  ```
139
137
 
140
138
  Look at all that goodness!
@@ -66,10 +66,6 @@ module Bosh::Gen
66
66
  create_file job_dir("spec"), YAML.dump(config)
67
67
  end
68
68
 
69
- def example
70
- template "examples/%job_name%.yml.tt", "examples/%job_name%.yml"
71
- end
72
-
73
69
  private
74
70
  def filenames
75
71
  files.map {|f| File.basename(f) }
@@ -28,7 +28,7 @@ module Bosh::Gen
28
28
  end
29
29
 
30
30
  def directories
31
- %w[jobs packages src blobs].each do |dir|
31
+ %w[jobs packages src blobs examples].each do |dir|
32
32
  directory dir
33
33
  end
34
34
  end
@@ -11,3 +11,11 @@ cd <%= repository_name %>
11
11
  bosh upload release releases/<%= project_name %>-1.yml
12
12
  ```
13
13
 
14
+ For [bosh-lite](https://github.com/cloudfoundry/bosh-lite), you can quickly create a deployment manifest:
15
+
16
+ ```
17
+ cp examples/bosh-lite-cluster.yml local-cluster.yml
18
+ sed -i '' -e "s/DIRECTOR_UUID/$(bosh status | grep UUID | awk '{print $2}')/" local-cluster.yml
19
+ bosh deployment local-cluster.yml
20
+ bosh -n deploy
21
+ ```
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: <%= project_name %>-cluster
3
+ director_uuid: DIRECTOR_UUID
4
+ releases:
5
+ - name: <%= project_name %>
6
+ version: latest
7
+ compilation:
8
+ workers: 3
9
+ network: <%= project_name %>-network
10
+ reuse_compilation_vms: true
11
+ cloud_properties:
12
+ name: random
13
+ update:
14
+ canaries: 1
15
+ max_in_flight: 4
16
+ canary_watch_time: 10000-30000
17
+ update_watch_time: 10000-30000
18
+ resource_pools:
19
+ - name: common
20
+ network: <%= project_name %>-network
21
+ size: 3
22
+ stemcell:
23
+ name: bosh-stemcell
24
+ version: latest
25
+ cloud_properties:
26
+ name: random
27
+ networks:
28
+ - name: <%= project_name %>-network
29
+ subnets:
30
+ <%% (0..28).each_with_index do |i| %>
31
+ - range: 10.244.0.<%%= i*4 %>/30
32
+ reserved:
33
+ - 10.244.0.<%%= i*4 + 1 %>
34
+ static:
35
+ - 10.244.0.<%%= i*4 + 2 %>
36
+ cloud_properties:
37
+ name: random
38
+ <%% end %>
39
+ <%% (29..61).each_with_index do |i| %>
40
+ - range: 10.244.0.<%%= i*4 %>/30
41
+ reserved:
42
+ - 10.244.0.<%%= i*4 + 1 %>
43
+ cloud_properties:
44
+ name: random
45
+ <%% end %>
46
+ <%% (62..63).each_with_index do |i| %>
47
+ - range: 10.244.0.<%%= i*4 %>/30
48
+ reserved:
49
+ - 10.244.0.<%%= i*4 + 1 %>
50
+ static:
51
+ - 10.244.0.<%%= i*4 + 2 %>
52
+ cloud_properties:
53
+ name: random
54
+ <%% end %>
55
+ jobs:
56
+ - name: <%= project_name %>
57
+ template: <%= project_name %>
58
+ instances: 3
59
+ resource_pool: common
60
+ networks:
61
+ - name: <%= project_name %>-network
62
+ static_ips:
63
+ - 10.244.0.6
64
+ - 10.244.0.10
65
+ - 10.244.0.14
66
+ properties:
67
+ <%= project_name %>: {}
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: <%= project_name %>-solo
3
+ director_uuid: DIRECTOR_UUID
4
+ releases:
5
+ - name: <%= project_name %>
6
+ version: latest
7
+ compilation:
8
+ workers: 3
9
+ network: <%= project_name %>-network
10
+ reuse_compilation_vms: true
11
+ cloud_properties:
12
+ name: random
13
+ update:
14
+ canaries: 1
15
+ max_in_flight: 4
16
+ canary_watch_time: 10000-30000
17
+ update_watch_time: 10000-30000
18
+ resource_pools:
19
+ - name: common
20
+ network: <%= project_name %>-network
21
+ size: 1
22
+ stemcell:
23
+ name: bosh-stemcell
24
+ version: latest
25
+ cloud_properties:
26
+ name: random
27
+ networks:
28
+ - name: <%= project_name %>-network
29
+ subnets:
30
+ <%% (0..28).each_with_index do |i| %>
31
+ - range: 10.244.0.<%%= i*4 %>/30
32
+ reserved:
33
+ - 10.244.0.<%%= i*4 + 1 %>
34
+ static:
35
+ - 10.244.0.<%%= i*4 + 2 %>
36
+ cloud_properties:
37
+ name: random
38
+ <%% end %>
39
+ <%% (29..61).each_with_index do |i| %>
40
+ - range: 10.244.0.<%%= i*4 %>/30
41
+ reserved:
42
+ - 10.244.0.<%%= i*4 + 1 %>
43
+ cloud_properties:
44
+ name: random
45
+ <%% end %>
46
+ <%% (62..63).each_with_index do |i| %>
47
+ - range: 10.244.0.<%%= i*4 %>/30
48
+ reserved:
49
+ - 10.244.0.<%%= i*4 + 1 %>
50
+ static:
51
+ - 10.244.0.<%%= i*4 + 2 %>
52
+ cloud_properties:
53
+ name: random
54
+ <%% end %>
55
+ jobs:
56
+ - name: <%= project_name %>
57
+ template: <%= project_name %>
58
+ instances: 1
59
+ resource_pool: common
60
+ networks:
61
+ - name: <%= project_name %>-network
62
+ static_ips:
63
+ - 10.244.0.6
64
+ properties:
65
+ <%= project_name %>: {}
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Gen
3
- VERSION = "0.12.1"
3
+ VERSION = "0.13.0"
4
4
  end
5
5
  end
@@ -28,9 +28,6 @@ class WebappGeneratorSpec < MiniTest::Spec
28
28
  job_template_exists "mywebapp", "data/properties.sh.erb", "data/properties.sh"
29
29
  job_template_exists "mywebapp", "helpers/ctl_setup.sh", "helpers/ctl_setup.sh"
30
30
  job_template_exists "mywebapp", "helpers/ctl_utils.sh", "helpers/ctl_utils.sh"
31
-
32
- example = File.join("examples", "mywebapp.yml")
33
- File.exist?(example).must_equal(true, "#{example} not created")
34
31
  end
35
32
  end
36
33
 
@@ -59,10 +56,6 @@ class WebappGeneratorSpec < MiniTest::Spec
59
56
  job_template_exists "mywebapp", "config/mime.types", "config/mime.types"
60
57
  job_template_exists "mywebapp", "config/database.yml.erb", "config/database.yml"
61
58
  job_template_exists "mywebapp", "config/redis.yml.erb", "config/redis.yml"
62
-
63
- example = File.join("examples", "mywebapp_nginx_rack", "nginx_puma.yml")
64
- example = File.join("examples", "mywebapp_nginx_rack", "nginx_rackup.yml")
65
- File.exist?(example).must_equal(true, "#{example} not created")
66
59
  end
67
60
  end
68
61
  end
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.12.1
4
+ version: 0.13.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: 2013-11-11 00:00:00.000000000 Z
11
+ date: 2013-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -132,9 +132,6 @@ files:
132
132
  - lib/bosh/gen/generators/extract_package_generator.rb
133
133
  - lib/bosh/gen/generators/job_generator.rb
134
134
  - lib/bosh/gen/generators/job_generator/templates/.gitkeep
135
- - lib/bosh/gen/generators/job_generator/templates/examples/%job_name%.yml.tt
136
- - lib/bosh/gen/generators/job_generator/templates/examples/%job_name%_nginx_rack/nginx_puma_migrate.yml
137
- - lib/bosh/gen/generators/job_generator/templates/examples/%job_name%_nginx_rack/nginx_rackup.yml.tt
138
135
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/monit.tt
139
136
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/%job_name%_rack_ctl.tt
140
137
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_db_utils.sh.erb
@@ -165,6 +162,8 @@ files:
165
162
  - lib/bosh/gen/generators/new_release_generator/templates/README.md.tt
166
163
  - lib/bosh/gen/generators/new_release_generator/templates/Rakefile
167
164
  - lib/bosh/gen/generators/new_release_generator/templates/blobs/.gitkeep
165
+ - lib/bosh/gen/generators/new_release_generator/templates/examples/bosh-lite-cluster.yml.tt
166
+ - lib/bosh/gen/generators/new_release_generator/templates/examples/bosh-lite-solo.yml
168
167
  - lib/bosh/gen/generators/new_release_generator/templates/jobs/.gitkeep
169
168
  - lib/bosh/gen/generators/new_release_generator/templates/packages/.gitkeep
170
169
  - lib/bosh/gen/generators/new_release_generator/templates/src/.gitkeep
@@ -1,14 +0,0 @@
1
- ---
2
- jobs:
3
- - <%= job_name %>
4
- properties:
5
- webapp:
6
- package: rackapp
7
- use_nginx: 1
8
- appstack: puma
9
- puma:
10
- threads:
11
- min: 0
12
- max: 20
13
- migrate: 1
14
- migration_command: rake db:migrate
@@ -1,8 +0,0 @@
1
- ---
2
- jobs:
3
- - <%= job_name %>
4
- properties:
5
- webapp:
6
- package: rackapp
7
- appstack: rackup
8
- use_nginx: 1