After you have installed the Cluster Toolkit, ensure that you switch to the
main working directory.
cd cluster-toolkit
Deploy the cluster
To deploy the cluster, complete the following steps.
If you might need to deploy the cluster multiple times for different
purposes or with different configurations, create a
deployment file.
To deploy the cluster, run the gcluster deploy command. If you are using any of
the example cluster blueprints
provided by Cluster Toolkit, you need to set the project ID by using either
the --vars flag or --deployment-file (or -d) flag.
If the --deployment-file and --vars flags are used at the
same time, then the variables specified with --vars take precedence.
If the --vars flag is specified multiple times, then later invocations
take precedence.
Replace the following:
PROJECT_ID: your project ID.
PATH_TO_BLUEPRINT_FILE: the path to your cluster
blueprint file. For example, if you are in the main working directory
and want to use the
hpc-slurm.yaml
blueprint, specify examples/hpc-slurm.yaml.
PATH_TO_DEPLOYMENT_FILE: the path to your
deployment file.
The gcluster command reports proposed changes for your cluster. To continue the
deployment, accept the proposed changes by typing a and pressing
enter. Optionally, you may review the proposed changes by typing
d and pressing enter.
Summary of proposed changes: Plan: 37 to add, 0 to change, 0 to destroy.
(D)isplay full proposed changes,
(A)pply proposed changes,
(S)top and exit,
(C)ontinue without applying
Please select an option [d,a,s,c]:
After accepting the changes, gcluster runs terraform apply
automatically. This takes approximately 5 minutes while it displays
progress. If the run is successful, the output is similar to the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eCluster Toolkit allows for the deployment of clusters on Google Cloud, which this document provides an overview of.\u003c/p\u003e\n"],["\u003cp\u003eBefore deploying a cluster, you must install dependencies, configure your environment, and have a cluster blueprint prepared or selected.\u003c/p\u003e\n"],["\u003cp\u003eTo deploy a cluster, use the \u003ccode\u003egcluster deploy\u003c/code\u003e command, specifying your project ID and blueprint file path with either the \u003ccode\u003e--vars\u003c/code\u003e or \u003ccode\u003e--deployment-file\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eAfter running \u003ccode\u003egcluster deploy\u003c/code\u003e, review and accept the proposed changes to proceed with the deployment, which will automatically execute \u003ccode\u003eterraform apply\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eOnce the deployment is complete, indicated by a success message, the cluster is ready for job submissions, and command-line help is available using the \u003ccode\u003e--help\u003c/code\u003e flag.\u003c/p\u003e\n"]]],[],null,["# Cluster deployment overview\n\nThis document provides an overview of how to use Cluster Toolkit to deploy\na cluster on Google Cloud.\n| **Pro Tip:** For a full step-by-step example\n| walkthrough on the setup, deployment, and submission of jobs on a cluster that\n| is created by using Cluster Toolkit,\n| see [Deploy a Slurm cluster](/cluster-toolkit/docs/quickstarts/slurm-cluster).\n\nBefore you begin\n----------------\n\n1. If you are using a Linux or macOS workstation to deploy your cluster, [install dependencies](/cluster-toolkit/docs/setup/install-dependencies).\n2. From either your workstation or Cloud Shell, [configure your environment](/cluster-toolkit/docs/setup/configure-environment).\n3. Ensure that you have created a cluster blueprint or selected one from the [Cluster Toolkit blueprint catalog](/cluster-toolkit/docs/setup/cluster-blueprint-catalog).\n\nSwitch to the main working directory\n------------------------------------\n\nAfter you have installed the Cluster Toolkit, ensure that you switch to the\nmain working directory. \n\n```\ncd cluster-toolkit\n```\n\nDeploy the cluster\n------------------\n\nTo deploy the cluster, complete the following steps.\n\n1. If you might need to deploy the cluster multiple times for different\n purposes or with different configurations, create a\n [deployment file](/cluster-toolkit/docs/deploy/cluster-deployment-files).\n\n2. To deploy the cluster, run the `gcluster deploy` command. If you are using any of\n the [example cluster blueprints](/cluster-toolkit/docs/setup/cluster-blueprint-catalog)\n provided by Cluster Toolkit, you need to set the project ID by using either\n the `--vars` flag or `--deployment-file` (or `-d`) flag.\n\n - Using the `--vars` flag.\n\n ```\n ./gcluster deploy --vars project_id=PROJECT_ID PATH_TO_BLUEPRINT_FILE\n ```\n - Using the `--deployment-file` (or `-d`) flag.\n\n ```\n ./gcluster deploy -d PATH_TO_DEPLOYMENT_FILE PATH_TO_BLUEPRINT_FILE\n ```\n\n If the `--deployment-file` and `--vars` flags are used at the\n same time, then the variables specified with `--vars` take precedence.\n If the `--vars` flag is specified multiple times, then later invocations\n take precedence.\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n - \u003cvar translate=\"no\"\u003ePATH_TO_BLUEPRINT_FILE\u003c/var\u003e: the path to your cluster blueprint file. For example, if you are in the main working directory and want to use the [`hpc-slurm.yaml`](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/examples/hpc-slurm.yaml) blueprint, specify `examples/hpc-slurm.yaml`.\n - \u003cvar translate=\"no\"\u003ePATH_TO_DEPLOYMENT_FILE\u003c/var\u003e: the path to your deployment file.\n3. The `gcluster` command reports proposed changes for your cluster. To continue the\n deployment, accept the proposed changes by typing `a` and pressing\n **enter** . Optionally, you may review the proposed changes by typing\n `d` and pressing **enter**.\n\n ```\n Summary of proposed changes: Plan: 37 to add, 0 to change, 0 to destroy.\n (D)isplay full proposed changes,\n (A)pply proposed changes,\n (S)top and exit,\n (C)ontinue without applying\n Please select an option [d,a,s,c]:\n ```\n4. After accepting the changes, `gcluster` runs `terraform apply`\n automatically. This takes approximately 5 minutes while it displays\n progress. If the run is successful, the output is similar to the following:\n\n ```\n Apply complete! Resources: 37 added, 0 changed, 0 destroyed.\n ```\n\nYou are now ready to submit jobs to your cluster.\n\nGet help at the command line\n----------------------------\n\nFor a full list of flags that you can use, run the `--help` flag on\n`gcluster` or on any of the sub-commands. \n\n```\n./gcluster --help\n./gcluster deploy --help\n```"]]