- Lab
- A Cloud Guru
Enabling OpenShift Metrics and Logging on Azure
In this lab you will be enabling and deploying both the metrics and the logging components in OpenShift on Azure. This will allow metrics to show up in your web console for your applications as well as allow for log aggrregation for troubleshooting purposes.
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:
When creating the Bash Cloud Shell File share, use the existing Resource Group and the existing Storage Account (In West US).
-
Challenge
Download SSH Keys for the Lab
You will need to pull down the SSH keys to be able to connect to VMs. First, make the
.ssh
directory, if it isn't already there, with themkdir
command.Then,
cd
into the.ssh
directory.Next, use
wget
to pull down the SSH keys using these links:https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/ssh/id_rsa
https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/ssh/id_rsa.pub
Change the permission to the files to
600
. -
Challenge
Run the Lab Prep Subscriptions
We will need use SSH to connect to each VM and run a prep script.
After we use SSH to connect to a VM, we will first need to install
wget
.Next, we will need to download the associated script for the node found in the Git repo for the lab. The link is: https://raw.githubusercontent.com/ACloudGuru-Resources/content-openshift-origin-azure/master/scripts/
-
For the
bastionVM-0
it would bebastionhostPrep.sh
-
For the
masterVM-0
it would bemasterPrep.sh
-
For the
infraVM-0
it would beinfraPrep.sh
-
For the
appnodeVM-0
it would benodePrep.sh
Once the download completes, we will need to make the script executable.
Finally, we must run the script. Ensure that
sudo
is used or the script will fail. -
-
Challenge
Install OpenShift
Use Ansible to run the
prerequisites.yml
and thedeploy_cluster.yml
playbooks to install OpenShift. -
Challenge
Enable Metrics and Logging
You will need to add the following to the
/etc/ansible/hosts
file:# metrics openshift_metrics_install_metrics=True openshift_metrics_hawkular_hostname=hawlular-metrics.apps.okd.infra.example.xip.io openshift_metrics_cassandra_storage_type=dynamic openshift_metrics_storage_volume_size=1Gi openshift_metrics_hawkular_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_metrics_cassandra_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_metrics_heapster_nodeselector={"node-role.kubernetes.io/infra": "true"} # logging openshift_logging_install_logging=True openshift_logging_es_pvc_dynamic=true openshift_logging_storage_volume_size=1Gi openshift_logging_kibana_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_logging_curator_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra": "true"}
Then, you will need to run the
config.yml
playbook for bothopenshift-metrics
andopenshift-logging
.
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.