Switch to OpenShift disconnected workshop.
This commit is contained in:
78
data/hackathon/scenario1.mdx
Normal file
78
data/hackathon/scenario1.mdx
Normal file
@ -0,0 +1,78 @@
|
||||
---
|
||||
title: Understanding the hackathon environment
|
||||
exercise: 1
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "Let's get underway with the hackathon."
|
||||
---
|
||||
|
||||
Welcome to the OpenShift Virtualisation Hackathon! Here you'll have a chance to build your container native virtualisation prowess. Exercises will award points for each correct solution.
|
||||
|
||||
You're in a race to reach the highest score before the session concludes! If multiple teams complete all exercises so share points totals a further ranking will be done by elapsed time based on when slack messages are sent.
|
||||
|
||||
**Let's get started!**
|
||||
|
||||
|
||||
## 1.1 - The hackathon scenario
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *Acme Financial Services* |
|
||||
</Zoom>
|
||||
|
||||
Acme Financial Services is a large bank based in Australia. They have a number of virtual machine workloads that are running on a traditional hypervisor and are considering moving these to another platform.
|
||||
|
||||
One of the potential options for Acme Financial Services is to adopt Red Hat OpenShift Virtualisation as a container native virtualisation platform.
|
||||
|
||||
Your hackathon team are the pre-sales technical team engaging with Acme technical teams to secure buy-in for a large scale migration to proceed.
|
||||
|
||||
|
||||
## 1.1 - Understanding the environment
|
||||
|
||||
For this challenge you'll be given a fresh bare metal OpenShift 4 cluster **with the OpenShift Virtualisation operator already installed**.
|
||||
|
||||
All challenge tasks must be performed on this cluster so your solutions can be graded successfully.
|
||||
|
||||
You can and are encouraged to use any supporting documentation or other resources in order to tackle each of the challenge tasks.
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *OpenShift bare metal cluster console* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 1.2 - Obtain your environment
|
||||
|
||||
Working in a small team you will have one shared cluster for team members to share. Your team will have a name allocated already.
|
||||
|
||||
To get underway open your web browser and navigate to this link to allocate an environment for your team https://demo.redhat.com/workshop/s72ya3.
|
||||
|
||||
Register for an environment using `[team name]@redhat.com` and the password provided by your hackathon organisers. Registering with a team email will mean all your team members will be able to see the same cluster details for your shared team cluster.
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *Hackathon team registration page* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 1.4 - Confirm environment access
|
||||
|
||||
If your team have secured an environment and are ready to start the challenge please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> [team name] have logged into an environment and are starting the challenge!
|
||||
|
||||
The event team will reply in slack to confirm your team has been recorded and start you with a base score of `10` points.
|
||||
|
||||
|
||||
## 1.5 - Hints!
|
||||
|
||||
If you get stuck on a question, fear not, perhaps try a different approach. If you have tried everything you can think of and are still stuck you can unlock a hint for `3` points by posting a message in the `#event-anz-ocp-virt-hackathon` channel with the message:
|
||||
|
||||
> [team name] are stuck on [exercise] and are unlocking a hint.
|
||||
|
||||
A hackathon organiser will join your breakout room to share the hint with you 🤫.
|
||||
45
data/hackathon/scenario2.mdx
Normal file
45
data/hackathon/scenario2.mdx
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: What about my legacy technical debt?
|
||||
exercise: 2
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "Will OpenShift Virtualisation run Acme virtual machines?"
|
||||
---
|
||||
|
||||
As a sales team you've got an upcoming demo with the Acme Financial Services linux team. They are concerned a modern cloud native virtualisation platform like OpenShift Virtualistion won't run their **Crusty Corp Fun Financial Appliance™** vm appliances which run CentOS Linux `5.11` and cannot be updated or altered in any way 🤯.
|
||||
|
||||
The Acme team are well aware these virtual machines would not be "supported" but ultimately the deal rests on your teams ability to prove that such an old operating system will boot successfully within OpenShift Virtualisation.
|
||||
|
||||
|
||||
## 2.1 - Create the virtual machine
|
||||
|
||||
For this task, your team are required to use this [`CentOS-5.11-x86_64-netinstall.iso`](https://vault.centos.org/5.11/isos/x86_64/CentOS-5.11-x86_64-netinstall.iso) file.
|
||||
|
||||
No command line is required. Your challenge is to create and boot a virtual machine on your cluster using the name `crusty-corp-fun-financial-appliance`, within the namespace `crusty-corp`.
|
||||
|
||||
**Note: You don't need to complete the CentOS 5 install, you just need to get the machine to boot into the installer.**
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/creating_vms_custom/virt-creating-vms-from-custom-images-overview.html
|
||||
|
||||
|
||||
## 2.2 - Boot the virtual machine
|
||||
|
||||
For this challenge you will know you are successful and will be awarded points when your virtual machine boots the given iso and shows the following logo in vnc console:
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *Crusty corp financial appliance boot screen.* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 2.3 - Check your work
|
||||
|
||||
If your **Crusty Corp Financial Appliance™** has booted please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> Please review [team name] solution for exercise 2.
|
||||
|
||||
This exercise is worth `25` points. The event team will reply in slack to confirm your updated team total score.
|
||||
41
data/hackathon/scenario3.mdx
Normal file
41
data/hackathon/scenario3.mdx
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
title: But can it do live migration?
|
||||
exercise: 3
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "Will OpenShift Virtualisation live migrate a virtual machine?"
|
||||
---
|
||||
|
||||
During the demo with the Acme Financial Services team one of their traditional hypervisor team asked if you can show them a live migration for a running virtual machine. They say they are used to performing migrations using a feature in their existing hypervisor called "vMotion" so want to know that feature works in OpenShift Virtualisation.
|
||||
|
||||
You know KVM & KubeVirt has supported a similar feature called "Live Migration" for ages. Thinking on your feet you remember the Fedora virtual machine you were tinkering with last night in the `demotestwtf17` namespace on the cluster. Perhaps you can quickly use that to demo a live migration?
|
||||
|
||||
The Acme Financial Services team have put you on the spot, can you pull off a virtual machine live migration? 😅
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *He's dead Jim...* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 3.1 - Initiate the live migration
|
||||
|
||||
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 🤦.
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/live_migration/virt-configuring-live-migration.html
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/advanced_vm_management/virt-schedule-vms.html
|
||||
|
||||
## 3.2 - Check your work
|
||||
|
||||
If the virtual machine in your `demotestwtf17` namespace has been live migrated to another node successfully please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> Please review [team name] solution for exercise 3. Our vm has migrated to node [node name].
|
||||
|
||||
This exercise is worth `25` points. The event team will reply in slack to confirm your updated team total score.
|
||||
45
data/hackathon/scenario4.mdx
Normal file
45
data/hackathon/scenario4.mdx
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: What about balancing vm workloads?
|
||||
exercise: 4
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "How do we optimally balance vm workloads across an OpenShift cluster?"
|
||||
---
|
||||
|
||||
After the slick demos and objection handling from your pre sales team Acme Financial Services have agreed to run a small scale proof of concept for OpenShift Virtualisation 🎉
|
||||
|
||||
They have spun up a bare metal OpenShift cluster, installed OpenShift Virtualisation and now have a small number of virtual machines running.
|
||||
|
||||
One of the goals of the pilot is to ensure their virtual machine workloads will run efficiently on their new infrastructure and continually auto balance over time based on available underlying infrastructure capacity so they don't have some nodes much busier than others.
|
||||
|
||||
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 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>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *"We've all said it 😂"* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 4.1 - Enabling virtual machine balancing profiles
|
||||
|
||||
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`. 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
|
||||
|
||||
If you've successfully enabled deschedular evictions for the `centos` virtual machine please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> Please review team [name] solution for exercise 4.
|
||||
|
||||
This exercise is worth `25` points. The event team will reply in slack to confirm your updated team total score.
|
||||
69
data/hackathon/scenario5.mdx
Normal file
69
data/hackathon/scenario5.mdx
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
title: How do I resize virtual machine disks again?
|
||||
exercise: 5
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "Persistent volume what??"
|
||||
---
|
||||
|
||||
The proof of concept has been going well at Acme Financial Services. Their team are a few sprints in and have just pinged you an email out of the blue:
|
||||
|
||||
|
||||
> Subject: Quick Help Needed: Expanding Storage for VM!
|
||||
>
|
||||
> Hey Red Hat Pre-Sales Team,
|
||||
>
|
||||
> Hope you're doing awesome! 🚀
|
||||
>
|
||||
> I'm the storage guru over at Acme Financial Services, we met last sprint review. I need your brainpower to help with a little incident. One of our virtual machines in our Red Hat playground will run out of disk in 2 hours based on current rates.
|
||||
>
|
||||
> Are you free to jump on a call, like nowish so we can fix it???
|
||||
>
|
||||
> Would not be a good look if this thing blows up 😅
|
||||
>
|
||||
> Thanks a ton for your help!
|
||||
>
|
||||
> Cheers,
|
||||
>
|
||||
> Chad McStorageGuy<br />
|
||||
> Chief Principal Lead Strategic Storage Architect Engineer<br />
|
||||
> Acme Financial Services
|
||||
|
||||
Ruh roh. Normally this would just be handled via support but you know it might take longer for a response as this isn't technically a production environment. You agree to help Chad to try and prevent any bad news for the proof of concept.
|
||||
|
||||
Time to roll up your sleeves, join the Acme Skype for Business™ video call and get it sorted. Tick tock...
|
||||
|
||||
|
||||
## 5.1 - Expand the vm storage
|
||||
|
||||
For this task your team's challenge is to increase the storage of an existing virtual machine `cryto-carnivore-cpuminer3000` in the `super-important-dont-deleteme` namespace.
|
||||
|
||||
The virtual machine currently has a root disk of `30GiB` of storage. This needs to be increased to `60GiB`. No command line is required, though you will need to investigate potential storage misconfigurations and verify that your additional storage is now presented to the virtual machine operating system.
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virtual_disks/virt-expanding-vm-disks.html
|
||||
- https://docs.openshift.com/container-platform/4.15/storage/expanding-persistent-volumes.html#expanding-csi-volumes_expanding-persistent-volumes
|
||||
|
||||
|
||||
## 5.2 - But wait there's more!
|
||||
|
||||
While you're on the Skype for Business™ video call with Chad fixing the `crypto-carnivore-cpuminer3000` storage incident he also puts you on the spot and asks for some guidance on how to add an additional disk to the vm for a new ~~cve-ridden-literal-malware~~workload that Acme is developing.
|
||||
|
||||
This is a straightforward table stakes procedure for any virtualisation platform so you offer to step Chad through it then and there and get it out of the way.
|
||||
|
||||
Your task is to add an additional `20GiB` disk labelled `wannacry` to the virtual machine. No command line is required, however you may have to get creative and manually create the volume and update the virtual machine spec if your OpenShift console "Configure --> Add Disk" functionality isn't working.
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virtual_disks/virt-hot-plugging-virtual-disks.html
|
||||
- https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.15/html/managing_and_allocating_storage_resources/managing-persistent-volume-claims_rhodf#configuring-application-pods-to-use-openshift-data-foundation_rhodf
|
||||
|
||||
|
||||
## 5.3 - Check your work
|
||||
|
||||
If you've successfully resolved Chad's storage concerns please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> Please review [team name] solution for exercise 5.
|
||||
|
||||
Both exercises 5.1 and 5.2 are worth `15` points each for a total of `30` points. The event team will reply in slack to confirm your updated team total score.
|
||||
61
data/hackathon/scenario6.mdx
Normal file
61
data/hackathon/scenario6.mdx
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
title: Can I connect my pods to my virtual machine?
|
||||
exercise: 6
|
||||
date: '2024-04-14'
|
||||
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
||||
draft: false
|
||||
authors: ['default']
|
||||
summary: "How do we make a virtual machine accessible over the OpenShift SDN"
|
||||
---
|
||||
|
||||
Time flies when you're having fun, after 17 months the "quick" proof of concept for OpenShift Virtualisation has now completed at Acme Financial Services and the CTO has asked for a final presentation from the local Red Hat pre sales team.
|
||||
|
||||
The Acme team have talked about modernisation throughout the proof of concept so for the final demo your local Red Hat team agree to again showcase how container workloads can be run alongside virtual machines and even balance traffic across containers and virtual machines.
|
||||
|
||||
This is it. No pressure but we need to nail this!
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *"The best of both worlds!"* |
|
||||
</Zoom>
|
||||
|
||||
|
||||
## 6.1 - Deploy workloads
|
||||
|
||||
Your first challenge for this exercise is to deploy two workloads within the `acme-bank` namespace on your cluster:
|
||||
|
||||
1. The container image `quay.io/redhattraining/hello-world-nginx` running as a standard `deployment` named `acme-pod`, listening on port `8080`.
|
||||
|
||||
2. A linux virtual machine named `acme-vm` running that same workload on port `8080` in podman for simplicity.
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/applications/creating_applications/odc-creating-applications-using-developer-perspective.html#odc-deploying-container-image_odc-creating-applications-using-developer-perspective
|
||||
- https://podman.io/docs/installation#installing-on-linux
|
||||
- https://developers.redhat.com/cheat-sheets/podman-cheat-sheet
|
||||
|
||||
## 6.2 - Establish networking
|
||||
|
||||
Once the workloads are deployed your challenge is to create one service named `acme-balancer` that will load balance traffic across the virtual machine and regular container.
|
||||
|
||||
You'll know if this is working correctly when you can see two pods appearing in your service pod listing:
|
||||
|
||||
<Zoom>
|
||||
| |
|
||||
|:-----------------------------------------------------------------------------:|
|
||||
| *"One service balancing traffic across a vm and standard pod!"* |
|
||||
</Zoom>
|
||||
|
||||
Documentation you may find helpful is:
|
||||
- https://docs.openshift.com/container-platform/4.15/virt/vm_networking/virt-exposing-vm-with-service.html
|
||||
- https://kubevirt.io/user-guide/virtual_machines/service_objects
|
||||
- https://kubernetes.io/docs/concepts/services-networking/service
|
||||
|
||||
|
||||
## 6.2 - Check your work
|
||||
|
||||
If you've successfully prepared the demo environment workloads and networking for the CTO demo please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
||||
|
||||
> Please review team [name] solution for exercise 6.
|
||||
|
||||
Each of the 6.1 and 6.2 exercises are worth `15` points for a total of `30` points. The event team will reply in slack to confirm your updated team total score.
|
||||
Reference in New Issue
Block a user