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.
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.yml
Next 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.yml
Edit 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: latest
For consistency also add appfirst to the releases:
section under meta:
meta:
environment: cf-staging
releases:
- name: cf
version: latest
- name: appfirst
version: latest
Add 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:
- cloudfoundry
NOTE: 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: appfirst
Now you can deploy,
bosh -n deploy
Download 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.yml
Make your changes to the release and then create a new development release by running:
bosh create release --with-tarball --force && bosh -n upload release
For 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 deploy
If 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