Skip to main content

Create a Google Cloud Batch compute environment

Create a Google Cloud Batch compute environment in your Google Cloud project. For everything you need in place first, see the checklist.

Intelligent Compute offers a better, more efficient experience for running pipelines. It is in private preview. To learn more, contact Seqera. See Intelligent Compute on Google Cloud.

Prerequisites

You need the following:

caution

Google Cloud may charge your account for the resources that your Seqera compute environment uses. See Cloud costs for guidelines to manage cloud resources and prevent unexpected costs.

Create the compute environment​

  1. In a workspace, select Compute Environments, then select Add compute environment.
  2. Enter a descriptive name for this environment, for example, Google Cloud Batch (europe-north1).
  3. Select Google Cloud Batch as the target platform.

Credentials​

From the Credentials drop-down, select your Google credentials. To add credentials, see Google Cloud Batch credentials.

Location and work directory​

Select the Location where your pipelines run. See available regions and zones.

In the Work directory field, enter your storage bucket URL, for example, gs://my-bucket. This bucket must be accessible in the location you selected.

note

When you specify a Cloud Storage bucket as your work directory, this bucket stores the Nextflow cloud cache by default. To use a different cache location, specify it in the Nextflow config file field on the pipeline launch form.

To share task results across runs, turn on Nextflow global cache below the Work directory field and enter a Global cache location. To choose the location, see Nextflow global cache.

Wave and Fusion​

  • Select Wave containers to access private container repositories and provision containers in your pipelines with the Wave containers service. See Wave containers.
  • Select Fusion to allow access to your Google Cloud Storage data via the Fusion v2 virtual distributed file system. This speeds up most data operations. The Fusion v2 file system requires Wave containers to be enabled. See Fusion file system for configuration details.
note

The compute recommendations below are based on internal benchmarking performed by Seqera. Benchmark runs of nf-core/rnaseq used profile test_full, consisting of an input dataset with 16 FASTQ files and a total size of approximately 123.5 GB.

  1. Use Seqera Platform version 23.1 or later.
  2. Use a Google Cloud Storage bucket as the work directory.
  3. Enable Wave containers and Fusion v2.
  4. Specify suitable virtual machine types and local storage settings, or accept the default machine settings listed below. An n2-highmem-16-lssd VM or larger is recommended for production use.
note

To specify virtual machine settings in Platform during compute environment creation, use the Global Nextflow config field to apply custom Nextflow process directives to all pipeline runs launched with this compute environment.

To specify virtual machine settings per pipeline run in Platform, or as a persistent configuration in your Nextflow pipeline repository, use Nextflow process directives. See Google Cloud Batch process definition for more information.

When you enable Fusion v2, the following virtual machine settings apply:

  • Unless you specify an instance template, Nextflow requests a 375 GB scratch disk for all compute jobs. Families that support local SSDs use local-ssd. Other families use a persistent disk or Hyperdisk volume.
  • If you do not specify a machine type, a VM from families that support local SSDs is selected.
  • Local SSDs are only offered in multiples of 375 GB. Increment the scratch disk per process with the disk directive, for example disk = [request: 750.GB, type: 'local-ssd']. Without the type option, disk sets the boot disk size instead. To work with files larger than 100 GB, use at least two local SSDs (750 GB or more).
  • Fusion v2 can also use persistent disks for caching. See Scratch disk to choose a disk type.
  • Instance templates override the disk directive. To use Fusion with an instance template, the template must include a local-ssd disk named fusion with 375 GB.
  • Use the machineType directive to specify a VM instance type, family, or custom machine type in a comma-separated list of patterns. For example, c2-*, n1-standard-1, custom-2-4, n*, m?-standard-*.
note

Wave containers and Fusion v2 are recommended features for added capability and improved performance, but neither are required to execute workflows in your compute environment.

Spot instances and resource labels​

Enable Spot to use Spot instances, which cost less than On-Demand instances.

From Nextflow version 24.10, the default Spot reclamation retry setting is 0 on AWS and Google Cloud. By default, no internal retries are attempted on these platforms. A Spot reclamation now causes an immediate failure. Nextflow receives this failure in the same way as other generic failures (for example, exit code 1 on AWS). Nextflow treats these failures like any other job failure unless you configure a retry strategy. See Spot instance failures and retries.

info

When Google Cloud reclaims a Spot instance, Seqera Platform displays a human-readable description in the task details. Google Cloud Batch reserves exit codes in the 50001–59999 range for infrastructure events:

Exit codeDescription
50001Spot instance was reclaimed by Google Cloud
50002VM became unresponsive (host event or crash)
50003VM unexpectedly rebooted during task execution
50004Task reached unresponsive time limit and could not be cancelled
50005Task exceeded maximum allowed runtime

For exit codes 50006–59999, Seqera Platform displays a generic infrastructure failure message. Seqera Platform displays standard application exit codes (1–255) as before.

Apply Resource labels to the cloud resources that this compute environment consumes. Workspace default resource labels are prefilled.

Scripting and environment variables​

Optional: Expand Staging options and Environment variables to add pre- and post-run scripts, Nextflow configuration, or environment variables. See Common compute environment options.

Advanced options​

Optional: Configure advanced options. See Advanced options.

Select Add to create the compute environment.

Pre-flight checks​

Pre-flight checks confirm that a compute environment is usable before you launch a pipeline. Seqera runs them at three points:

  • When you create the compute environment: Seqera rejects the request if the selected credentials are INVALID or have been deleted.
  • On a recurring schedule: Seqera re-checks the compute environment. If its credentials are INVALID, Seqera marks the compute environment INVALID and shows a banner with the error message.
  • Each time you launch a pipeline: Seqera blocks the launch if the compute environment or its credentials are INVALID, or if Wave is enabled and the Wave service connection is not active.

To clear an INVALID status, fix the cause, then open the ⋮ menu of the compute environment and select Validate. If the credentials are also INVALID, validate the credentials first.

A brief Wave reconnection does not block a launch. If the Wave connection stays down, Seqera blocks the launch but does not mark the compute environment INVALID. See Wave service connection is not active.

See Pre-flight checks for how Seqera validates credentials and compute environments, and Pre-flight checks troubleshooting for error messages.

Next steps​

To run pipelines in your Google Cloud Batch compute environment, see Launch pipelines.