We have some shell scripts that we want available on our jobs that BOSH manages. We successfully made a package containing the shell scripts and we were able to add it to the packages of a job spec and it deployed correctly. However, this is only the first step in making the scripts useful. There are two things we are struggling with.
First, we still need a way to add the bin directory of our scripts on the PATH of a user who has `bosh ssh`ed to the machine. Ideally we would ensure that ruby is on the path as well, as some of our scripts call ruby scripts. We have no idea where to begin with this one.
The other problem is that because the scripts are in a package that is a dependency of the job, we can't update the scripts without redeploying the whole job. This is a production system, so we don't want to bring jobs down and back up if it's easily avoided. We think that we may be able to create a new job with our scripts as the dependency and then collocate that job with our important, real jobs. That way, redeploying the "scripts" job should only effectively update the script files. However, this seems to loop back into our first problem where we want to ensure that the scripts are available on the default PATH.
We considered just putting a "bootstrap" script on the jobs that would download the scripts from the internet, but we are not guaranteed that our jobs will have internet access.
Because we would like to easily update the scripts, we don't want to put the scripts in the stemcell either.
Has anyone been in a similar situation? Is there an easy or obvious way to solve the problem we're facing?
Thanks,
Mark