Simple build-deploy workflow for Baserock VM

Overview

A common use-case for working with Baserock is wanting to make a change (e.g. add a component, change a version etc), rebuild the system, deploy it, test the change, then make another change and repeat.

Assuming that it's possible to test what you're changing in a Baserock VM, then you can consider the following process, after upgrading to latest morph:

  • make your changes to the definition of the system you're in
  • build that
  • deploy it as an upgrade to your own system
  • boot into the upgrade
  • test
  • then return to your initial state to make more modifications

As of Baserock 14.40 the definitions repo has a short script cycle.sh to make this really simple.

The cycle.sh script can also be used to build-and-deploy an upgrade to a Baserock VM.

Workflow

The whole process inside a Baserock development or build system can be

git clone git://git.baserock.org/baserock/baserock/definitions
cd definitions
# do your edit(s) to systems/devel-system-x86_64-generic.morph 
# and/or any of its strata
scripts/cycle.sh systems/devel-system-x86_64-generic.morph clusters/upgrade-devel.morph
reboot
# select the TEST system from the boot menu 
# (or wait for it to boot by default)
# log in and do your testing
reboot
# select your factory system from the boot menu
# log back in and repeat from the edit step....

Note you can even work on a different system (say systems/genivi-baseline-x86_64-generic.morph) cycle into that, test it, reboot back in your original state, make changes, cycle again etc.