MicroBOSH is designed to be updated regularly. I update my MicroBOSH
at least once a week. To do so you can run:
cd ~/workspace/my-micro
bosh micro deployment ./my-micro-manifest.tgz
bosh micro deploy ~/Downloads/some-new-stemcell.tgz --update
Let me describe what that command does assuming that you already had
an existing MicroBOSH:
- find existing vm
- connect to existing agent
- stop bosh services via the agent
- detach the persistent disk which contains all of deployment
information (bosh db, etc)
- delete existing vm
- delete existing stemcell
- create new stemcell in iaas
- create new vm based on the new stemcell
- reattach persistent disk
- start bosh services via the agent
- wait until things are running
So to summarize existing persistent data is kept and will be made
available when new microbosh vm is created. All of your deployments
managed by microbosh will be there.
Sometimes problems arise during this procedure. For example IaaS
completely failed and new vm was not created. You should be able to
just re-run bosh micro deploy command (from the same directory where
bosh-deployments.yml is kept).
If that does not work out persistent disk is still recorded and _not_
deleted. You can always log into the IaaS and manually delete the VM.
After that modify bosh-deployments.yml and remove vm_cid field (make
sure to keep disk_cid) and re-run deploy command.