This blueprint uses GKE to provision a Kubernetes cluster and a H4D node pool, along with networks and service accounts. Information about H4D machines can be found here.
NOTE: The required GKE version for H4D support is >= 1.32.3-gke.1170000.
-
Install Cluster Toolkit
- Install dependencies.
- Set up Cluster Toolkit.
-
Switch to the Cluster Toolkit directory
cd cluster-toolkit -
Get the IP address for your host machine
curl ifconfig.me
-
Update the vars block of the
gke-h4d-deployment.yamlfile.project_id: ID of the project where you are deploying the cluster.deployment_name: Name of the deployment.region: Compute region used for the deployment.zone: Compute zone used for the deployment.static_node_count: Number of nodes to create.authorized_cidr: update the IP address in<your-ip-address>/32.reservation: The name of the compute engine reservation in the form of . To target a BLOCK_NAME, the name of the extended reservation can be inputted as /reservationBlocks/.
-
Build the Cluster Toolkit binary
make
-
Provision the GKE cluster
./gcluster deploy -d examples/gke-h4d/gke-h4d-deployment.yaml examples/gke-h4d/gke-h4d.yaml
These four options are displayed:
(D)isplay full proposed changes, (A)pply proposed changes, (S)top and exit, (C)ontinue without applying
Type
aand hit enter to create the cluster. -
Additionally, this example blueprint provisions a filestore and connects it to the GKE Cluster via Persistent Volume (PV). An example job template is included in the blueprint which runs a parallel job that reads and writes data to this shared storage. A command similar to
kubectl create -f <file-path>is displayed in the deployment outputs which can be used to trigger the sample job.
The MPI Operator is installed on the cluster during the deployment. To run a test using the MPI Operator on the GKE H4D cluster, refer to https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/tree/main/hpc/mpi.
To destroy all resources associated with creating the GKE cluster, run the following command:
./gcluster destroy CLUSTER-NAMEReplace CLUSTER-NAME with the deployment_name used in the blueprint vars block.