Download PDF
Download page Set up the Web Monitoring PSA in a Windows Environment Using Minikube.
Set up the Web Monitoring PSA in a Windows Environment Using Minikube
- Minikube is installed in a single machine. Hence, it is not scalable or highly available when you set up PSA in Minikube.
- Functionality-wise, there is no difference between PSA in Minikube and PSA in AKS, EKS, GKE, or any other Kubernetes cluster.
Set up the Web Monitoring PSA in a Windows environment using Minikube as follows:
Create an Azure Windows Virtual Machine
Perform the following steps:
- Log in to the Azure Portal.
- Navigate to Virtual Machines.
Click Create > Virtual Machine, and then under Instance details, specify the following details:
Field Description Virtual machine name Specify a name for the virtual machine. Image Windows Server 2019 Datacenter - Gen2
Size Standard_D8s_v3 - 8 vcpus, 32 GiB memory (US$ 483.26/month)
In the above scenario, a basic machine with 8 vCPUs and 32Gb memory is selected. For a higher load, you may have to select a bigger machine.
- Under Administrator account, specify a username and password.
Click Review + create.
The virtual machine deployment may take a few minutes to complete. When the deployment is complete, you can view the new virtual machine Under Virtual Machines.
- Open the virtual machine, and click Connect > RDP.
- On the next page, click Download RDP File to download the file.
Open the RDP file that you downloaded in the previous step.
You will be prompted to specify a username and password. Use the username and password you created in step 4.Any Remote Desktop application must be installed on your machine to open the file.
Set up Minikube in the Azure Windows Virtual Machine
Perform the following steps:
- Log in to the Virtual Machine that you created.
- Install the Chocolatey package manager.
- Restart the Virtual Machine and open a new Powershell as an administrator.
Install Minikube:
choco install minikube
CODEInstall the Docker Desktop application:
choco install docker-desktop
CODE- Restart the Virtual Machine.
Launch the Docker Desktop application, then go to Settings > Resources.
By default, only limited CPUs and Memory are allotted to Docker. Increase the resources allocation becasue the agent setup will run inside docker.
Example resource allocation:
Resources Value CPUs 8 Memory 25 GB Swap 1 GB Disk image size 64 GB Start the Minikube cluster:
minikube start --driver=docker
CODEThis command also sets up
kubectl
.
Deploy Heimdall in the Minikube Cluster
- Create the Kubernetes Cluster.
- Build and customize the Docker image.
- Save Images to Minikube's Docker Daemon.
- Deploy the Private Synthetic Agent.
Create the Kubernetes Cluster
When you install Minikube on your machine, it comes with its Docker environment. If you build the Docker images on your machine and use those images for the Kubernetes deployment, it pulls the images from the Docker registry or hub and produces an error while starting the pod. This occurs because your machine's docker daemon and the Minikube docker daemon are different. Therefore, you must ensure that you use the Minikube docker daemon to build the docker images.
To use Minikube docker daemon, run this command:
minikube -p minikube docker-env | Invoke-Expression
Download the zip file for Simple Synth PSA installation from the Appdynamics Downloads Portal or from the beta upload tool, and then copy the file to your virtual machine.
To start the Kubernetes cluster:
minikube start --kubernetes-version=v1.x.x
Build and Customize Image
Extract the SimpleSynthPrivateAgent.zip file in the virtual machine and perform these steps:
For sum-chrome-agent:
- Unzip the zip file to access the sum-chrome-agent directory.
Navigate to the directory and run the following command:
docker build -f Dockerfile-PSA -t sum-chrome-agent:<agent-tag> .
CODE
For sum-heimdall:
- Unzip the zip file to access the sum-heimdall directory.
Navigate to the directory and run the following command:
docker build -f Dockerfile-PSA -t sum-heimdall:<heimdall-tag> .
CODE
You can use any value for <heimdall-tag> and <agent-tag>, but ensure that you use the same value in the subsequent steps.
Verify that the images are built:
docker images
Add Custom Python Libraries
This is an optional step. In addition to the available standard set of libraries, you can add custom Python libraries to the agent to use in scripted measurements. You build a new image based on the image you loaded as the base image.
Create a Dockerfile and create
RUN
directives to run python pip. For example, to install the libraryalgorithms
you can create a Dockerfile:# Use the sum-chrome-agent image we just loaded as the base image FROM sum-chrome-agent:<agent-tag> # Install algorithm for python3 on top of that RUN python3 -m pip install algorithms==0.1.4 # We can add more RUN directives for installing more libraries # RUN python3 -m pip install ...
CODEYou can create any number of
RUN
directives to install the required libraries.To build the new image, enter:
docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
CODEThe newly built agent image contains the required libraries.
Save Images to Minikube's Docker Daemon
You must tag and push the images to a registry for the cluster to access them. Execute the following command to save the images to Minikube docker:
docker save sum-heimdall:<heimdall-tag> | (eval $(minikube docker-env) && docker load)
docker save sum-chrome-agent:<agent-tag> | (eval $(minikube docker-env) && docker load)
Deploy the Web Monitoring PSA
The application is deployed to the cluster after the images are in the Registry. You use the Helm chart to deploy and create all Kubernetes resources in the required order.
Install Helm using the Chocolatey package manager:
choco install kubernetes-helm
CODECreate a new measurement namespace where Heimdall, Postgres database, and measurement pods will run.
To create a new measurement namespace, enter:
kubectl create namespace measurement
CODEUsing a single command, you can deploy the Helm chart which contains the deployment details. To deploy the agent, you use the Helm chart
sum-psa-heimdall.tgz
in the zip file that you downloaded previously. Before you deploy the Private Synthetic Agent, you must set some configuration options. To view the configuration options, navigate to the previously downloadedsum-psa-heimdall.tgz
file and enter:helm show values sum-psa-heimdall.tgz > values.yaml
CODEThese are the configuration key value pairs that you need to edit in the
values.yaml
file:Configuration Key
Value
heimdall > repository
sum-heimdall
heimdall > tag
<heimdall-tag>
heimdall > pullPolicy
Never
agent > repository
sum-chrome-agent
agent > tag
<agent-tag>
shepherd > url
Shepherd URL
shepherd > credentials
credentials
shepherd > location
agent location
You can leave the rest of the values set to their defaults or configure them based on your requirements.
To deploy the Helm chart using the above-mentioned configuration, navigate to the previously downloaded
sum-psa-heimdall.tgz
file and enter:helm install heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
CODEAll the Kubernetes resources are created in the cluster and you can use Heimdall. After a few seconds, Heimdall initializes and is visible in the Controller.
To verify if the pods are running, enter:
kubectl get pods --namespace measurement
CODETo make any changes to the
values.yaml
after the initial deployment, navigate to the previously downloadedsum-psa-heimdall.tgz
file and enter:helm upgrade heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
CODETo remove the deployment:
helm uninstall heimdall-onprem --namespace measurement
CODEThis is not recommended unless it is required.