To use Cloud HPC Toolkit, you need a Google Cloud project. In your project, you need to enable APIs, permissions, and grant credentials to Terraform. You also need to clone and build the Cloud HPC Toolkit repository.
The following steps can be completed from Cloud Shell or a workstation that is running a Linux or macOS. If you are using a Linux or macOS workstation, ensure that you have installed the dependencies.
To configure your environment, you need to complete the following steps:
- Enable APIs
- Set the default project
- Ensure that the default Compute Engine service account is enabled
- Grant user access credentials to Terraform
- Clone the Cloud HPC Toolkit GitHub repository
- Build the Cloud HPC Toolkit binary
To enable the APIs, you can use either Google Cloud console, or the Google Cloud CLI.
Enable the following APIs:
Enable the following APIs:
- Enable the Compute Engine API:
gcloud services enable compute.googleapis.com
- Enable the Filestore API:
gcloud services enable file.googleapis.com
- Enable the Cloud Runtime Configuration API:
gcloud services enable runtimeconfig.googleapis.com
Set a default project
To set a default project, run the following command:
PROJECT_ID with your project ID.
gcloud config set project PROJECT_ID
Ensure that the default Compute Engine service account is enabled
Cloud HPC Toolkit requires that the default Compute Engine service account
is enabled in your project and that the
roles/editor IAM role is enabled on the
service account. This is the default setting that is set up by Google Cloud
However, if you had disabled the default Compute Engine service account and
roles/editor IAM role in your project, complete the following steps to
enable these settings:
Enable the default Compute Engine service account.
gcloud iam service-accounts enable \ --project PROJECT_ID \ PROJECT_NUMBERemail@example.com
roles/editorIAM role to the service account.
gcloud projects add-iam-policy-binding PROJECT_ID \ --member=serviceAccount:PROJECT_NUMBERfirstname.lastname@example.org \ --role=roles/editor
Replace the following:
PROJECT_ID: your project ID
PROJECT_NUMBER: the automatically generated unique identifier for your project
For more information, see Identifying projects.
Grant user access credentials to Terraform
To generate cloud credentials associated with your Google Cloud account, run the following command:
gcloud auth application-default login
This grants the Application Default Credentials (ADC) to Terraform.
Clone the Cloud HPC Toolkit GitHub repository
Clone the GitHub repository:
git clone https://github.com/GoogleCloudPlatform/hpc-toolkit.git
Go to the main working directory:
Build the Cloud HPC Toolkit binary
To build the Cloud HPC Toolkit binary from source, run the following command:
To verify the build, run the following command: