Dynatrace on Power
Dynatrace is an intelligent, fully automated monitoring and analytics platform for cloud native applications and architectures. Using artificial intelligence, Dynatrace automatically tracks and analyzes everything from the browser to the application code, including the network. It provides full-stack monitoring for front- and back-end, for infrastructure and in the Cloud as well where code-level tracking is needed. Along with monitoring capabilities, it also provides in-depth diagnostics for any problems that are detected in the monitored environment.
Dynatrace on Power
With the increasing popularity of Dynatrace and the features it provides, many customers are interested in using its functionalities on IBM Power9 systems, which leads to the need for Dynatrace on Power.
Currently, only Dynatrace Oneagent is supported on Power systems which can be used for application monitoring by using Pod runtime injection strategy. Though there are many ways in which Dynatrace monitoring can be set up, the most recommended way is to use the Red Hat Openshift Operators by Dynatrace. However, the Dynatrace operators does not have support for Power. The aim of this blog is to build Dynatrace operators on Power and test them to ensure that basic features of Dynatrace are working as expected on ppc64le architecture.
There are two Dynatrace operators, currently available for Red Hat Openshift environment — Dynatrace oneagent operator and Dynatrace operator. In this blog, we will see how both these operators can be deployed on Power. Dynatrace operator is latest and recommended choice. However, you can use any one of them as per your requirement.
Pre-requisites
- IBM Power resource for building Dynatrace operators
You can use the PowerVS service at IBM Cloud or Minicloud to get your ppc64le virtual machine. This example uses a RHEL 8.2 ppc64le VM.
- Red Hat Openshift 4.6 Cluster on Power for deploying the Dynatrace operators
- Install Go Lang on Power VM and cluster
git clone https://github.com/rpsene/goconfig.gitcd ./goconfigsource ./go.sh install
- Install Docker Engine on Power VM
mkdir /root/docker; cd /root/dockerwget https://download.docker.com/linux/centos/8/ppc64le/stable/Packages/docker-ce-20.10.10-3.el8.ppc64le.rpmwget https://download.docker.com/linux/centos/8/ppc64le/stable/Packages/docker-ce-cli-20.10.10-3.el8.ppc64le.rpmwget https://download.docker.com/linux/centos/8/ppc64le/stable/Packages/docker-ce-rootless-extras-20.10.10-3.el8.ppc64le.rpmwget https://download.docker.com/linux/centos/8/ppc64le/stable/Packages/containerd.io-1.4.11-3.1.el8.ppc64le.rpmyum localinstall containerd.io-1.4.11-3.1.el8.ppc64le.rpm docker-ce-cli-20.10.10-3.el8.ppc64le.rpm docker-ce-20.10.10-3.el8.ppc64le.rpm docker-ce-rootless-extras-20.10.10-3.el8.ppc64le.rpmservice docker start
- Install Kustomize on Power cluster
unset GOPATHunset GO111MODULESgit clone https://github.com/kubernetes-sigs/kustomizecd kustomize && git checkout kustomize/v3.10.0yum install gcccd kustomize && go install .export PATH=$PATH:~/go/bin/
Dynatrace Oneagent Operator
Dynatrace OneAgent Operator is responsible for managing the lifecycle of OneAgent deployments in your Kubernetes and OpenShift environments. As its name suggests, OneAgent Operator is devoted to the lifecycle of OneAgent. Other Dynatrace components, like ActiveGate, are deployed separately. It automates the repetitive steps involved in keeping Dynatrace OneAgent at its latest desired version, thus easing the burden on the operational team.
Building Dynatrace Oneagent Operator on Power
git clone https:// github.com/snehakpersistent/dynatrace-oneagent-operatorcd ./dynatrace-oneagent-operator && git checkout ppc-v0.10.0export TAG=v0.10.0./build/deploy.sh
This will build dynatrace-oneagent-operator:latest
image for ppc64le architecture. The Dynatrace oneagent operator image is also available on the quay repository.
Deploying Dynatrace Oneagent Operator on Power
- Create artefacts required for the deployment on Power cluster
git clone https:// github.com/snehakpersistent/dynatrace-oneagent-operatorcd ./dynatrace-oneagent-operator && git checkout ppc-v0.10.0export TRAVIS_TAG=v0.10.0cp ~/go/bin/kustomize ././build/release.sh
This will generate artefacts for Kubernetes and Openshift environment in the artefacts
directory. In this example, we will use the openshift.yaml
manifest for deploying the resources on Openshift.
2. Deploy Dynatrace oneagent operator
oc adm new-project --node-selector="" dynatraceoc apply -f openshift.yamloc -n dynatrace logs -f deployment/dynatrace-oneagent-operator
3. Create Oneagent custom resource
The rollout of Dynatrace OneAgent is governed by custom resource of type OneAgent. The most basic configuration for the OneAgent object is here. Update cr.yaml
with values for Dynatrace API URL and secret holding Dynatrace tokens. Steps to create Dynatrace tokens are here.
oc -n dynatrace create secret generic oneagent –from-literal="apiToken=DYNATRACE_API_TOKEN" --from-literal="paasToken=PLATFORM_AS_A_SERVICE_TOKEN"oc apply -f config/samples/cr.yaml
After successfully deploying all the resources, you will be able to see the cluster and host data on Dynatrace UI as shown below:
Dynatrace Operator
The new Dynatrace operator elevates cloud-native observability for Kubernetes and Openshift enviroments. It is responsible for handling the lifecycle of OneAgent, Kubernetes API monitoring as well as OneAgent traffic routing. Hence, if you are using Dynatrace oneagent operator, it is recommended to migrate to the new Dynatrace operator.
Existing Dynatrace customers can now migrate from VM-based ActiveGates to Kubernetes pods that support necessary ActiveGate capabilities. Both Kubernetes monitoring and routing capabilities now use a containerized architecture and are managed by the new Dynatrace Operator.
Building Dynatrace Operator on Power
git clone https://github.com/snehakpersistent/dynatrace-operatorcd ./dynatrace-operator && git checkout ppc-support-newdocker build -t dynatrace-operator:latest-ppc .
This will build dynatrace-operator:latest-ppc
image for ppc64le architecture. The Dynatrace operator image is also available on the quay repository.
Deploying Dynatrace Operator on Power
- Deploy Dynatrace operator
Make sure that config/deploy/openshift/openshift-all.yaml
points to the dynatrace-operator:latest-ppc
image built for ppc64le architecture.
git clone https://github.com/snehakpersistent/dynatrace-operatorcd ./dynatrace-operator && git checkout ppc-support-newoc adm new-project --node-selector="" dynatraceoc apply -f config/deploy/openshift/openshift-all.yamloc -n dynatrace logs -f deployment/dynatrace-operator
2. Create DynaKube custom resource
Login to your Dynatrace Dashboard. If you’re new, refer these steps to create account on Dynatrace. Once logged in, select Deploy Dynatrace > Start installation > Openshift. Enter deployment name and create tokens for Dynatrace operator and Data ingestion. Next, download the dynakube.yaml and copy it to your ppc64le cluster.
On Dynatrace dashboard, select Deploy Dynatrace > Start installation > Linux. Create PaaS Token and select installer type as PowerPC (LE). Now copy installer URL path and PaaS Token into environment variables in dynakube.yaml under onagent section:
- name: ONEAGENT_INSTALLER_SCRIPT_URL
value: "https://<Tenant_URL>.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=ppcle&flavor=default"
- name: ONEAGENT_INSTALLER_DOWNLOAD_TOKEN
value: <PaaS Token>
Also, update image in oneagent section to docker.io/dynatrace/oneagent:latest
. In this example, we will disable routing and Kubernetes monitoring in dynakube.yaml
as ActiveGate is not yet supported on Power. You can do this by commenting capabilities listed under ActiveGate section in dynakube.yaml
.
oc apply -f dynakube.yaml
After successfully deploying all the resources, you will be able to see the cluster and host data on Dynatrace UI as shown below:
Workaround for routing and Kubernetes API monitoring on Power
As a workaround for enabling Kubernetes API monitoring on Power, you can install an ActiveGate on a standalone VM with supported architecture like x86 and then connect your ppc64le Openshift environment as mentioned here.
Work in Progress for Dynatrace on Power
With capabilities like Kubernetes API monitoring and ActiveGate routing, Dynatrace offers insightful observability in Kubernetes and Openshift environments. However, these capabilities require Dynatrace ActiveGate component, which does not have support for ppc64le architecture.
Our current focus is to add Power support to Dynatrace ActiveGate so that the customers can fully utilize the capabilities provided by Dynatrace Operator. Once this is achieved, the next step would be to publish the Dynatrace Operators officially on Power.
Thanks for reading! I hope you found this tutorial helpful :)