Using Baserock offline

A Baserock development VM uses network connectivity to

  • create local clones from the Trove's mirrors of the repos of components it needs to build
  • fetch the latest changes from the Trove's mirror repos
  • check for and use cached artifacts from the artifact cache
  • push built artifacts to the artifact cache
  • use a distbuild network to build systems
  • deploy built systems across a network

Without network connectivity, a Baserock VM cannot do any of those thing, but it can still

  • make changes to systems by editing the .morph files
  • commit those changes to local repos
  • build changed systems
  • deploy built system to a VM on the same machine as the development VM
  • use a Trove VM on the same machine as the development VM
  • use a distbuild VM on the same machine as the development VM

Get local clones of Trove repos

To work offline, you will need to get local clones of the Trove's mirrors of the repos of components you need to build your target system. You can do this by making morph build all of the components (to build a component, morph clones the component's repo from the Trove's mirror to a local repo in the /src/cache/gits directory).

The following steps will cause the build to happen and the required repos to be cloned locally

# Update local cache (we set a fake cache server, so morph will fetch everything)
morph --git-resolve-cache-server=http://none/ build <system-i-want-to-build-offline>

Use the --no-git-update option to morph commands

Some morph commands will call git remote update --prune (and git fat init and git fat pull) in each of its local repos, to fetch changes from the repo's remote on the Trove. Without network connectivity, these calls will fail, causing the morph command to fail also. To run these commands offline, you need to use the --no-git-update [1] option, which will cause the calls which attempt to access the remote not to be made [2].


[1] If you are using the cycle.sh script, then you will need to add --no-git-update to the call to 'morph build' on line line 57