Habitat boshrelease

So you have familiarized your self with habitat
but your tired of spinning up docker containers manually
and just want to use bosh to handle it all?

Well that’s why I have build a generic bosh release for habitat
that should be able to deploy all habitat services that are currently available.

Please note that this bosh releases uses bosh links
so you should use this with bosh2.
If you do not have bosh2 you can get it up and running within 20 minutes by using bucc

Getting Started

Upload the latest habitat-boshrelease to your bosh

bosh upload-release https://github.com/cloudfoundry-community/habitat-boshrelease/releases/download/v0.0.2/habitat-0.0.2.tgz
Example Deployment

For this example we are going to deploy shield where we will deploy a PostgreSQL cluster with SHIELD.

---
name: shield
update:
  canaries: 1
  canary_watch_time: 30000-1200000
  max_in_flight: 5
  serial: false
  update_watch_time: 5000-1200000
instance_groups:
- name: database
  azs:
  - z1
  instances: 3
  persistent_disk_type: 5GB
  vm_type: default
  stemcell: default
  networks:
  - name: default
  jobs:
  - name: habitat
    release: habitat
    provides:
      habitat: {as: hab_postgres}
    consumes:
      habitat: {from: hab_postgres}
  properties:
    hab:
      service: starkandwayne/postgresql
      topology: leader
- name: shield
  azs:
  - z1
  instances: 1
  vm_type: default
  stemcell: default
  update:
    max_in_flight: 1
  networks:
  - name: default
  jobs:
  - name: habitat
    release: habitat
    consumes:
      habitat: {from: hab_postgres}
  properties:
    hab:
      service: starkandwayne/shield
      binds:
        - "database:postgresql.default"
releases:
- name: habitat
  version: latest
stemcells:
- alias: default
  os: ubuntu-trusty
  version: "3363.20"
Configuration

Here you will provide the service you want to install which are available in the habitat depot

 hab:
   service: starkandwayne/postgresql

The PostgreSQL db configuration is and example of a service which both provides and consumes itself:

 provides:
   habitat: {as: hab_postgres}
 consumes:
   habitat: {from: hab_postgres}

If you are not familiar with habitat and topology see https://www.habitat.sh/docs/run-packages-topologies/

 hab:
   topology: leader

Spread the word

twitter icon facebook icon linkedin icon