Re-hosting (also referred to as lift and shift) is a common migration use case. Re-architecture and Re-platform are steps that break the traditional architectures and replace individual components with cloud services and microservices.
We just learned how we can get great information on services, processes and user requests using Dynatrace and OneAgent. This helps us now decide what individual features or complete applications based on business benefits we need to migrate and modernize. The idea here is to focus on feature-based business benefit with functional migration.
🔷 Install the Dynatrace Operator and sample application
🔷 Review how the sample application went from a simple architecture to multiple services
🔷 Examine the transformed application using service flows and back traces
For our lab, another version of the application exists that breaks out each of these backend services into separate services. By putting these services into Docker images, we gain the ability to deploy the service into modern platforms like Azure Kubernetes and Cloud managed services such as the ones from Azure shown below.
The picture below shows how the components of the sample application interact with Dynatrace.
#1 . Sample Application - Representing a "services" architecture of a frontend and multiple backend services implemented as Docker containers that we will review in this lab.
#2 . Azure Kubernetes Service (AKS) - is hosting the application. The Kubernetes cluster had the Dynatrace OneAgent Operator installed. (see below for more details). Two AKS nodes make up the Kubernetes cluster. The Dynatrace OneAgent was preinstalled by the OneAgent operator and is sending data to your Dynatrace SaaS environment. (see below for more details)
#3 . Dynatrace Operator - Dynatrace OneAgent is container-aware and comes with built-in support for out-of-the-box monitoring of Kubernetes. Dynatrace supports full-stack monitoring for Kubernetes, from the application down to the infrastructure layer.
#4 . Dynatrace tenant is where monitoring data is collected and analyzed.
#5 . Full-Stack Dashboard - Made possible by the Dynatrace OneAgent that will automatically instrument each running node & pod in AKS.
#6 . Kubernetes Dashboard - The Kubernetes page provides an overview of all Kubernetes clusters showing monitoring data like the clusters' sizing and utilization.
One key Dynatrace advantage is ease of activation via Azure Portal. OneAgent technology simplifies deployment across large enterprises and relieves engineers of the burden of instrumenting their applications by hand. As Kubernetes adoption continues to grow, it becomes more important than ever to simplify the activation of observability across workloads without sacrificing the deployment automation that Kubernetes provides. Observability should be as cloud-native as Kubernetes itself.
In our workshop, we will install the Dynatrace Operator that streamlines lifecycle management. You can read more about it here in this Dynatrace Blog
Organizations will often customize the Dynatrace Operator installation and you can read more about the options in the Dynatrace Doc but, we are going to use a single command that we can get from the Dynatrace interface to show how easy it is to get started.
Settings -> Extensions + Applications
Install an extension
. Basics
tab, the subscription and resource group shold already be pre-selected. Just select the AKS Cluster from the drop down. Dynatrace Operator Configuration
here are the values to fill in
AKS extension resource name
: dynatraceazuregrailDynatrace operator token
: token value from notepad saved from earlier stepData ingest token
: token value from notepad saved from earlier stepAPI URL
: URL value from notepad saved from earlier stepOneAgent Deployment Type
: cloud native full stackReview + Create
and click Create
on the next screen.Apps
and bring up Kubernetes Classic
app.In this step we'll walk through deploying the sample app that is now "modernized" into a microservices based app to the Azure Kubernetes cluster.
We'll use a shell script to deploy the sample application. Below you'll learn some details around what that shell script is doing and YAML file parmeters that Dynatrace uses to define and configure your application in Kubernetes.
cd ~/azure-modernization-dt-orders-setup/app-scripts
./start-k8.sh
Running
status.kubectl -n staging get pods
The output should look like this:NAME READY STATUS RESTARTS AGE
browser-traffic-5b9456875d-ks9vw 1/1 Running 0 30h
catalog-7dcf64cc99-hfrpg 1/1 Running 0 2d8h
customer-8464884799-vljdx 1/1 Running 0 2d8h
frontend-7c466b9d69-9ql2g 1/1 Running 0 2d8h
load-traffic-6886649ddf-76pqf 1/1 Running 0 2d8h
order-6d4cd477cb-9bvn4 1/1 Running 0 2d8h
In this step we will review the Sample app that we modernized and deployed to Kubernetes. Refer to this picture for a more detailed description of our setup.
1 - Dynatrace Namespace
This Kubernetes Namespace contains the pods and services that make up the Dynatrace Operator.
2 - Kubernetes nodes
Kubernetes runs your workload by placing containers into Pods to run on [Nodes] Nodes .
3 - Dynatrace
Dynatrace tenant where monitoring data is collected and analyzed.
4 - Cloud shell
The shell is configured with the kubectl command line tool that lets you control Kubernetes clusters.
5 - Sample application namespace
This Kubernetes Namespace contains the sample application pods and services.
6 - Sample application
The frontend service is exposed as a public IP and is accessible in a browser.
kubectl -n staging get svc
http://11.22.33.11
for the example above. The output and application should look like the above browser window* Customer List = customer/list.html
* Customer Detail = customer/5.html
* Catalog List = catalog/list.html
* Catalog Search Form = catalog/searchForm.html
* Order List = order/list.html
* Order Form = order/form.html
For full observability into your Kubernetes events, automatic Davis analysis, and custom alerting, you need to enable Kubernetes event monitoring & Log ingest into Dynatrace
Enable Kuberenetes Events
. On the next screen click on Monitor events and click Save bottom. Set up log ingest
to capture log data for the cluster. Ingest all detected log sources
.Kubernetes Classic
app from the left navigation menu.In this step we will walk through the different Dynatrace dashboards that are available out of the box for monitoring Kubernetes.
Apps --> Deployment status
to review OneAgent Deployment statusDeployment status
page, next click on the ActiveGate
option to review the Active Gate. Apps --> Kubernetes Classic
and navigate to the Kubernetes cluster page as shown below: application A
and application B
workloads) on same clusterNamespace analysis
section shows workloads metrics over time Namespace Analysis
section, pick the view all staging
namespace.process analysis
section, click on 2nd staging-frontend
Proces Icon to review the services running inside the containerProperties and Tag
Section, you'll notice the various Kubernetes information that is also available for this service.Now that we've modernized the application and installed it on Kubernetes, we still need to trace the application transactions from front to back.
Dynatrace understands your applications transactions from end to end. This transactional insight is visualized several ways like the backtrace.
The backtrace tree view represents the sequence of services that led to this service call, beginning with the page load or user action in the browser.
Dynatrace also gives you insight into what Kubernetes cluster, node, workload, and namespace that service is running on.
order
servicedt-orders-k8 management
zone. order
service. Topology
section just click on the View Backtrace
button.In this step we will walk through the Service Flow view within Dynatrace and see what's different now that its deployed on Kubernetes.
Frontend
servicedt-orders-k8 management
zone. frontend
service. service flow
button to open this. While migrating to the cloud, you want to evaluate if your migration goes according to the plan, whether the services are still performing well or even better than before, and whether your new architecture is as efficient as the blueprint suggested. Dynatrace helps you validate all these steps automatically, which helps speed up the migration and validation process.
Having the ability to understand service flows enables us to make smarter re-architecture and re-platforming decisions. With support for new technologies like Kubernetes, you have confidence to modernize with a platform that spans the old and the new.
In this section, you should have completed the following:
✅ Installed Dynatrace Operator on Azure Kubernetes cluster via Azure Portal
✅ Review real-time data now available for the sample application on Kubernetes
✅ Review Kubernetes dashboards within Dynatrace
✅ Review how Dynatrace helps with modernization planning