Google Cloud Batch options
Set up the Google Cloud project and Cloud Storage bucket that a Google Cloud Batch compute environment needs, and configure the options beyond the required fields. For the required fields, see Create a Google Cloud Batch compute environment.
You need the following:
- A Google Cloud account. Sign up for a free account.
Google Cloud project
Seqera Platform integrates with Google Cloud through the Batch API.
Create a project
Go to the Google Project Selector page and select an existing project, or select Create project.
Enter a name for your new project, for example, tower-nf.
If you are part of an organization, the location defaults to your organization.
Enable billing
Enable billing in your Google Cloud account.
Enable APIs
Enable the following APIs for your project:
- Batch API
- Compute Engine API
- Cloud Storage API
Select your project from the drop-down and select Enable.
Alternatively, select your project in the navigation bar and enable each API manually from its page:
Cloud Storage bucket
Google Cloud Storage is a type of object storage. To access files and store the results for your pipelines, create a Cloud Storage bucket that your Seqera service account can access.
Create a Cloud Storage bucket
-
In the hamburger menu (≡), select Cloud Storage.
-
From the Buckets tab, select Create.
-
Enter a name for your bucket. You reference this name when you create the compute environment in Seqera Platform.
-
Select Region for the Location type and select the Location for your bucket. You reference this location when you create the compute environment in Seqera.
noteThe Batch API is available in a limited number of locations. These locations only store metadata about the pipeline operations. The storage bucket and compute resources can be in any region.
-
Select Standard for the default storage class.
-
To restrict public access to your bucket data, select the Enforce public access prevention on this bucket checkbox.
-
Under Access control, select Uniform.
-
Select any additional object data protection tools, per your organization's data protection requirements.
-
Select Create.
If you use Fusion, a cancelled task can leave temporary objects in the bucket. To clean them up automatically, add a lifecycle rule. See Leftover .part.chk and .group objects on Google Cloud Storage.
Assign bucket permissions
- After you create the bucket, the Bucket details page opens.
- Select Permissions, then Grant access under View by principals.
- Copy the email address of a service account into New principals.
- Select the roles that account needs on this bucket (see Service account permissions), then select Save.
- If you use separate credential and head job service accounts, repeat steps 2 to 4 for the other account.
Advanced options
Resource allocation and networking values in VM instance templates for the head or compute jobs (see step 9) override any conflicting values you specify when you create your Seqera compute environment.
-
Enable Use Private Address to ensure that your Google Cloud VMs are not accessible to the public internet.
noteThis option requires both a VPC and a Subnet. You cannot create the compute environment without them.
-
Use Boot disk size to set the persistent disk size for each task and the head job.
-
Use Boot Disk Image to select a specific boot disk image for the compute instances. The drop-down lists available images from the Google Cloud Compute API and supports autocomplete filtering. This field is optional. If you do not set it, Google Cloud Batch uses the default image.
-
Use Compute jobs machine types to select one or more default machine types for the compute jobs. The drop-down lists the machine types available in the selected location and supports autocomplete filtering. You can select specific machine types, or a machine family, such as
c2, to let Google Cloud Batch choose a type from that family. This field is optional. If you leave it empty, Nextflow determines the machine type from the resource requirements of each task.noteThe Compute jobs machine types field sets the default machine types at the compute environment level. To override them for individual processes, use the
machineTypeprocess directive in your Nextflow configuration, which accepts a comma-separated list of patterns (for example,c2-*,n1-standard-1,custom-2-4). -
Use Head job CPUs and Head job memory to specify the CPUs and memory for the head job. Set Head job memory in MiB, with a minimum of 3584 MiB. If you leave it empty, the head job gets 3584 MiB.
cautionThe default head job resource values are insufficient for production pipelines. The Nextflow head job is a Java virtual machine (JVM) process that tracks every submitted task, manages pipeline state, and polls the Google Cloud Batch API. If the head job runs out of memory mid-run, the pipeline fails. Tasks already running on worker VMs run to completion, but Nextflow schedules no new tasks. Output files that were already written are not cleaned up automatically. Results may be incomplete.
Size the head job based on the number of tasks in your pipeline:
Pipeline scale Tasks Recommended CPUs Recommended memory Small Up to 100 2 4 GB Medium 100–500 4 8 GB Large 500+ 8 16 GB Head job memory scales with the number of concurrent tasks and total pipeline duration. Long-running pipelines keep thousands of task records in memory for resumability, and need more memory than short pipelines with the same peak parallelism. Increase CPUs if task scheduling is slow or the head job logs show high garbage collection (GC) pressure.
For large pipelines, you can also increase the JVM heap directly by setting
NXF_JVM_ARGS="-Xms4g -Xmx12g"as a Head job environment variable (see Environment variables).noteIf you specify a Head job instance template (see step 9), the template's machine type overrides the Head job CPUs and Head job memory values set here.
-
Use Service account email to specify a service account email address other than the Compute Engine default to run pipelines with this compute environment. A custom service account is recommended for production environments. See Head job service account for the roles it needs.
-
Use VPC and Subnet to specify the name of a VPC network and subnet for this compute environment. You can apply network tags directly in the Network Tags field (see step 8) or through the VM instance templates for the Nextflow head and compute jobs.
noteYou must specify both a VPC and Subnet for your compute environment to use either.
-
Use Network Tags to apply Google Cloud network tags to the compute instances in this environment. Network tags control which firewall rules and routing policies apply to your instances within their VPC. Enter tags as free-text values. Tags must follow the Google Cloud format requirements. Each tag must contain only lowercase letters, numbers, and hyphens, and be between 1 and 63 characters long. You can add up to 64 tags per instance.
noteNetwork tags require a VPC and Subnet. This field is disabled when no VPC is set.
-
Use Head job instance template and Compute jobs instance template to specify a VM instance template for the head and compute jobs. Enter the name or fully-qualified reference of the template, without the
template://prefix. Use VM instance templates to define the resources allocated to Batch jobs. Configuration values in a VM instance template override any conflicting values you specify when you create your Seqera compute environment.cautionSeqera does not validate the VM instance template you specify in these fields. Generally, use templates that define only the machine type, network, disk, and configuration values that do not change across VM instances and Seqera compute environments. See Create instance templates to create your instance templates.
To prevent errors during a run, make sure the instance templates you use are configured for your needs and have an appropriate machine type. You can define multiple instance templates with different machine type sizes in your Nextflow configuration with the
machineTypeprocess directive (for example,process.machineType = 'template://my-template-name'). Use process selectors to assign a separate template to each of your processes.