Skip to content

helixml/terraform-gke-helix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-gke-helix

Terraform GKE Helix Cluster

Prerequisites

  • Install terraform
brew install terraform
  • Install google-cloud-sdk to get the gcloud CLI
brew install --cask google-cloud-sdk

Setup

  1. Clone this repository and cd into the directory:
git clone https://github.com/helixml/terraform-gke-helix.git
cd terraform-gke-helix
  1. Log into GCP:
gcloud init
gcloud auth application-default login
  1. Edit the configuration in the terraform.tfvars file to match your account.
  2. Initialize the Terraform workspace:
terraform init

Provision

Now deploy the infra.

terraform apply

Configure Kubectl

gcloud container clusters get-credentials $(terraform output -raw kubernetes_cluster_name) --region $(terraform output -raw region) --project $(terraform output -raw project_id)

You may need to install gke-gcloud-auth-plugin to gain access to the cluster.

Install Helix

Now you can install Helix by following the Helix Kubernetes installation documentation.

Here is some useful information when you configure the runner:

  • the default GPU type in the terraform.tfvars is an L4 with 24GB GPU ram. So --set runner.memory=24GB.
  • by default there's a single node with a GPU. So install everything on the same node (no selector) and --set replicaCount=1

For example:

export LATEST_RELEASE=$(curl -s https://get.helix.ml/latest.txt)
helm upgrade --install my-helix-runner helix/helix-runner \
  --set runner.host="http://my-helix-controlplane" \
  --set runner.token="oh-hallo-insecure-token" \
  --set runner.memory=24GB \
  --set replicaCount=1 \
  --set runner.axolotl="false" \
  --set image.tag="${LATEST_RELEASE}-small"

Access Helix

The default kubernetes installation is locked down. You can access Helix via port-forwarding from your machine.

kubectl port-forward svc/my-helix-controlplane 8080:80

And visit: http://localhost:8080/

Take a look at the user documentation to learn how to use Helix.

Delete the Cluster

terraform destroy

About

Terraform GKE Helix Cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages