This AppFirst BOSH Release is intended on being a collocated bosh release to be collocated with all other BOSH releases deployed by BOSH.
AppFirst is an exteremly low overhead collection agent.
Wayne E. Seguin wayneeseguin@gmail.com
MIT, see LICENSE file.
We will walk through an example of using with Cloud Foundry.
To use this bosh release, first upload it to your bosh:
bosh target $BOSH_HOST
git clone https://github.com/wayneeseguin/appfirst-boshrelease.git
cd appfirst-boshrelease
bosh upload release releases/appfirst-1.ymlNext download your manifest file for the deployment targeted so we can edit it and add the appfirst release.
mkdir -p ~/workspace/manifests
bosh download manifest cf-staging ~/workspace/manifests/cf-staging.yml
bosh deployment ~/workspace/manifests/cf-staging.ymlEdit the manifest file you downloaded (~/workspace/manifests/cf-staging.yml) and add settings as follows.
Add appfirst to the list of known releases:
releases:
#...
- name: appfirst
version: latestFor consistency also add appfirst to the releases: section under meta:
meta:
environment: cf-staging
releases:
- name: cf
version: latest
- name: appfirst
version: latestAdd appfirst properties including your tenant id, for this example we are deploying appfirst on our Cloud Foundry environment so we also added a 'cloudfoundry' server tag.
Fist log into the AppFirst UI and find your tenant_id which is listed as 'Account ID' under the admin|accounts page.
properties:
# ... lots of properties ... at bottom put vv
appfirst:
tenant_id: {{Account ID}}
server_tags:
- cloudfoundryNOTE: If you have a managed or on-prem AppFirst backend then you also have to set the frontend_url: and backend_url: properties.
Now, for every instances: entry under jobs: add the following in the templates: section:
- name: appfirst
release: appfirstNow you can deploy,
bosh -n deployDownload your manifest file for the deployment targeted.
bosh target {{BOSH_DIRECTOR_URL/IP}}:25555
mkdir -p ~/workspace/manifests
bosh download manifest cf-staging ~/workspace/manifests/cf-staging.yml
bosh deployment ~/workspace/manifests/cf-staging.ymlMake your changes to the release and then create a new development release by running:
bosh create release --with-tarball --force && bosh -n upload releaseFor the two appfirst release version: entries change 'latest' to the '0+dev.N' version generated by the above command. Deploy your changes to take effect in the BOSH environment you have targeted.
bosh -n deployIf you want to test your changes on one specific job, say runner_z0/0, instead of all jobs:
bosh -n recreate runner_z1 0 --force
bosh ssh runner_z1 0 # Hop on and have a look around...Note, to restart all processes except AppFirst via Monit on a host run the following command as root on the host.
monit summary | awk -F\' '/Process/&& !/appfirst/{print $2}' | xargs -n1 monit restart