Getting started

This page walks you through the setup steps required to use the Cloud Life Sciences API.

(If you've completed the Quickstart, you've already done some of these steps. Review this page to make sure you're ready to use the Cloud Life Sciences API).

Before you begin

  1. Sign in to your Google Account.

    If you don't already have one, sign up for a new account.

  2. In the Cloud Console, on the project selector page, select or create a Cloud project.

    Go to the project selector page

  3. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.

  4. Enable the Cloud Life Sciences API.

    Enable the API

When you first enable the Cloud Life Sciences API for a project, a new service account for the project is automatically assigned a role (lifesciences.workflowsRunner) that enables starting and stopping Compute Engine instances inside your project.

If you later remove this default role from the relevant project service account, you might encounter errors. In particular, attempts to run pipelines using the API will result in permission errors. The API will also be unable to shut down running instances when pipelines complete and you will continue to be billed for these resources. For details on how to fix this issue, see Troubleshooting.

Set up Cloud SDK and the gcloud command-line tool

Install Cloud SDK to use the tools and libraries in Cloud Life Sciences, Compute Engine, Cloud Storage, and BigQuery. The SDK includes the gcloud, gsutil, and bq command-line tools.

  1. Download and install Cloud SDK.

  2. Initialize Cloud SDK.

  3. After you've initialized the SDK, install the Cloud Life Sciences commands:

    gcloud components update beta
    

    If you're using a Compute Engine VM with the default installation of gcloud tool, you won't be able to update the components. To enable the Cloud Life Sciences API on a Compute Engine VM, reinstall gcloud command-line tool by running the following commands:

    sudo apt-get remove google-cloud-sdk
        curl https://sdk.cloud.google.com | bash
        exec -l $SHELL
        gcloud init
    

Download credentials for API access

If you are using a code sample from the Cloud Life Sciences GitHub repository or a tool other than gcloud command-line tool that accesses the Cloud Life Sciences API directly, complete the following steps to download a service account key file for your project.

  1. Sign in to your Google Account.

    If you don't already have one, sign up for a new account.

  2. In the Cloud Console, on the project selector page, select or create a Cloud project.

    Go to the project selector page

  3. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.

  4. Enable the Cloud Life Sciences and Cloud Storage JSON APIs.

    Enable the APIs

  5. Open the Credentials page in the API console.
  6. Click Create credentials > Service account.
  7. On the Service account details page, enter a service account name, and then click Create.
  8. On the Service account permissions page, select the role for the service account. For the broadest access to Cloud Life Sciences, select Cloud Life Sciences > Cloud Life Sciences Workflows Runner, and then click Continue.
  9. Optional: Fill out the Grant users access to this service account page.
  10. Click Done.

To download the service account key, complete the following steps:

  1. In the Cloud Console, go to the Service Accounts page.

    Go to the Service Accounts page

  2. Find the row of the service account that you want to create a key for. In that row, click the , and then click Create key.

  3. Select JSON for the Key type and click Create.

Clicking Create downloads a service account key file. Make sure to store this file securely, because it can be used to authenticate as your service account. You can move and rename this file however you would like.

What's next