-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 0.4 release of our paas-collectd-boshrelease to BOSH. Send metrics to shared deployment graphite server. The initial reason why we used fork was that we could add custom tags and pin our deployment to these tags. Now, because bosh-init can only consume tarballs (you can't upload a release to bosh-init like you can to BOSH), I had to create a dev-release tarbal (using standard bosh-cli way bosh create release --with-tarball --force --version 0.4, more documentation about bosh releases: https://bosh.io/docs/create-release.html#dev-release-release). I have created the tarballs from the same code as is tagged. That is, 0.4 release is created from code that's tagged as 0.4. It seemed to me that a good place to put the release tarball was in github release. This practice is also used in some CF repositories (e.g. diego). We have a spike to analyse our situation with releases completely, but we did not want to block this story on it (#115142265 - see comments in the story). In the future, we can easily move the release location to elsewhere and we can change the way to build the releases. Because bosh-init currently uses template name as job name[1], it renders collectd config to say BOSH host is called `collectd`. Add a prefix that explicitly contains `bosh_` so that we can see which host are metrics coming from. [1] cloudfoundry-attic/bosh-init#87
- Loading branch information
Showing
5 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
releases: | ||
- name: collectd | ||
sha1: 89d9afbb4e682f31e745f07bd40ff569d347343f | ||
url: https://github.com/alphagov/paas-collectd-boshrelease/releases/download/0.4/collectd-0.4.tgz | ||
|
||
jobs: | ||
- name: bosh | ||
templates: | ||
- {name: collectd, release: collectd} | ||
|
||
properties: | ||
collectd: | ||
hostname_prefix: bosh_ | ||
interval: (( grab meta.collectd.interval )) | ||
config: (( grab meta.collectd.config )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
RSpec.describe "Bosh collectd properties" do | ||
let(:manifest) { manifest_with_defaults } | ||
|
||
it "pulls from a shared config file" do | ||
expect(manifest.fetch("properties").fetch("collectd").fetch("interval")).to eq 10 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters