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 +4 -4
- data/lib/bosh/gen/cli.rb +4 -1
- data/lib/bosh/gen/generators/job_generator.rb +1 -1
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/monit.tt +5 -0
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/spec.tt +21 -0
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/templates/config/bpm.yml.tt +15 -0
- data/lib/bosh/gen/generators/new_release_generator/templates/manifests/%project_name%.yml.tt +9 -0
- data/lib/bosh/gen/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ece591a7a7c0e87b516792c42779191fc9fc092
|
4
|
+
data.tar.gz: b08c4f05ca34ad67ad3efc30f81b9f97a94c8466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6820845800b4a4abfbc00a6b60e31a7bdb8d01c636d30a30dd908a51f93c239f0de675e3978fe612ebb0f20e7b280dd82c1019385f9ede9ede3b32a65091cd7
|
7
|
+
data.tar.gz: f163a68e509785684c0c5057853d28504f9a10e2de44fa26e4011c2df600ad77bd0e967acdbbc87acaa61e866efb4e2ecf49515a47cd4ca0d317c2e184de5e27
|
data/lib/bosh/gen/cli.rb
CHANGED
@@ -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
|
-
|
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"
|
@@ -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
|
data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_bpm/templates/config/bpm.yml.tt
ADDED
@@ -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
|
data/lib/bosh/gen/generators/new_release_generator/templates/manifests/%project_name%.yml.tt
CHANGED
@@ -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
|
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.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-
|
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
|