Skip to main content

Create an Amazon EKS compute environment

Create an Amazon EKS compute environment on an existing EKS cluster. For everything you need in place first, see the checklist.

Prerequisites

You need the following:

caution

Your compute environment uses resources that you may be charged for in your AWS account. See Cloud costs for guidelines to manage cloud resources and prevent unexpected costs.

Create the compute environment​

  1. In the Seqera workspace where you want to set up the compute environment, select Compute Environments from the navigation menu, then select Add compute environment.

  2. Enter a descriptive name for this environment, for example, Amazon EKS (eu-west-1).

  3. Select Amazon EKS as the target platform.

  4. Under Storage, select either Fusion storage (recommended) or Legacy storage. With the Fusion v2 virtual distributed file system, you can access your AWS S3-hosted data (s3:// URLs) and do not need to configure a shared file system in your Kubernetes cluster. See Configure EKS service account IAM role for Fusion v2.

  5. From the Credentials drop-down, select your AWS credentials. To add credentials, see Amazon EKS credentials. The IAM role or user must have the IAM permissions required to describe and list EKS clusters.

  6. Select a Region, for example, eu-west-1 - Europe (Ireland). If you use Fusion v2, this region must match the location of the S3 bucket you plan to use as the work directory.

  7. Select a Cluster name from the list of available EKS clusters in the selected region.

  8. Specify the Namespace created in the cluster preparation instructions, tower-nf by default.

  9. Specify the Head service account created in the cluster preparation instructions, tower-launcher-sa by default.

    note

    If you enable Fusion v2 (Fusion storage in step 4), the head service account must have access to the S3 storage bucket specified as your work directory. To allow pods to interact with AWS, you must also specify a service account for compute jobs in Advanced options.

  10. Define the Work directory that Nextflow pipelines use as their working directory. If you use Fusion v2, this must be an S3 bucket (for example, s3://my-bucket/work-dir). If you use legacy storage, this must be the name of a persistent volume claim (PVC) created in the cluster preparation instructions, for example, tower-scratch.

  11. Apply Resource labels to the cloud resources produced by this compute environment. Workspace default resource labels are prefilled.

  12. Expand Staging options to include:

    • Optional pre- or post-run Bash scripts that run before or after the Nextflow pipeline run in your environment.
    • Global Nextflow configuration settings for all pipeline runs launched with this compute environment. Values defined here are prefilled in the Nextflow config file field in the pipeline launch form. You can override these values during pipeline launch. The following example configuration schedules the compute pods on specific nodes:
    k8s {
    pod = [
    [
    nodeSelector: 'myNodeSelector=my-nodes-for-k8s-as-compute'
    ],
    [
    toleration: [
    key: 'myNodeSelector',
    operator: 'Equal',
    value: 'my-nodes-for-k8s-as-compute',
    effect: 'NoSchedule'
    ]
    ]
    ]
    }
    info

    Configuration settings in this field override the same values in the pipeline repository nextflow.config file. See Nextflow config file for the configuration priority.

  13. Optional: Under Environment variables, add variables for the head job, the compute jobs, or both. See Environment variables.

  14. Optional: Configure the advanced options described in the next section.

  15. Select Add.

Advanced options​

Amazon EKS compute environments include advanced options for storage and work directory paths, resource allocation, and pod customization.

  • The Storage mount path is the file system path where Seqera mounts the Storage claim (default: /scratch).

  • The Work directory is the file system path that Nextflow pipelines use as a working directory. This must be the storage mount path (default) or a subdirectory of it.

  • The Compute service account is the service account that Nextflow uses to submit tasks (default: the default account in the given namespace).

    note

    If you enable Fusion v2 (Fusion storage in step 4 of the previous section), the compute service account must have access to the S3 storage bucket specified as your work directory. This can be the same service account that the head jobs use (tower-launcher-sa, created in the cluster preparation guide), or a separate service account with more granular permissions.

  • The Pod cleanup policy determines when Seqera deletes the run's Nextflow head pod. On success (the default) deletes it when the run succeeds, Always deletes it regardless of outcome, and Never keeps it. This policy does not delete task pods. See Kubernetes pods remain after a run ends.

  • Use Custom head pod specs to provide custom options for the Nextflow workflow pod, such as nodeSelector and affinity. For example:

spec:
nodeSelector:
disktype: ssd
  • Use Head job CPUs and Head job memory to specify the resource requirements of the Nextflow workflow pods. Head job memory is set in MiB, with a minimum of 3584 MiB. If you leave it empty, the pod has no memory request.

Next steps​

To run pipelines in your Amazon EKS compute environment, see Launch pipelines.