bosh-gen 0.95.0 → 0.96.0

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: f1cfc4a215ddf754dcd6510a6f7a33a9a11dbb70
4
- data.tar.gz: 26199f5c15857f4e7a028885b69e9f546e571fad
3
+ metadata.gz: 1ece591a7a7c0e87b516792c42779191fc9fc092
4
+ data.tar.gz: b08c4f05ca34ad67ad3efc30f81b9f97a94c8466
5
5
  SHA512:
6
- metadata.gz: 1bc0fa1eb18596f9ef591dc3569d256731fec3bcb37cd8fef8c8e703ea424da4d108a624b0bf065947fafa6dccbe59195dd8e79ba4334389827ac727d84c3156
7
- data.tar.gz: 6d80e76fac0ae6014b6ae359346a002a9cd54ae440093edbde48fc8bda6d7c95d6502891dbf5d2b40e957055485851f8bee42164405d5254f1c95643d8db2979
6
+ metadata.gz: a6820845800b4a4abfbc00a6b60e31a7bdb8d01c636d30a30dd908a51f93c239f0de675e3978fe612ebb0f20e7b280dd82c1019385f9ede9ede3b32a65091cd7
7
+ data.tar.gz: f163a68e509785684c0c5057853d28504f9a10e2de44fa26e4011c2df600ad77bd0e967acdbbc87acaa61e866efb4e2ecf49515a47cd4ca0d317c2e184de5e27
@@ -70,10 +70,13 @@ module Bosh
70
70
  desc "job NAME", "Create a new job"
71
71
  method_option :dependencies, :aliases => ['-d'], :type => :array,
72
72
  :desc => "List of package dependencies"
73
+ method_option :bpm, :type => :boolean, :default => true,
74
+ :desc => "Use bpm to containerise job processes"
73
75
  def job(name)
74
76
  dependencies = options[:dependencies] || []
75
77
  require 'bosh/gen/generators/job_generator'
76
- Bosh::Gen::Generators::JobGenerator.start([name, dependencies, 'simple'])
78
+ job_type = options[:bpm] ? 'bpm' : 'simple'
79
+ Bosh::Gen::Generators::JobGenerator.start([name, dependencies, job_type])
77
80
  end
78
81
 
79
82
  desc "errand NAME", "Create a new errand"
@@ -70,7 +70,7 @@ module Bosh::Gen
70
70
  end
71
71
 
72
72
  def valid_purposes
73
- %w[simple]
73
+ %w[bpm simple]
74
74
  end
75
75
 
76
76
  # Run a command in git.
@@ -0,0 +1,5 @@
1
+ check process <%= job_name %>
2
+ with pidfile /var/vcap/sys/run/bpm/<%= job_name %>/<%= job_name %>.pid
3
+ start program "/var/vcap/jobs/bpm/bin/bpm start <%= job_name %>"
4
+ stop program "/var/vcap/jobs/bpm/bin/bpm stop <%= job_name %>"
5
+ group vcap
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: <%= job_name %>
3
+
4
+ packages: []
5
+ templates:
6
+ config/bpm.yml: config/bpm.yml
7
+
8
+ # Documentation https://bosh.io/docs/links.html
9
+ # Tutorial https://gist.github.com/Amit-PivotalLabs/c39528248b8cdc4ba8e347f8aa68abb6
10
+ consumes: []
11
+
12
+ provides:
13
+ - name: <%= job_name %>
14
+ type: <%= job_name %>
15
+ properties:
16
+ - port
17
+
18
+ properties:
19
+ port:
20
+ description: Bind to this port
21
+ default: 8080
@@ -0,0 +1,15 @@
1
+ ---
2
+ processes:
3
+ - name: <%= job_name %>
4
+ executable: /var/vcap/packages/<%= job_name %>/bin/<%= job_name %>
5
+ args: []
6
+ ephemeral_disk: true
7
+ persistent_disk: false
8
+ env:
9
+ PORT: <%%= p("port") %>
10
+ limits:
11
+ memory: 1G
12
+ open_files: 1024
13
+
14
+ # example at https://github.com/cloudfoundry-incubator/bpm-release/blob/master/jobs/bpm-test-agent/templates/bpm.yml.erb
15
+ # example at https://github.com/cloudfoundry-incubator/bpm-release/blob/master/jobs/bpm-test-agent/templates/bpm.yml.erb
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  name: <%= project_name %>
3
3
 
4
+ addons:
5
+ - name: bpm
6
+ jobs:
7
+ - name: bpm
8
+ release: bpm
9
+
4
10
  instance_groups:
5
11
  - name: <%= project_name %>
6
12
  azs: [z1, z2, z3]
@@ -28,6 +34,9 @@ update:
28
34
  serial: false
29
35
 
30
36
  releases:
37
+ - name: bpm
38
+ version: 0.2.0
39
+ url: git+https://github.com/cloudfoundry-incubator/bpm-release
31
40
  - name: <%= project_name %>
32
41
  version: latest # TODO: update after first final release
33
42
  # url: TODO: update after first final release
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Gen
3
- VERSION = "0.95.0"
3
+ VERSION = "0.96.0"
4
4
  end
5
5
  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.95.0
4
+ version: 0.96.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: 2017-10-18 00:00:00.000000000 Z
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -183,6 +183,9 @@ files:
183
183
  - lib/bosh/gen/generators/extract_package_generator.rb
184
184
  - lib/bosh/gen/generators/job_generator.rb
185
185
  - lib/bosh/gen/generators/job_generator/templates/.gitkeep
186
+ - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/monit.tt
187
+ - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/spec.tt
188
+ - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/templates/config/bpm.yml.tt
186
189
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/monit.tt
187
190
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/spec.tt
188
191
  - lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/bin/ctl.tt