Update bosh-lite to latest BOSH

Somtimes you want to play with new BOSH features which have not yet made it into a bosh-lite box. In those cases there is a quick way to update your existing bosh-lite with the latest available final BOSH release of BOSH.

First clone bosh-lite of you have not done so already:

git clone https://github.com/cloudfoundry/bosh-lite
cd bosh-lite

For completeness also install the BOSH cli:

gem install bosh_cli

Add the following snippet to your Vagrant file (before the last end):

  config.vm.provision "bosh" do |c|
    bosh_version = 168
    warden_cpi_version = 20
    releases = [{'name' => 'bosh','version' => bosh_version,
                  'url' => "https://bosh.io/d/github.com/cloudfoundry/bosh?v=#{bosh_version}"},
                {'name' => 'bosh-warden-cpi', 'version' => warden_cpi_version,
                 'url' => "https://bosh.io/d/github.com/cppforlife/bosh-warden-cpi-release?v=#{warden_cpi_version}"}]

    manifest = YAML.load_file('templates/bosh_lite_manifest_template.yml')
    manifest['releases'] = releases
    c.manifest = manifest.to_yaml
  end

You can update the release version in the above snippet with the latest version from here and here.

Install the vagrant-bosh plugin:

vagrant plugin install vagrant-bosh

Provision your bosh-lite vm:

vagrant provision

For some reason BOSH version was not updated in the bosh status output after the above steps. I fixed this by restarting all the bosh processes:

vagrant ssh
sudo su -
monit restart all

You can use watch monit summary to check if all process have been restarted.

Now you should have succesfully updated your bosh-lite vm with the latest version of bosh.

Normally new boxes should just flow out; but currently for some reason they are pausing the bosh-release resoure.

Spread the word

twitter icon facebook icon linkedin icon