Deploy OneAgent BOSH release on Cloud Foundry
The following guidelines apply to the deployment of Dynatrace OneAgent to Cloud Foundry VMs, including Cloud Foundry components, Diego cells, and Windows Diego cells.
There are two approaches for the deployment of the OneAgent BOSH release: immutable and lightweight. See the deployment strategies to decide which approach suits your needs.
-
Deploy an Environment ActiveGate (SaaS customers only).
-
Locate the download URLs located in the Environment API.
To download your Dynatrace release via the command line
Select the user menu in the menu bar.
- Click Environment API.
- Select Deployment.
-
Get the latest versions of the BOSH release.
1curl -X GET https://{api-url}/api/v1/deployment/boshrelease/versions/unix -H /2 'Authorization: Api-Token {paas-token}' -
Download the BOSH release.
For Dynatrace SaaS, replace
{api-url}
with the address of the environment ActiveGate.1wget -O dynatrace-release.tgz --header="Authorization: Api-Token {paas-token}" /2https://{api-url}/api/v1/deployment/boshrelease/agent/unix/version/{version}?skipMetadata=true1wget -O dynatrace-release.tgz --header="Authorization: Api-Token {paas-token}" /2https://{api-url}/api/v1/deployment/boshrelease/agent/windows/version/{version}?skipMetadata=true -
Confirm the checksum of the release.
For Dynatrace SaaS, replace
{api-url}
with the address of the environment ActiveGate.1curl -H "Authorization: Api-Token {paas-token}" /2https://{api-url}/api/v1/deployment/boshrelease/agent/windows/version/{version}/checksum?skipeMetadata=true34# this results in a response as follows (example):5{"sha256":"13658655d922aedc93951b545e8b881b76a77545ba6f8442828cfed53ffac3a8"}67# use the sha256 value to check against the file:8echo "13658655d922aedc93951b545e8b881b76a77545ba6f8442828cfed53ffac3a8 dynatrace-release.tgz" | sha256sum -c910# if the checksum matches the response is:11dynatrace-release.tgz: OK1213# if the checksum doesn't match:14# dynatrace-release.tgz FAILED15# sha256sum: WARNING: 1 computed checksum did NOT match -
Ensure that your BOSH CLI is successfully connected to the BOSH Director. For details, see the Cloud Foundry or VMware Tanzu documentation.
-
Upload the BOSH release of OneAgent to the BOSH Director.
1bosh -e my-env upload-release PATH-TO-BINARY/dynatrace-release.tgz -
Create a runtime configuration named
runtime-config-dynatrace.yml
and adapt the settings according to your environment:- The
apiurl
key:
Replace the Dynatrace
ENVIRONMENTID
inhttps://ENVIRONMENTID.live.dynatrace.com/api
with your own environment ID.Use
https://YourActiveGateIP
orFQDN:9999/e/<ENVIRONMENTID>/api
to download the OneAgent, as well as to communicate OneAgent traffic through the ActiveGate.We recommend that you use an ActiveGate as a connection endpoint. By default, ActiveGates have a self-signed certificate. However, if you prefer to use a trusted CA rather than the self-signed certificate, or if you're getting SSL errors during install after switching to the ActiveGate endpoint, follow the instructions on how to properly set up your ActiveGate.
- optional Configure network zones:
To configure network zones, use the following installer argument:--set-network-zone=<your.network.zone>
.
See network zones for more information.
1releases:2 - name: dynatrace-oneagent3 version: 1.187.100.20200217-11481345addons:6 - name: dynatrace-oneagent-addon7 jobs:8 - name: dynatrace-oneagent9 release: dynatrace-oneagent10 properties:11 dynatrace:12 environmentid: <environmentId>13 # The following keys are required for 1.177+ immutable OneAgent release14 apitoken: <paas-token>15 ###16 # optional properties below17 ###18 # Replace with your Dynatrace Managed URL, including the environment ID.19 # An example URL might look like the following20 apiurl: https://{your-managed-cluster.com}/e/{environmentid}/api21 # Set to 'all' if you want to accept all self-signed SSL certificates.22 sslmode: all23 # Specify the proxy to be used for communication. This setting is for BOSH only.24 # If you're using a proxy from an ActiveGate, leave this option commented out.25 proxy: https://your-proxy-url26 # Specify in which hostgroup the VMs in this deployments belong27 hostgroup: example_hostgroup28 # Define host tags for the VMs in this deployment29 hosttags: landscape=production team=my_team30 # Define custom properties for the VMs in this deployment31 hostprops: Department=Acceptance Stage=Sprint32 # Enable cloud infrastructure monitoring mode.33 # Set this to 1 to activate it34 infraonly: 035 # Enable validation of the download via certificate36 # Set this to true to active it37 validatedownload: false38 # Hand over any installer argument39 # Use either this OR the hostgroup, hosttags, infraonly, proxy properties.40 # Usage of 'installerargs' will overwrite the others!41 # (Linux only) Usage of USER= and GROUP= arguments will change user and group for plugin and network agents42 installerargs: USER=vcap GROUP=vcap --set-network-zone=<your.network.zone>43 include:44 deployments:45 - name-of-your-deployment46 stemcell:47 - os: ubuntu-xenial48 exclude:49 lifecycle: errand - The
-
Update the BOSH Director runtime configuration.
Replace
PATH
with the path to theruntime-config-dynatrace.yml
file.1bosh -e my-env update-runtime-config PATH/runtime-config-dynatrace.ymlThis runtime configuration applies to all new BOSH deployments going forward.
If you have multiple BOSH runtime configurations with different OneAgent versions, you must delete the older ones using
bosh delete-config
. -
Deploy your changes.
Since existing BOSH deployments won’t be automatically updated with the jobs specified in the runtime configuration, you need to redeploy them so that BOSH rolls out the OneAgent.
1bosh -e my-env -d deployment deploy