Skip to content

Building Packages From Source

William Martin edited this page Nov 13, 2017 · 1 revision

Introduction

This guide describes how to build the BOSH Agent and PowerShell modules used to enable Windows VMs to be managed by a BOSH director (i.e. a stemcell). While this isn't required, as the agent and modules are shipped on this repo's releases page, some operators want to consume edge releases, and some organizations have restrictions against downloading binaries.

Dependencies

Building these packages requires the following:

Getting Started

  • Clone this repo on your workstation (not the VM for your stemcell) and include the submodules.
git clone --recursive https://github.com/cloudfoundry-incubator/bosh-windows-stemcell-builder bwsb
cd bwsb
git checkout <DESIRED_STEMCELL_VERSION_TAG>
gem install bundler
bundle install

For DESIRED_STEMCELL_VERSION_TAG, use the version tag of the stemcell you want to build, e.g. 1200.8. You can also build from the master branch with git checkout master.

Notes

  • You may need to run the above gem install and bundle commands with sudo on Mac OS X and Linux if you're using the system Ruby.
  • Do not use the GitHub-generated Source Code.zip and Source Code.tar.gz files from the releases page. They are not git repositories and are missing the required submodules.
  • On Windows, you must clone directly into C:\\, or the git clone and submodule update may fail due to file path length limitations.

Building the BOSH Agent

The BOSH Agent ships as releases in this repo, but if you need to build the agent from source.

rake package:agent

Building the PowerShell Modules

The PowerShell modules are also shipped as releases in this repository, but you can build them yourself with:

rake package:psmodules

Using the Packages

The commands above will result in zip files used as part of the stemcell build process. Upload them to your target Windows VM as part of the respective steps.