This project provides a boilerplate for deploying a K8s GPU Cluster on Civo Cloud using Terraform. It automates the setup of the Nvidia GPU Operator on the Civo Talos Linux GPU Clusters.
Before beginning, ensure you have the following:
- A Civo Cloud account.
- A Civo Cloud API Key.
- Terraform installed on your local machine.
-
Obtain your Civo API key from the Civo Cloud dashboard.
-
Create a file named
terraform.tfvars
in the project's root directory. -
Insert your Civo API key into this file as follows:
civo_token = "YOUR_API_KEY"
Project configurations are managed within the tf/variables.tf
file. This file contains definitions and default values for the Terraform variables used in the project.
Variable | Description | Type | Default Value |
---|---|---|---|
cluster_name |
The name of the cluster. | string | "llm_cluster3" |
cluster_node_size |
The GPU node instance to use for the cluster. | string | "g4g.40.kube.small" |
cluster_node_count |
The number of nodes to provision in the cluster. | number | 1 |
civo_token |
The Civo API token, set in terraform.tfvars. | string | N/A |
region |
The Civo Region to deploy the cluster in. | string | "LON1" |
To deploy, simply run the following commands:
-
Initialize Terraform:
terraform init
This command initializes Terraform, installs the required providers, and prepares the environment for deployment.
-
Plan Deployment:
terraform plan
This command displays the deployment plan, showing what resources will be created or modified.
-
Apply Deployment:
terraform apply
This command applies the deployment plan. Terraform will prompt for confirmation before proceeding with the creation of resources.