-
Notifications
You must be signed in to change notification settings - Fork 363
Updating Ruby Package in CAPI Release
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)
- 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-release
touch config/private.yml
- Populate the new
private.yml
with the blobstore credentials found in LastPass under "Shared CF-CAPI / capi-release private.yml" - 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/
# It 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/
- In
capi-release/src/cloud_controller_ng/.ruby-version
change2.4.5
to2.4.6
. - Go to
cap-release/packages
. Search recursively and replace each instance ofruby-2.4-r5
byruby-2.4.6-r0.9.0
- Go into the
capi-release/jobs
directory. Search recursively and replace each instance ofruby-2.4-r5
byruby-2.4.6-r0.9.0
- The resulting git diff should be similar to e.g. https://github.com/cloudfoundry/capi-release/pull/237/files
- 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 NEW-VERSION"
Replace the version and make a PR of following file: https://github.com/cloudfoundry/capi-dockerfiles/blob/main/capi-migration-compatibility/Dockerfile
Update this file: https://github.com/cloudfoundry/capi-workspace/blob/ebf062d2037b3fc788993aa49d03026bddc2e84f/install-scripts/ruby.sh#L6
If you updated bundler, rebundle (bundle update --bundler
) with the new version in the following repos/directories:
- https://github.com/cloudfoundry/cloud_controller_ng
- https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/v3
- https://github.com/cloudfoundry/capi-release/tree/develop/spec
- https://github.com/cloudfoundry/capi-release/blob/develop/packages/cloud_controller_ng/packaging
Update this file for new ruby version: https://github.com/cloudfoundry/capi-dockerfiles/blob/main/capi-runtime-ci/Dockerfile. Most notably, this Dockerfile is used for creating the capi-release tarball in the https://ci.cake.capi.land/teams/main/pipelines/capi/jobs/create-capi-release job. Update the version and open a PR.
-
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