Deploy OneAgent on Cloud Foundry for full-stack monitoring

The following guidelines apply to the deployment of OneAgent to Cloud Foundry VMs, including Cloud Foundry components, Diego cells, and Windows Diego cells.

Before you begin

You'll need to

  • acquire Dynatrace environment credentials.
  • review the list of supported applications and versions.
  • enable Garden and Winc for Windows Server container monitoring (Go to Settings > Process and containers > Container monitoring and in the Automatic container injection for deep monitoring section, enable the Garden containers and Winc for Windows Server containers switches.)
  • get the BOSH CLI
  • ensure you have access to the BOSH Director

Deployment instructions

There are two deployment approaches to deploy the OneAgent BOSH release: immutable and lightweight. Refer to OneAgent BOSH release page to decide which approach is right for you.

Deploying the immutable OneAgent BOSH release

Get your environment ID and the PaaS token for your Dynatrace environment.

Deploy an Environment ActiveGate (SaaS customers only) according to the installation instructions.

Locate the download URLs located in the Environment API.

Get the latest versions of the BOSH release.

 curl -X GET https://{api-url}/api/v1/deployment/boshrelease/versions/unix -H /
 'Authorization: Api-Token {paas-token}'

Download the BOSH release.

Dynatrace SaaS customers replace {api-url} with the address of the environment ActiveGate.

wget  -O dynatrace-release.tgz --header="Authorization: Api-Token {paas-token}" /
https://{api-url}/api/v1/deployment/boshrelease/agent/unix/version/{version}?skipMetadata=true

Confirm the checksum of the release

Dynatrace SaaS customers replace {api-url} with the address of the environment ActiveGate.

curl -H "Authorization: Api-Token {paas-token}"  /
https://{api-url}/api/v1/deployment/boshrelease/agent/windows/version/{version}/checksum?skipeMetadata=true

# this results in a response as follows (example):
{"sha256":"13658655d922aedc93951b545e8b881b76a77545ba6f8442828cfed53ffac3a8"}

# use the sha256 value to check against the file:
echo "13658655d922aedc93951b545e8b881b76a77545ba6f8442828cfed53ffac3a8 dynatrace-release.tgz" | sha256sum -c

# if the checksum matches the response is:
dynatrace-release.tgz: OK

# if the checksum does not match:
# dynatrace-release.tgz FAILED
# sha256sum: WARNING: 1 computed checksum did NOT match

Ensure that your bosh CLI is successfully connected to the BOSH director. For details, please refer to Cloud Foundry documentation or Pivotal documentation.

Upload the BOSH release of OneAgent to the BOSH Director:

bosh -e my-env upload-release PATH-TO-BINARY/dynatrace-release.tgz

Run the following command to retrieve your tenanttoken:

curl "https://{your-active-gate-url}/e/{environmentid}/api/v1/deployment/installer/agent/connectioninfo?Api-Token={paas-token}" -k

Create a runtime config named runtime-config-dynatrace.yml with the appropriate settings for your environment.

Notice there is a job defined for Linux (dynatrace-oneagent) and a seperate one for Windows (dynatrace-oneagent-windows).

Update the BOSH Director runtime configuration

bosh -e my-env update-runtime-config PATH/runtime-config-dynatrace.yml

where PATH denotes the path to the runtime-config-dynatrace.yml file.

This runtime configuration applies to all new BOSH deployments going forward.

If you have multiple BOSH runtime configs, with different OneAgent versions, you must delete the older ones using bosh delete-config. Consult the BOSH documentation for details.

Deploy your changes

Since existing BOSH deployments won’t be automatically updated with the jobs specified in the runtime configuration, you need to re-deploy those deployments so that BOSH rolls out the OneAgent:

bosh -e my-env -d deployment deploy