-
Notifications
You must be signed in to change notification settings - Fork 368
Updating Ruby Package in CAPI Release
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)
- 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
cd ~/workspace/capi-releasetouch config/private.yml- Populate the new
private.ymlwith the blobstore credentials found in LastPass under "Shared CF-CAPI / capi-release private.yml" - Run the
vendor-packagecommand 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/
-
Delete the old ruby package
rm -rf packages/ruby-2.4-r5/# or not??? -
In
capi-release/src/cloud_controller_ng/.ruby-versionchange2.4.5to2.4.6. -
Go to
cap-release/packages. For each of the packagespecfiles, underpackages:, change all instances ofruby-2.4-r5toruby-2.4.6-r0.9.0 -
Go into the
capi-release/jobsdirectory. For each of the jobspecfiles, underpackages:, change all instances ofruby-2.4-r5toruby-2.4.6-r0.9.0 -
In
/capi-release/packages/cloud_controller_ng/packaging, changeruby-2.4-r5toruby-2.4.6-r0.9.0. -
In
/capi-release/packages/nginx_newrelic_plugin/packaging, changeruby-2.4-r5toruby-2.4.6-r0.9.0. -
In
.capi-release/jobs/cloud_controller_ng/templates/ruby_version.sh.erb, change:source "${BOSH_PACKAGES_DIR:-/var/vcap/packages}/ruby-2.4-r5/bosh/runtime.env"tosource "${BOSH_PACKAGES_DIR:-/var/vcap/packages}/ruby-2.4.6-r0.9.0/bosh/runtime.env"` -
If you run
git statusyou should see:
2019-05-16 12:15:23 ⛅️ ruby 2.4.5p335 Alaskan in ~/workspace/capi-release
± td+cb |develop ↑1 U:1 ?:2 ✗| → git status`
On branch develop
Your branch is ahead of 'origin/develop' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: packages/ruby-2.4-r5/spec.lock
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: jobs/cc_deployment_updater/spec
modified: jobs/cc_route_syncer/spec
modified: jobs/cloud_controller_clock/spec
modified: jobs/cloud_controller_ng/spec
modified: jobs/cloud_controller_worker/spec
modified: jobs/rotate_cc_database_key/spec
modified: src/cloud_controller_ng (new commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.final_builds/packages/ruby-2.4.6-r0.9.0/
packages/ruby-2.4.6-r0.9.0/
- Target a bosh-lite. run
deploy_only_new_capi. This creates and uploadscapi-release, and does a bosh deploy. - 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"
-
Pipelines
-
Contributing
- Tips and Tricks
- Cloud Controller API v3 Style Guide
- Playbooks
- Development configuration
- Testing
-
Architectural Details
-
CC Resources
- Apps
- Audit Events
- Deployments
- Labels
- Services
- Sidecars
-
Dependencies
-
Troubleshooting
- Ruby Console Script to Find Fields that Cannot Be Decrypted
- Logging database queries in unit tests
- Inspecting blobstore cc resources and cc packages(webdav)
- How to Use USR1 Trap for Diagnostics
- How to Perf: Finding and Fixing Bottlenecks
- How to get access to mysql database
- How To Get a Ruby Heap Dumps & GC Stats from CC
- How to curl v4 internal endpoints with mtls
- How to access Bosh Director console and restore an outdated Cloud Config
- Analyzing Cloud Controller's NGINX logs using the toplogs script
-
k8s
-
Archive