BOSH can deploy jobs on Windows VMs. Currently available Windows stemcells can be found on the Bosh.io Stemcell Page. Additionally, there is open source tooling and documentation available to build vSphere and Openstack stemcells for Windows.

In general Windows BOSH Releases work in the same way as a standard BOSH release. The main difference is that the monit file for Linux Releases is structured differently on Windows. Below are specific concerns for jobs on Windows.


Releases

The structure of a BOSH release for Windows is identical to Linux BOSH Releases. This means the structure of a Windows BOSH release will be:

  • metadata that specifies available configuration options
  • ERB configuration files
  • a Monit file that describes how to start, stop and monitor processes
  • start and stop scripts for each process
  • additional hook scripts

Jobs

The structure of a BOSH job for Windows is similar to the Standard Linux BOSH Job Lifecycle, only with processes monitored by Windows Service Wrapper instead of monit.

The monit file for Windows is a JSON config file that describes processes to run:

{
  "processes": [
    {
      "name": "say-hello",
      "executable": "powershell",
      "args": [ "/var/vcap/jobs/say-hello/bin/start.ps1" ],
      "env": {
        "FOO": "BAR"
      }
    }
  ]
}

The above monit file will execute the file C:\var\vcap\jobs\say-hello\bin\start.ps1 with the environment variable FOO set to BAR. The BOSH agent ensures the process is running by executing within a service wrapper.

Also, note that Pre-Start, Post-Start, Drain, and Post-Deploy scripts (described in the job lifecycle) must be powershell scripts and end with the .ps1 extension, i.e., pre-start.ps1, post-start.ps1, drain.ps1, and post-deploy.ps1.


Sample BOSH Windows Release

Please see the next page for a sample BOSH Windows release.


Contribute changes to this page