Finalise exercise 4.

This commit is contained in:
2024-04-14 16:46:57 +12:00
parent 5fe2185b02
commit ba30dd5ea3
3 changed files with 43 additions and 6 deletions

View File

@ -426,10 +426,46 @@ oc --namespace demotestwtf17 get VirtualMachineInstance fedora
** Exercise four - What about balancing vm workloads?
#+begin_src tmux
# Create required namespace
# Create required namespace for vm
oc create namespace itsjustyaml
# Create the suggested namespace for descheduler operator
oc create namespace openshift-kube-descheduler-operator
# Create the subscription for the kube deschedular operator
cat << EOF | oc apply --namespace openshift-kube-descheduler-operator --filename -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: cluster-kube-descheduler-operator
namespace: openshift-kube-descheduler-operator
spec:
channel: stable
installPlanApproval: Automatic
name: cluster-kube-descheduler-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
# Create the instance of descheduler
cat << EOF | oc apply --namespace openshift-kube-descheduler-operator --filename -
apiVersion: operator.openshift.io/v1
kind: KubeDescheduler
metadata:
name: cluster
namespace: openshift-kube-descheduler-operator
spec:
deschedulingIntervalSeconds: 3600
logLevel: Normal
managementState: Managed
mode: Automatic
operatorLogLevel: Normal
profileCustomizations:
devLowNodeUtilizationThresholds: Medium
profiles:
- AffinityAndTaints
- DevPreviewLongLifecycle
EOF
#+end_src
* Automated scenario cleanup

View File

@ -23,7 +23,7 @@ The Acme Financial Services team have put you on the spot, can you pull off a vi
## 3.1 - Initiate the live migration
For this task, your team must live migrate the virtual machine named `fedora` in namespace `demotestwtf17` from one node to another and record the name of the node the vm has migrated to.
For this challenge, your team must live migrate the virtual machine named `fedora` in namespace `demotestwtf17` from one node to another and record the name of the node the vm has migrated to.
No command line is required. However before you can complete the migration you will first need to investigate and correct why the virtual machine is not running. You had one too many coke zeros last night and can't remember how you got the machine into the state it's in 🤦.

View File

@ -1,5 +1,5 @@
---
title: What about rebalancing virtual machines?
title: What about balancing vm workloads?
exercise: 4
date: '2024-04-14'
tags: ['openshift','virtualisation','kubernetes','kubevirt']
@ -16,12 +16,12 @@ One of the goals of the pilot is to ensure their virtual machine workloads will
The Acme team are stuck on how they might implement this goal within their current sprint. They told you they found some documentation online on this thing called *"deschedular"* but have decided it would be easier to email Red Hat and ask for a walkthrough.
Your account manager has voluntold you to setup an example environment for them and step through how to enable the feature. No worries right. After all, how hard can it be?
Your local pre-sales team has offered to setup an example environment for Acme and step through how to enable the feature. No worries right. After all, how hard can it be?
<Zoom>
|![workshop](/workshops/static/images/hackathon/yaml-file.jpeg) |
|:-----------------------------------------------------------------------------:|
| *"We've all said it"* |
| *"We've all said it 😂"* |
</Zoom>
@ -29,10 +29,11 @@ Your account manager has voluntold you to setup an example environment for them
Your challenge for this task is to enable the **Technology Preview** feature for Virtual Machine workload balancing in OpenShift at the cluster level.
Once enabled at the cluster level you then need to deploy a **CentOS Stream 9** virtual machine called `centos` running in a new namespace called `itsjustyaml`.
Once enabled at the cluster level you then need to deploy a **CentOS Stream 9** virtual machine called `centos` running in a new namespace called `itsjustyaml`. No command line is required.
Documentation you may find helpful is:
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/advanced_vm_management/virt-enabling-descheduler-evictions.html
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-templates.html
## 4.2 - Check your work