- Lab
- A Cloud Guru
Monitoring OpenShift on Azure Using the Log Analytics Agent
In this lab you will be deploying the Log Analytics agent for Azure in OpenShift to allow you to be able to monitor OpenShift from the Azure portal.
Path Info
Table of Contents
-
Challenge
Configure Cloud Shell
Set up Cloud Shell by clicking the Cloud Shell button in the top-right corner of the screen:
Configure Cloud Shell for Bash using the Advanced Settings. Use the existing subscription, resource group, and storage account. If your storage account does not populate, make sure that your Cloud Shell region matches the location where your Azure resources are deployed. To make the file share, choose Create new and specify okdcloudshell as the new file share.
-
Challenge
Download SSH Keys for the Lab
You will need to pull down the SSH keys so you can connect to the VMs using SSH. First make the
.ssh
directoy, if it isn't already there, with themkdir
command.Then,
cd
into the.ssh
directory.Now, use
wget
to pull down the SSH keys using these links:wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/ssh/id_rsa wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/ssh/id_rsa.pub
Change the permissions of the files to
400
. -
Challenge
Run the Lab Prep Subscriptions
You will need to connect to each VM using SSH and run a prep script.
After you connect to a VM using SSH, you will first need to install
wget
if it is not already installed.We will need to download the associated script for the node found in the Git repo for the lab. The VM links are:
- For the
bastionVM-0
it would be: wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/bastionhostPrep.sh - For the
masterVM-0
it would be: wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/masterPrep.sh - For the
infraVM-0
it would be: wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/infraPrep.sh - For the
appnodeVM-0
it would be: wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/nodePrep.sh
Once the download completes, you will need to make the script executable.
Finally, you would run the script. Make sure you use
sudo
or the script will fail. - For the
-
Challenge
Install OpenShift
Use Ansible to run the
prerequisites.yml
and thedeploy_cluster.yml
playbooks to install OpenShift. Run these from the Bastion Host. -
Challenge
Deploy the OMS Agent in OpenShift
Log in to the master node and use the OpenShift CLI tools to:
- Download the
ocp-omsagent.yaml
file from the Git repo:
wget https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/ocp-omsagent.yaml
- Create the
omslogging
project. - Create a service account named
omsagent
. - Add the cluster role
cluster-reader
to the service account. - Set the Security Context Constraint to
privileged
for the service account. - Deploy the agent using the
oc create
command.
- Download the
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.