Skip to main content

Run Anyscale with a Specific GCP Service Account

This page describes how to run a Ray cluster on Anyscale with your existing GCP service account. For help on how to create a Service Account, check out this guide.

Configure an Existing GCP Service Account

  1. Navigate to the GCP Service Account page and click "Select a Project".

    Click the 'Select Project' button

  2. Select the project that contains the Service Account. The Project ID is found in the Service Account email. The format for Service Account emails is:

    Select Project

  3. Select the Service Account you want to use.

    Select Service Account

  4. Go to the Permissions Tab on the top of the page.

    Select Permissions Tab

  1. Click the "Grant Access" button.

    Select Grant Access

  1. In the "New Principals" box, type your cloud-specific service account. This cloud specific-service account should look like <cloud_id>@<bridge_project_id> and directions for finding it can be found here.

    Type in cloud-specific service account into New Principals

  1. In the "Role" box, search for “Service Account Token Creator” and select it.

    Add Service Account Token Creator Role

  1. Click "Save".


Configure Anyscale Clusters

This section walks through configuring clusters to launch with this Service Account. In this step you will use the Service Account email from above.

  1. Create a new cluster compute (here). Select the cloud tied to the cloud-specific service account from Step 6 above.

Select Cloud by NameSelect the Cloud that matches the ID you used for your Trust Relationship

  1. Expand the "Advanced configuration" box.

    New compute config PageAdvanced Configuration Field

  2. In the "Advanced Configuration" field, paste the following JSON, replacing SERVICE_ACCOUNT_EMAIL with the actual email.

"serviceAccount": {"email": "SERVICE_ACCOUNT_EMAIL"}
  1. Add a name for your cluster compute & press save. If you want to customize other parameters such as node configurations, do so at this time.

    Naming your compute configCreated compute config

  2. Ensure that you use this compute config when you launch clusters!