bosh-gen 0.22.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/ChangeLog.md +11 -0
- data/lib/bosh/gen/generators/errand_generator/templates/jobs/%job_name%/templates/bin/run.tt +4 -4
- data/lib/bosh/gen/generators/errand_generator/templates/jobs/%job_name%/templates/helpers/ctl_setup.sh +19 -8
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/helpers/ctl_setup.sh +19 -8
- data/lib/bosh/gen/generators/new_release_generator/templates/README.md.tt +2 -2
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/deployment.yml.tt +8 -7
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-aws-ec2.yml.tt +3 -3
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-warden.yml.tt +1 -0
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/jobs.yml.tt +3 -5
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/make_manifest.tt +3 -3
- data/lib/bosh/gen/generators/package_docker_image_generator/templates/jobs/%job_name%/templates/helpers/ctl_setup.sh +20 -3
- data/lib/bosh/gen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b00234c82d49b763a3ed19a84afceafc7493c8
|
4
|
+
data.tar.gz: 3c69fec977cc0128d6a91353e9933a647a715c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b32ffaff5af4640f65a567baa60864021eb4faaccad2d870abbd308653874dea027a8ca9e32a2fa56f6c15974008c01052237dd6e50a1de24878a310a49c0a4
|
7
|
+
data.tar.gz: 77f926b0c7c91283989e7b3f237dff994fb32b8fff2976bac04269231853db3bc19c1c8b2629a3524559d74bb952779e928c71934e1e88f3e4c1d20f5251672d
|
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
Change Log
|
2
2
|
==========
|
3
3
|
|
4
|
+
v0.23.0
|
5
|
+
|
6
|
+
Appreciation to James Hunt, Dennis Bell and Chris Weibel for the contributions.
|
7
|
+
|
8
|
+
- Fix for multiple word deployment names and warden sanity check
|
9
|
+
- Additional busybox system binary exclusion protection for containers
|
10
|
+
- Ignore busybox for \*bin/lib inclusion, for better diego release compatibility
|
11
|
+
- Don't repeat `EXITSTATUS` upon errand run, instead receive complete and useful
|
12
|
+
`BOSH CLI` output.
|
13
|
+
|
14
|
+
|
4
15
|
v0.22.0
|
5
16
|
|
6
17
|
Thanks to James Hunt, Quintessence Anx, and Long Nguyen for this version!
|
data/lib/bosh/gen/generators/errand_generator/templates/jobs/%job_name%/templates/bin/run.tt
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
set -e # exit immediately if a simple command exits with a non-zero status
|
4
4
|
set -u # report the usage of uninitialized variables
|
5
5
|
|
6
|
-
# Setup env vars and folders for the
|
6
|
+
# Setup env vars and folders for the errand script
|
7
7
|
source /var/vcap/jobs/<%= job_name %>/helpers/ctl_setup.sh '<%= job_name %>'
|
8
8
|
|
9
|
-
|
9
|
+
############################################################################
|
10
|
+
|
11
|
+
# put your errand steps here...
|
10
12
|
|
11
|
-
echo "Errand <%= job_name %> is complete; exit status $EXITSTATUS"
|
12
|
-
exit $EXITSTATUS
|
@@ -21,16 +21,27 @@ chmod 755 $JOB_DIR # to access file via symlink
|
|
21
21
|
|
22
22
|
source $JOB_DIR/helpers/ctl_utils.sh
|
23
23
|
|
24
|
-
#
|
25
|
-
for package_bin_dir in $(ls -d /var/vcap/packages/*/*bin)
|
26
|
-
do
|
27
|
-
export PATH=${package_bin_dir}:$PATH
|
28
|
-
done
|
29
|
-
|
24
|
+
# Setup the PATH and LD_LIBRARY_PATH
|
30
25
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-''} # default to empty
|
31
|
-
for
|
26
|
+
for package_dir in $(ls -d /var/vcap/packages/*)
|
32
27
|
do
|
33
|
-
|
28
|
+
has_busybox=0
|
29
|
+
# Add all packages' /bin & /sbin into $PATH
|
30
|
+
for package_bin_dir in $(ls -d ${package_dir}/*bin)
|
31
|
+
do
|
32
|
+
# Do not add any packages that use busybox, as impacts builtin commands and
|
33
|
+
# is often used for different architecture (via containers)
|
34
|
+
if [ -f ${package_bin_dir}/busybox ]
|
35
|
+
then
|
36
|
+
has_busybox=1
|
37
|
+
else
|
38
|
+
export PATH=${package_bin_dir}:$PATH
|
39
|
+
fi
|
40
|
+
done
|
41
|
+
if [ "$has_busybox" == "0" ] && [ -d ${package_dir}/lib ]
|
42
|
+
then
|
43
|
+
export LD_LIBRARY_PATH=${package_dir}/lib:$LD_LIBRARY_PATH
|
44
|
+
fi
|
34
45
|
done
|
35
46
|
|
36
47
|
# Setup log, run and tmp folders
|
@@ -29,16 +29,27 @@ redirect_output ${output_label}
|
|
29
29
|
|
30
30
|
export HOME=${HOME:-/home/vcap}
|
31
31
|
|
32
|
-
#
|
33
|
-
for package_bin_dir in $(ls -d /var/vcap/packages/*/*bin)
|
34
|
-
do
|
35
|
-
export PATH=${package_bin_dir}:$PATH
|
36
|
-
done
|
37
|
-
|
32
|
+
# Setup the PATH and LD_LIBRARY_PATH
|
38
33
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-''} # default to empty
|
39
|
-
for
|
34
|
+
for package_dir in $(ls -d /var/vcap/packages/*)
|
40
35
|
do
|
41
|
-
|
36
|
+
has_busybox=0
|
37
|
+
# Add all packages' /bin & /sbin into $PATH
|
38
|
+
for package_bin_dir in $(ls -d ${package_dir}/*bin)
|
39
|
+
do
|
40
|
+
# Do not add any packages that use busybox, as impacts builtin commands and
|
41
|
+
# is often used for different architecture (via containers)
|
42
|
+
if [ -f ${package_bin_dir}/busybox ]
|
43
|
+
then
|
44
|
+
has_busybox=1
|
45
|
+
else
|
46
|
+
export PATH=${package_bin_dir}:$PATH
|
47
|
+
fi
|
48
|
+
done
|
49
|
+
if [ "$has_busybox" == "0" ] && [ -d ${package_dir}/lib ]
|
50
|
+
then
|
51
|
+
export LD_LIBRARY_PATH=${package_dir}/lib:$LD_LIBRARY_PATH
|
52
|
+
fi
|
42
53
|
done
|
43
54
|
|
44
55
|
# Setup log, run and tmp folders
|
@@ -8,10 +8,10 @@ To use this bosh release, first upload it to your bosh:
|
|
8
8
|
bosh target BOSH_HOST
|
9
9
|
git clone https://github.com/cloudfoundry-community/<%= repository_name %>.git
|
10
10
|
cd <%= repository_name %>
|
11
|
-
bosh upload release releases/<%= project_name %>-1.yml
|
11
|
+
bosh upload release releases/<%= project_name %>/<%= 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 & deploy a cluster
|
14
|
+
For [bosh-lite](https://github.com/cloudfoundry/bosh-lite), you can quickly create a deployment manifest & deploy a cluster. Note that this requires that you have installed [spruce](https://github.com/geofffranks/spruce).
|
15
15
|
|
16
16
|
```
|
17
17
|
templates/make_manifest warden
|
@@ -1,20 +1,21 @@
|
|
1
|
+
---
|
1
2
|
meta:
|
2
|
-
environment: (( param "
|
3
|
-
stemcell: (( param "
|
3
|
+
environment: (( param "Please specify your environment" ))
|
4
|
+
stemcell: (( param "Please configure a BOSH stemcell to use for your deployment" ))
|
4
5
|
|
5
6
|
name: (( grab meta.environment ))
|
6
7
|
|
7
|
-
director_uuid: (( param "
|
8
|
+
director_uuid: (( param "Please set the UUID of your BOSH Directory" ))
|
8
9
|
|
9
|
-
releases: (( param "
|
10
|
+
releases: (( param "Please list the BOSH releases to use for this deployment" ))
|
10
11
|
|
11
|
-
jobs: (( param "
|
12
|
+
jobs: (( param "Please configure the constituent Jobs for this Deployment" ))
|
12
13
|
|
13
14
|
compilation:
|
14
15
|
workers: 6
|
15
16
|
network: <%= project_name_underscored %>1
|
16
17
|
reuse_compilation_vms: true
|
17
|
-
cloud_properties: (( param "
|
18
|
+
cloud_properties: (( param "Please configure the Cloud Properties for compilation VMs" ))
|
18
19
|
|
19
20
|
update:
|
20
21
|
canaries: 1
|
@@ -27,4 +28,4 @@ resource_pools:
|
|
27
28
|
- name: small_z1
|
28
29
|
network: <%= project_name_underscored %>1
|
29
30
|
stemcell: (( grab meta.stemcell ))
|
30
|
-
cloud_properties: (( param "
|
31
|
+
cloud_properties: (( param "Please configure the Cloud Properties for your Resource Pool" ))
|
data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-aws-ec2.yml.tt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
+
---
|
1
2
|
meta:
|
2
|
-
|
3
|
-
|
4
|
-
security_groups: (( param "please set meta security_groups" ))
|
3
|
+
dns_root: (( param "Please configure your root DNS name" ))
|
4
|
+
security_groups: (( param "Please configure your AWS Security Groups" ))
|
5
5
|
persistent_disk: 4096
|
6
6
|
|
7
7
|
stemcell:
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
environment: ~
|
3
|
-
|
1
|
+
---
|
4
2
|
update:
|
5
3
|
canaries: 1
|
6
4
|
max_in_flight: 50
|
@@ -16,8 +14,8 @@ jobs:
|
|
16
14
|
instances: 1
|
17
15
|
persistent_disk: 0
|
18
16
|
resource_pool: small_z1
|
19
|
-
networks: (( param "
|
17
|
+
networks: (( param "Please configure the networks for this job" ))
|
20
18
|
|
21
|
-
networks: (( param "
|
19
|
+
networks: (( param "Please configure the global network definitions for this Deployment" ))
|
22
20
|
|
23
21
|
properties: {}
|
@@ -31,10 +31,10 @@ shift
|
|
31
31
|
BOSH_STATUS=$(bosh status)
|
32
32
|
DIRECTOR_UUID=$(echo "$BOSH_STATUS" | grep UUID | awk '{print $2}')
|
33
33
|
DIRECTOR_CPI=$(echo "$BOSH_STATUS" | grep CPI | awk '{print $2}' | sed -e 's/_cpi//')
|
34
|
-
DIRECTOR_NAME=$(echo "$BOSH_STATUS" | grep Name |
|
34
|
+
DIRECTOR_NAME=$(echo "$BOSH_STATUS" | grep Name | sed 's/.*Name *//')
|
35
35
|
NAME=$template_prefix-$infrastructure
|
36
36
|
|
37
|
-
if [[ $
|
37
|
+
if [[ $DIRECTOR_CPI = "warden" && ${infrastructure} != "warden" ]]; then
|
38
38
|
fail "Not targeting bosh-lite with warden CPI. Please make sure you have run 'bosh target' and are targeting a BOSH lite before running this script."
|
39
39
|
exit 1
|
40
40
|
fi
|
@@ -52,7 +52,7 @@ STEMCELL=${STEMCELL:-$(latest_uploaded_stemcell)}
|
|
52
52
|
if [[ -z ${STEMCELL} ]]; then
|
53
53
|
echo
|
54
54
|
echo "Uploading latest $DIRECTOR_CPI/$STEMCELL_OS stemcell..."
|
55
|
-
|
55
|
+
echo " (from ${STEMCELL_URL})"
|
56
56
|
bosh upload stemcell $STEMCELL_URL
|
57
57
|
fi
|
58
58
|
STEMCELL=${STEMCELL:-$(latest_uploaded_stemcell)}
|
@@ -24,10 +24,27 @@ redirect_output ${output_label}
|
|
24
24
|
|
25
25
|
export HOME=${HOME:-/home/vcap}
|
26
26
|
|
27
|
-
#
|
28
|
-
|
27
|
+
# Setup the PATH and LD_LIBRARY_PATH
|
28
|
+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-''} # default to empty
|
29
|
+
for package_dir in $(ls -d /var/vcap/packages/*)
|
29
30
|
do
|
30
|
-
|
31
|
+
has_busybox=0
|
32
|
+
# Add all packages' /bin & /sbin into $PATH
|
33
|
+
for package_bin_dir in $(ls -d ${package_dir}/*bin)
|
34
|
+
do
|
35
|
+
# Do not add any packages that use busybox, as impacts builtin commands and
|
36
|
+
# is often used for different architecture (via containers)
|
37
|
+
if [ -f ${package_bin_dir}/busybox ]
|
38
|
+
then
|
39
|
+
has_busybox=1
|
40
|
+
else
|
41
|
+
export PATH=${package_bin_dir}:$PATH
|
42
|
+
fi
|
43
|
+
done
|
44
|
+
if [ "$has_busybox" == "0" ] && [ -d ${package_dir}/lib ]
|
45
|
+
then
|
46
|
+
export LD_LIBRARY_PATH=${package_dir}/lib:$LD_LIBRARY_PATH
|
47
|
+
fi
|
31
48
|
done
|
32
49
|
|
33
50
|
# Setup log, run and tmp folders
|
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.23.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: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -364,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
364
|
version: '0'
|
365
365
|
requirements: []
|
366
366
|
rubyforge_project:
|
367
|
-
rubygems_version: 2.4.
|
367
|
+
rubygems_version: 2.4.8
|
368
368
|
signing_key:
|
369
369
|
specification_version: 4
|
370
370
|
summary: ''
|