BOSH helps us with many simple conventions: packages are a single folder full of files, job templates are a folder full of monit script, bin and configuration files, and manifests have a nice structure to them.

But beyond these conventions, with over 100 BOSH releases in existence over the last five years, there are many diverging conventions and patterns for building releases and describing deployment manifests.

Fortunately there is Dmitriy's bosh-lint CLI to help.

For my own amusement, I'll use it on one of Dmitriy's own BOSH releases: zookeeper-release.

There are two primary commands:

  • bosh-lint lint-release (also aliased bosh-lint release and bosh-lint r as you get lazier and lazier over time)
  • bosh-lint lint-manifest manifests/thing.yml (aliased bosh-lint manifest and bosh-lint m)

Let's see how Dmitriy's release fares:

$ bosh-lint release
Problem                                                                        Context                        Resolution  
Name does not match suggested regexp '^[a-z0-9]+(([a-z0-9]+\-?)+[a-z0-9]+)?$'  Release: Job 'smoke_tests'     Rename  
Name does not match suggested regexp '^[a-z0-9]+(([a-z0-9]+\_?)+[a-z0-9]+)?$'  Release: Package 'golang_1.7'  Rename

2 suggestions  

Oh dear.

$ bosh-lint manifest manifests/zookeeper.yml
Problem                                                                        Context                                 Resolution  
Name does not match suggested regexp '^[a-z0-9]+(([a-z0-9]+\-?)+[a-z0-9]+)?$'  Manifest: Instance group 'smoke_tests'  Rename

1 suggestions  

Hmmm.

But... every BOSH release probably has some deviations from bosh-lint. Yet they are super easy to fix and test.

I submitted a PR to zookeeper-release:

pr

Took a couple minutes. Thanks bosh-lint.

Please help fix a community/core BOSH release today!