Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Hack] 061-DynatraceOnAzure - July2nd Updated on WTH Dynatrace labs #877

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4e845a4
Created WhatTheHack template stub
Mar 13, 2023
f8be717
wth-dynatrace - 0314
jgurbani Mar 14, 2023
0406e2f
wth-dynatrace - 0314
jgurbani Mar 14, 2023
a88b8d1
wth-dynatrace - 0314
jgurbani Mar 14, 2023
04f1c08
wth-dynatrace - 0314
jgurbani Mar 14, 2023
0aa1105
wth-dynatrace - 0314
jgurbani Mar 14, 2023
c1b04cb
wth-dynatrace - 0315
jgurbani Mar 15, 2023
98d1a36
wth-dynatrace - 0328
jgurbani Mar 28, 2023
6fc1431
Update Challenge-02.md
jgurbani Mar 28, 2023
fc9091f
Update Challenge-02.md
jgurbani Mar 28, 2023
4141ffc
Update Challenge-02.md
jgurbani Mar 28, 2023
063f5d8
Update Challenge-02.md
jgurbani Mar 28, 2023
950d1d1
Update Challenge-02.md
jgurbani Mar 28, 2023
ca3e623
wth-dynatrace - 0329
jgurbani Mar 29, 2023
31678cc
wth-dynatrace - 0329
jgurbani Mar 29, 2023
71abad9
wth-dynatrace - 0329
jgurbani Mar 29, 2023
6ecb4f9
Updates from 3/23
jgurbani Dec 6, 2023
6aa3aa9
WTH Changes - 12/6
jgurbani Dec 6, 2023
8273c58
WTH Changes - 12/6
jgurbani Dec 6, 2023
1607284
WTH Changes 12/6
jgurbani Dec 6, 2023
719e7d5
Merge branch 'microsoft:master' into xxx-DynatraceOnAzure
jgurbani Dec 6, 2023
8945fc3
June192024Commit
jgurbani Jun 19, 2024
1006363
Merge branch 'xxx-DynatraceOnAzure' of https://github.com/jgurbani/Wh…
jgurbani Jun 19, 2024
cf7a165
Merge branch 'microsoft:master' into xxx-DynatraceOnAzure
jgurbani Jun 19, 2024
2700bd7
WTH Grail Updates
jgurbani Jun 19, 2024
9d7403f
WTH Grail Updates July2nd
jgurbani Jul 2, 2024
349c5ac
Update Challenge-00.md
jgurbani Jul 2, 2024
5111c89
WTH July2nd updates to Lab5
jgurbani Jul 2, 2024
911c66b
Merge branches 'xxx-DynatraceOnAzure' and 'xxx-DynatraceOnAzure' of h…
jgurbani Jul 2, 2024
a30892c
WTH Updates July2nd
jgurbani Jul 2, 2024
85ac5d2
WTH Updates July11
jgurbani Jul 11, 2024
3909089
DT WTH Updates July17
jgurbani Jul 17, 2024
df1b89f
DT Rename WTH Updates July17
jgurbani Jul 17, 2024
6647879
DT Rename WTH Updates July17
jgurbani Jul 19, 2024
ab169a4
WTH Updates July19
jgurbani Jul 19, 2024
4ffdf8d
Create .wordlist.txt
jrzyshr Aug 9, 2024
b9fade3
Update .wordlist.txt
jrzyshr Aug 9, 2024
79363d2
Update .wordlist.txt
jrzyshr Aug 9, 2024
6f4f31c
Spell CheckUpdates - August 12
jgurbani Aug 12, 2024
b594e0a
DT Environment Note Update for Coaches - Aug 12
jgurbani Aug 12, 2024
f55f9b5
DT Environment Note Update for Coaches - Aug 12
jgurbani Aug 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"Dynatrace"
]
}
2 changes: 1 addition & 1 deletion 020-LinuxFundamentals/Student/Challenge-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In this challenge you will learn about the Linux standard file permissions and u

## Success Criteria

1. Check if the directory was sucessfully created
1. Check if the directory was successfully created
2. Confirm the file created under `~permissions`
3. Check the file inside your permissions directory. Who is the new owner of this file now?
4. Make sure you have created the file as the user root in the `/home/student/permissions` directory
Expand Down
31 changes: 31 additions & 0 deletions 061-DynatraceOnAzure/.wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Dynatrace
Dynatrace's
Gurbani
OneAgent
OneAgents
SRE
SRG
SLOs
SLO
Smartscape
JVM
FullStack
ActiveGate
ActiveGates
SLIs
SLI
Apdex
DQL
Barbari
Mitchells
ApacheJmeter
MTTR
timeframe
backtrace
subcommands
infographic
serviceflow
transactional
hotspots
balancers
SREs
Binary file added 061-DynatraceOnAzure/Coach/Lectures.pptx
Binary file not shown.
114 changes: 114 additions & 0 deletions 061-DynatraceOnAzure/Coach/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# What The Hack - Dynatrace On Azure - Coach Guide

## Introduction

Welcome to the coach's guide for the Dynatrace On Azure WhatTheHack. Here you will find links to specific guidance for coaches for each of the challenges.

This hack includes an optional [lecture presentation](Lectures.pptx) that features short presentations to introduce key topics associated with each challenge. It is recommended that the host present each short presentation before attendees kick off that challenge.

This WhatTheHack provide you hands on experience on how to Monitor Azure workloads using Dynatrace. It will show you how Dynatrace's AI-engine, Davis, performs automatic and intelligent root-cause analysis in hybrid cloud Azure environments. This hack was designed specifically for Cloud Ops Engineers, DevOps engineers, Developers, and Architects who want to expand their knowledge on Dynatrace & Azure.

The story goes that, you are new engineer that was hired to modernize a eCommerce website for company called `DTOrders`. `DTOrders` currently has this application deployed to Azure virtual machines but wants to containerize this application to run it on Kubernetes. The engineer's job will first be deploy the application to Azure VM and then migrate it run on AKS Cluster. Along the way, they'll use Dynatrace to monitor the application on Azure VM and once migrated to AKS, compare the product functionality and how easy it is to monitor and manage your application with Dynatrace.


**NOTE:** If you are a Hackathon participant, this is the answer guide. Don't cheat yourself by looking at these during the hack! Go learn something. :)

## Coach's Guides

- Challenge 00: **[Prerequisites - Ready, Set, GO!](./Solution-00.md)**
- Prepare your environment to work with Azure and Dynatrace.
- Challenge 01: **[OneAgent Observability on Azure VM](./Solution-01.md)**
- Review the power on OneAgent.
- Challenge 02: **[Dynatrace Observability on AKS](./Solution-02.md)**
- Deploy Dynatrace Operator on AKS cluster with a sample application and review AKS observability with Dynatrace.
- Challenge 03: **[Automated Root Cause Analysis with Davis](./Solution-03.md)**
- Enable a problem in your sample application and walk through what Davis found.
- Challenge 04: **[Azure Monitor Metrics & Custom Dashboard](./Solution-04.md)**
- In this challenge, you will create a custom dashboard to track Service Level Objects (SLOs)
- Challenge 05: **[Challenge 05 - Grail - Dashboards & Notebooks](./Solution-05.md)**
- In this challenge, you will query, visualize, and observe all your data stored in Grail via Dashboards and Notebooks.
- Challenge 06: **[Challenge 06 - Grail - SRE Guardian & Workflows](Solution-06.md)**
* In this challenge you'll learn the benefits of Site Reliability Guardian (SRG) and experience the power of Automation in dynatrace by creating workflows to automatically execute an SRG.
- Challenge 07: **[Cleanup](./Solution-05.md)**
- Description of challenge

## Coach Prerequisites

This hack has pre-reqs that a coach is responsible for understanding and/or setting up BEFORE hosting an event.

Please review the [What The Hack Hosting Guide](https://aka.ms/wthhost) for information on how to host a hack event.

The guide covers the common preparation steps a coach needs to do before any What The Hack event, including how to properly configure Microsoft Teams.

The folders are self contained challenges for the hack. You do not need to go to other resources to run the challenges. Attendee's will need a laptop, but only an Azure browser is required. All work will be done in the Azure portal and the Azure Command Shell. If you think attendee's laptops may be locked down to the point that they can't access Azure, than having a laptop for loan will be a good idea. No special software needs to be installed though.

The original code base for the automation scripts and sample app that are used within the Challenges are located below:

- [Dynatrace Azure Workshop Scripts](https://github.com/dt-alliances-workshops/azure-modernization-dt-orders-setup/)
- [Sample App Code Repository](https://github.com/dt-orders)
- [Docker Images](https://hub.docker.com/search?q=dtdemos)


### Dynatrace Environment Setup

To successfully run this Hack, each WhatTheHack attendee will need their own Azure AD Tenant setup.

>**Note:** If you run this Hack where attendees share the same Azure AD Tenant, only the first attendee will be able to deploy the Dynatrace Trial environment via the Marketplace in Challenge0. The rest of the attendees will get an error.


### Student Resources

Students will download the scripts from a github repo via the Git clone in the Azure Cloud shell

Always refer students to the [What The Hack website](https://aka.ms/wth) for the student guide: [https://aka.ms/wth](https://aka.ms/wth)

>**Note:** Students should **not** be given a link to the What The Hack repo before or during a hack. The student guide does **NOT** have any links to the Coach's guide or the What The Hack repo on GitHub.

### Additional Coach Prerequisites (Optional)

- Coach must validate if the [Dynatrace Azure Workshop Github repo](https://github.com/dt-alliances-workshops/azure-modernization-dt-orders-setup/) is accessible.

- If Github repo is inaccessible, please open up a issue within the WhatTheHack repo.

## Azure Requirements

This hack requires students to have access to an Azure subscription where they can create and consume Azure resources.

In addition to that, if this hack is run within the same Company/Organization, each hack attendee will need their own Azure/Entra AD tenant. The free trial tenant for Dynatrace via Marketplace, [Azure Native Dynatrace Service](https://azuremarketplace.microsoft.com/en-US/marketplace/apps/dynatrace.dynatrace_portal_integration?tab=Overview), limits customers to be able to create 1 trial tenant for their Organization. Therefore, each attendee will need an [Azure Pass codes](https://www.microsoftazurepass.com/) to successfully run this hack. With Azure Pass codes, each attendee will get their own Azure AD/Entra tenant.

These Azure requirements should be shared with a stakeholder in the organization that will be providing the Azure subscription(s) that will be used by the students.

- Attendees should have the “Azure account administrator” (or "Owner") role on the Azure subscription in order setup Azure Monitor metrics integration.

- Each student will spin up the following resources in Azure:
- 4 x 2 vCPUs VMs for the AKS cluster + 1 Public IPs
- 1 x 2 vCPUs VMs for sample monolith application
- 1 PIP for the Dynatrace Orders website on Monolith
- 1 PIP for Dynatrace Orders website on AKS
- Total: 7 vCPU + 3 Public IPs per student

>**Note**
> - Azure resources that will be consumed by a student implementing the hack's challenges
> - Azure permissions required by a student to complete the hack's challenges.

## Suggested Hack Agenda (Optional)

- Sample Hack Day (~4 hours)
- Challenge 0 (45 min)
- Challenge 1 (1 hr)
- Challenge 2 (45 mins)
- Challenge 3 (30 mins)
- Challenge 4 (30 mins)
- Challenge 5 (15 mins)
- Challenge 6 (15 mins)


## Repository Contents

- `./Coach`
- Coach's Guide and related files
- `./Coach/Solutions`
- Solution files with completed example answers to a challenge
- `./Student`
- Student's Challenge Guide

170 changes: 170 additions & 0 deletions 061-DynatraceOnAzure/Coach/Solution-00.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Challenge 00 - Prerequisites - & Setup - Coach's Guide

**[Home](./README.md)** - [Next Solution >](./Solution-01.md)

## Notes & Guidance

### Learning Objectives

We will now setup Dynatrace, Azure, and the workshop environment. You need all of these in place before you are presented with the wth challenge.

### What you'll need in this section


- Ensure your have an email for accessing your Dynatrace trial environment

- Coach must validate if the [Dynatrace Azure Workshop Github repo](https://github.com/dt-alliances-workshops/azure-modernization-dt-orders-setup/) is accessible.

### Login to Dynatrace trial environment

For this challenge, we have set-up a free Dynatrace environment with an evaluation license of the complete feature set of our all-in-one performance monitoring platform to monitor Azure resources and complete the workshop exercises.

### What you will need


### Tasks to complete this step

1) Login to your Dynatrace Environment
- Click on the link within the email you've received to login to your Dynatrace trial environment.


2) Azure Portal Prep

a. Navigate to <a href="https://portal.azure.com/" target="_blank">https://portal.azure.com/ </a>

b. Click on the Cloud Shell button
![image](Solutions/img/setup-azure-shell-open.png)

If you get this prompt, choose bash. </aside>

![image](Solutions/img/setup-azure-shell-bash.png)

c. Make a dedicated Azure shell Browser tab by clicking this new tab icon.

![image](Solutions/img/setup-azure-shell-newtab.png)

d. Within your Azure Cloud Shell window, run this command to download the workshop scripts:
```bash
git clone https://github.com/dt-alliances-workshops/azure-modernization-dt-orders-setup.git
```
e. To validate all the workshops scripts have download, please run these commands within the Azure Cloud Shell window to display the directories
```bash
cd azure-modernization-dt-orders-setup/
ls -al
```
- You should see an output similar to the one below
![image](Solutions/img/pre-requisites-azure-cli-gitcloneoutput.png)


3. Provision the workshop

* This step will automatically provision several Azure resources and Dynatrace configuration needed for the workshop via a shell script.

* The process to provision everything will take ~15-20 minutes.

1. Run the input credentials script
```bash
cd ~/azure-modernization-dt-orders-setup/provision-scripts
./input-credentials.sh
```
2. Run the provisioning script
- Run the script to provision the workshop Azure resources
```bash
cd ~/azure-modernization-dt-orders-setup/provision-scripts
./provision.sh wth
```
3. Return back to the window where you have the Azure Cloud shell open
8. Paste the full command and hit enter. You should see a prompt similar to as one below.

```
===================================================================
About to setup a Dynatrace What the Hack
Dynatrace Server: https://xxxx.live.dynatrace.com
SETUP_TYPE = wth
===================================================================
Proceed? (y/n) :
```
4. Enter **y** at the prompt to begin the provisioning of the workshop. Once the script is complete you should see output as shown below
```
=============================================
Provisioning workshop resources COMPLETE
End: Thu 25 Nov 2021 12:45:29 PM UTC
=============================================
```

## Validate workshop provisioning completed
In this step we will verify if all of the Azure resources were provisioned for the workshop

>**Note**: Only proceed if the provisioning script completed with this status:

```
...
...
=============================================
Provisioning workshop resources COMPLETE
=============================================
```

### Tasks to complete this step
1. Go back to the window where you have the Azure Portal screen open
2. Search for `Resource Groups` from the search bar at the top
![image](Solutions/img/pre-requisites-azure-portal-resources.png)
3. Click on `Resource Groups`. From the list of resource group select `<lastname>-dynatrace-azure-modernize-wth`.
4. Once you within the resource group, you will see all of the different types of resources we've automatically provisioned for this workshop
![image](Solutions/img/pre-requisites-azure-portal-resources-resourcelist.png)

### Verify AKS Cluster is provisioned
- In this step we will verify if the Azure Kubernetes Service (AKS) Cluster was provisioned correctly. Also we will download the credentials to manage our AKS cluster via `kubectl` commands.

- The <a href="https://kubernetes.io/docs/reference/kubectl/overview/" target="_blank">kubectl</a> command line tool that lets you control Kubernetes clusters. For details about each command, including all the supported flags and subcommands, see the <a href="https://kubernetes.io/docs/reference/kubectl/overview/" target="_blank">kubectl</a> reference documentation.

1. Run this command in Azure Cloud shell to get familiar with the command line options for kubectl.

```
kubectl --help
```

1. Configure kubectl to connect to the new cluster by downloading the cluster credentials.

```
az aks get-credentials --resource-group dynatrace-azure-modernize-workshop --name dynatrace-workshop-cluster
```

1. Verify you are connected. You should see `dynatrace-workshop-cluster` as the output.

```
kubectl config current-context
```

1. List the nodes in the cluster

```
kubectl get nodes
```

The output should look like this:

```
NAME STATUS ROLES AGE VERSION
aks-nodepool1-74092643-vmss000000 Ready agent 21h v1.19.11
aks-nodepool1-74092643-vmss000001 Ready agent 21h v1.19.11
```

You can see even more detail with this command.

```
kubectl describe nodes
```


## Summary

In this section, you should have completed the following:

- Provisioned a Dynatrace tenant and Azure subscription

- Setup the Azure Cloud Shell to run various UNIX commands

- Captured environment and token info needed for workshop provisioning automation scripts

- Provisioned workshop resources
Loading