cloud-foundrybosh-deployer

How to use BOSH lite as a developer?


I've been tasked with updating some BOSH scripts/jobs/what have you, and developing them is costing me a heck of a lot of time.

I finally was keyed into using BOSH lite, but I only really see how to deploy CloudFoundry to the BOSH lite environment.

However, I'm a bit lost as to what I need to put into my BOSH lite release/manifest/what goes here?

Can someone describe their workflow with BOSH lite, and what types of information I need to put in the release manifest to deploy my release and test out my jobs and errands in BOSH lite? I have been having a difficult time finding good resources in this area, and just BOSH in general.


Solution

  • The high level workflow is:

    The three main things you need to tell a Director are the stemcell(s), release(s), and deployment manifest. By now, you have some idea what a release is, it's basically all the software that gets run.

    The stemcell is the base OS image that will be common to all your deployed VMs (you can have different stemcells within a deployment, but the most common thing is to have them all the same); this is a special image that has some stuff pre-baked into it to facilitate working with BOSH. Primarily, it has a BOSH agent, this is how the Director communicates with the VMs to tell it "download this package", "download this job", "start this process", etc.

    The deployment manifest is a YAML file where you specify several things:

    BOSH-Lite is a Vagrant VM which is essentially running two things you care about:

    The advantage of BOSH-Lite is that it's much cheaper and faster to launch a container within a VM on your laptop than it is to launch a real VM in AWS, vSphere, OpenStack, or other real datacenter.

    First-time workflow (after starting and targetting BOSH-Lite):

    $ git clone YOUR_RELEASE_REPO
    $ cd YOUR_RELEASE_REPO
    $ bosh create release && bosh upload release
    $ # create manifest, call it manifest.yml
    $ bosh -d manifest.yml deploy
    

    Iterating:

    $ # modify the code in your repo
    $ bosh create release --force && bosh upload release
    $ # modify your manifest if necessary
    $ bosh -d manifest.yml deploy
    

    Creating the manifest from scratch can be hard if you're not familiar with BOSH manifests. One things you may want to consider doing is following the instructions you've found for creating the BOSH-Lite manifest for Cloud Foundry. Then modify that to suit your project.

    Here is the full documentation on the schema of a deployment manifest: https://bosh.io/docs/deployment-manifest.html.

    If you generate a manifest and have trouble with it, you can turn to GitHub issues or the mailing list which may be better suited for back-and-forth help on getting your manifest working.