Skip to content

Updating Ruby Package in CAPI Release

braa braa braa edited this page May 16, 2019 · 25 revisions

Updating the ruby package in CAPI release will allow CAPI jobs to use an updated version of ruby.

A ruby package spec file contains metadata providing which version of ruby, rubygems, and other supportive libraries. The packaging scripts specifies un-compressing these dependencies and installing them on our instances. (Q: Where does bosh get the ruby source code from?)

Steps to update ruby package (metadata for the ruby run for capi jobs) Steps to update ruby package (metadata for the ruby run for capi jobs)

  1. Get the most up-to-date version of bosh ruby-release:
git clone https://github.com/bosh-packages/ruby-release
-or-
cd ~/workspace/ruby-release && git pull
  1. cd ~/workspace/capi-release
  2. touch config/private.yml
  3. Populate the new private.yml with the blobstore credentials found in LastPass under "Shared CF-CAPI / capi-release private.yml"
  4. Run the vendor-package command to create 2 new directories that point to the updated ruby package
bosh vendor-package ruby-2.4.6-r0.7.0 ~/workspace/ruby-release/
# creates .final_builds/packages/ruby-2.4.6-r0.9.0/ and packages/ruby-2.4.6-r0.9.0/
  1. Delete the old ruby package rm -rf packages/ruby-2.4-r5/
  2. Go into the capi-release/jobs directory. For each of the job spec files, under packages:, change all instances of ruby-2.4-r5 to ruby-2.4.6-r0.9.0
  3. Target a bosh-lite. run deploy. This syncs blobs, creates and uploads capi-release, and does a bosh deploy.
  4. Validate that it works:
bosh ssh api
cd /var/vcap/jobs/cloud_controller_ng/bin
. ruby_version.sh
ruby -v
# Should see "ruby 2.4.6p354"
Clone this wiki locally