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 Dynatrace Garden container monitoring (Go to Settings > Process and containers > Container monitoring and in the Automatic container injection for deep monitoring section, enable the Garden containers switch.)
  • get the BOSH CLI
  • ensure that your Cloud Foundry deployment uses Garden-runC v1.0.0 or higher

Get your Dynatrace environment ID and PaaS token

The first step is to get your environment ID and the PaaS token for your Dynatrace environment.

Upload and deploy the Dynatrace BOSH add-on

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

Get the link to the latest BOSH release on Github. You can also run the following command to get the URL of the latest release, provided that you have jq installed.

RELEASE=$(curl -s | jq -r ".assets[] | select(.name) | .browser_download_url")

Upload the BOSH release of Dynatrace OneAgent to the BOSH Director:

  • For Ops Manager v1.10 or earlier:
    bosh upload release PATH-TO-BINARY/dynatrace-release.tar.gz

  • For Ops Manager v1.11 or later:
    bosh2 -e my-env upload-release PATH-TO-BINARY/dynatrace-release.tar.gz

Optionally, from the command line, you can confirm that upload of the Dynatrace software binary is complete. You should see the Dynatrace binary file:

bosh releases

Update your runtime configuration to include the Dynatrace OneAgent for BOSH add-on

Create a Dynatrace OneAgent manifest runtime-config-dynatrace.yml. Please see the sample runtime configuration. The Dynatrace OneAgent release that you uploaded in the previous step consists of two jobs. The dynatrace-oneagent job is applicable for Linux VMs. The dynatrace-oneagent-windows job is for Windows VMs. Since the runtime configuration needs to split jobs for Linux and Windows, you need to define two add-on sections in the manifest file.

Note: If you’ve installed other BOSH add-ons, you must merge the Dynatrace manifest into your existing add-on manifest.

Update the BOSH Director runtime configuration

  • For Ops Manager v1.10 or earlier:
    bosh update runtime-config PATH/runtime-config-dynatrace.yml

  • For Ops Manager v1.11 or later:
    bosh2 -e my-env update-runtime-config PATH/runtime-config-dynatrace.yml

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

The updated runtime configuration applies to all new BOSH deployments going forward.

Deploy changes and run OneAgent

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 OneAgent:

  • For Ops Manager v1.10 or earlier:
    bosh deploy

  • For Ops Manager v1.11 or later:
    bosh2 -e my-env -d deployment deploy