|glmdev 9d91c08045 update helm link||6 months ago|
|container||6 months ago|
|definitions||6 months ago|
|demos||6 months ago|
|README.md||6 months ago|
|cluster_exec.sh||6 months ago|
|setup.sh||6 months ago|
|start_cluster.sh||6 months ago|
|stop_cluster.sh||6 months ago|
This repository contains some resources for getting started with OpenMPI and high-performance computing on Kubernetes. This accompanies a presentation given by Garrett Mills at the KU CRMDA on Docker, Kubernetes, and high-performance computing.
If you want to follow along or try OpenMPI on Kubernetes out for yourself, you can get started by creating a virtual cluster on your machine with Minikube. Here’s how to get set up:
kubectl. This is the Kubernetes CLI tool. It’s how you interface with Kubernetes. Grab it here.
git clone https://git.glmdev.tech/glmdev/k8s-hpc-demo
That’s it! You’re ready to start using the Kubernetes cluster on your computer.
From within the cloned repository’s folder, run the
./setup.sh command. This will clone the
kube-openmpi repository and generate the SSH key used by OpenMPI.
Now, we can start the cluster by running the
./start_cluster.sh script. This will create the Kubernetes resources and start the cluster. If you have the
watch command line tool installed, it will open up the cluster status page so you can see when it’s done initializing.
At this point, we have a fully-functional OpenMPI cluster. By default, the definitions provided in this repo will create 5 worker nodes. You can run commands on the cluster using the
./cluster_exec.sh script. For example:
$ ./cluster_exec.sh mpiexec --allow-run-as-root --hostfile /kube-openmpi/generated/hostfile -n 5 echo "Hello, world!" Hello, world! Hello, world! Hello, world! Hello, world! Hello, world!
When you’re finished with the cluster, stop it using the