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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f17041e4f4a608b4955a09e655c62d200689525
4
- data.tar.gz: 47bb082f621ca64763a7a19cacc10323415fcb3c
3
+ metadata.gz: e8b00234c82d49b763a3ed19a84afceafc7493c8
4
+ data.tar.gz: 3c69fec977cc0128d6a91353e9933a647a715c42
5
5
  SHA512:
6
- metadata.gz: 70495c5c389f7692dfef781d6c95993195cb8f2fea2cf73e80e550469a06cd56590bbe4f3ccac7485f44b0e1815f2debd8f399dadfd8bcbe845534af5cc42925
7
- data.tar.gz: 03a70228d6950940a1f525b64443ba550b4f235df569be262e7dba4781ceeaf99437defb5fc1c0489f216bf8f8233a57d84f7b51d6f41621cc63c4e86f1fcd83
6
+ metadata.gz: 6b32ffaff5af4640f65a567baa60864021eb4faaccad2d870abbd308653874dea027a8ca9e32a2fa56f6c15974008c01052237dd6e50a1de24878a310a49c0a4
7
+ data.tar.gz: 77f926b0c7c91283989e7b3f237dff994fb32b8fff2976bac04269231853db3bc19c1c8b2629a3524559d74bb952779e928c71934e1e88f3e4c1d20f5251672d
@@ -1,8 +1,7 @@
1
1
  language: ruby
2
2
  script: bundle exec rake spec
3
3
  rvm:
4
- - ruby-2.1.6
5
- - ruby-2.2.2
4
+ - ruby-2.2.5
6
5
  notifications:
7
6
  email:
8
7
  recipients:
@@ -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!
@@ -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 webapp_ctl script
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
- EXITSTATUS=0
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
- # Add all packages' /bin & /sbin into $PATH
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 package_bin_dir in $(ls -d /var/vcap/packages/*/lib)
26
+ for package_dir in $(ls -d /var/vcap/packages/*)
32
27
  do
33
- export LD_LIBRARY_PATH=${package_bin_dir}:$LD_LIBRARY_PATH
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
- # Add all packages' /bin & /sbin into $PATH
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 package_bin_dir in $(ls -d /var/vcap/packages/*/lib)
34
+ for package_dir in $(ls -d /var/vcap/packages/*)
40
35
  do
41
- export LD_LIBRARY_PATH=${package_bin_dir}:$LD_LIBRARY_PATH
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 "please set environment" ))
3
- stemcell: (( param "please set stemcell" ))
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 "please set director_uuid" ))
8
+ director_uuid: (( param "Please set the UUID of your BOSH Directory" ))
8
9
 
9
- releases: (( param "please set release" ))
10
+ releases: (( param "Please list the BOSH releases to use for this deployment" ))
10
11
 
11
- jobs: (( param "please set jobs" ))
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 "please set compilation cloud properties" ))
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 "please set resource_pool cloud properties" ))
31
+ cloud_properties: (( param "Please configure the Cloud Properties for your Resource Pool" ))
@@ -1,7 +1,7 @@
1
+ ---
1
2
  meta:
2
- environment: (( param "please set meta environment" ))
3
- dns_root: (( param "please set meta dns_root" ))
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,3 +1,4 @@
1
+ ---
1
2
  meta:
2
3
  environment: <%= project_name_hyphenated %>-warden
3
4
 
@@ -1,6 +1,4 @@
1
- meta:
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 "please set just_install_package networks" ))
17
+ networks: (( param "Please configure the networks for this job" ))
20
18
 
21
- networks: (( param "please set networks" ))
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 | awk '{print $2}')
34
+ DIRECTOR_NAME=$(echo "$BOSH_STATUS" | grep Name | sed 's/.*Name *//')
35
35
  NAME=$template_prefix-$infrastructure
36
36
 
37
- if [[ $DIRECTOR_NAME = "warden" && ${infrastructure} != "warden" ]]; then
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
- STEMCELL_URL=$(bosh public stemcells --full | grep $DIRECTOR_CPI | grep $STEMCELL_OS | sort -nr | head -n1 | awk '{ print $4 }')
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
- # Add all packages' /bin & /sbin into $PATH
28
- for package_bin_dir in $(ls -d /var/vcap/packages/*/*bin)
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
- export PATH=${package_bin_dir}:$PATH
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
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Gen
3
- VERSION = "0.22.0"
3
+ VERSION = "0.23.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.22.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: 2015-11-21 00:00:00.000000000 Z
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.6
367
+ rubygems_version: 2.4.8
368
368
  signing_key:
369
369
  specification_version: 4
370
370
  summary: ''