Home

Awesome

BOSH Deployment Resource

A resource that will deploy releases and stemcells using the BOSH CLI v2.

Differences from original BOSH Deployment Resource

The original BOSH Deployment Resource uses the Ruby CLI and does not support newer BOSH features.

Breaking Changes

Adding to your pipeline

To use the BOSH Deployment Resource, you must declare it in your pipeline as a resource type:

resource_types:
- name: bosh-deployment
  type: docker-image
  source:
    repository: cloudfoundry/bosh-deployment-resource

Source Configuration

Example

- name: staging
  type: bosh-deployment
  source:
    deployment: staging-deployment-name
    target: https://bosh.example.com:25555
    client: admin
    client_secret: admin
    ca_cert: "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----"

Dynamic Source Configuration

Sometimes source configuration cannot be known ahead of time, such as when a BOSH director is created as part of your pipeline. In these scenarios, it is helpful to be able to have a dynamic source configuration. In addition to the normal parameters for put, the following parameters can be provided to redefine the source:

Notes:

Example

- put: staging
  params:
    source_file: path/to/sourcefile

Sample source file:

{
    "target": "dynamic-director.example.com",
    "client_secret": "generated-secret",
    "vars_store": {
        "config": {
            "bucket": "my-bucket"
        }
    }
}

Behaviour

in: Download information about a BOSH deployment

This will download the deployment manifest. It will place two files in the target directory:

Note: Only the most recent version is fetchable

Parameters

- get: staging
  params:
    compiled_releases:
    - name: release-one
    - name: release-two
      jobs:
      - job-one
      - job-two

out: Deploy or Delete a BOSH deployment (defaults to deploy)

This will upload any given stemcells and releases, lock them down in the deployment manifest and then deploy.

Parameters

# Deploy
- put: staging
  params:
    manifest: path/to/manifest.yml
    stemcells:
    - path/to/stemcells-*
    releases:
    - path/to/releases-*
    vars:
      enable_ssl: true
      domains: ["example.com", "example.net"]
      smtp:
        server: example.com
        port: 25

# Delete
- put: staging
  params:
    delete:
      enabled: true
      force: true