cloudfoundry / bosh-cli

BOSH CLI v2+
Apache License 2.0
178 stars 162 forks source link

Allow package cache dir to be overriden for create/delete env commands #658

Closed selzoc closed 2 months ago

selzoc commented 2 months ago

When the bosh cli deploys a bosh director, it typically has a cache under "$HOME/.bosh/installations//packages". This works fine if you are compiling the CPI releases locally, as the same CPI release is used both for creating the Director VM and for the Director VM to use to create other VMs.

We want to be able to shorten the create-env time by using compiled CPI releases. For Ruby-based CPIs, the location on the filesystem of their packages when they are invoked matters. Since the CPI release is compiled on stemcell, and is intended to be used on a Director VM, also based on a stemcell, the Ruby-based CPIs NEED to be located in a particular directory ("/var/vcap/packges") to function.

By allowing the bosh cli to use "/var/vcap/packages" as the package cache directory, the create-env command can use the same compiled CPI as the Director VM itself, with no modifications to the CPI.