Pipeline resource optimization
Pipeline resource optimization takes the resource usage information from previous workflow runs to optimize subsequent runs.
The pipeline resource optimization service requires a separate database schema to store its internal data, but also requires access to the Seqera schema. The Seqera and optimization service schemas can coexist on the same database instance.
Docker Compose deployment
Docker Compose makes use of a separate container to set up the pipeline resource optimization service during initialization. Configuration steps differ for new and existing deployments.
New installation
To use the pipeline resource optimization service in a new Docker Compose installation of Seqera Enterprise, use the following steps:
-
To run the service from a custom URL, declare the URL with the
GROUNDSWELL_SERVER_URL
environment variable in thetower.env
file. A non-zero value for this environment variable activates the optimization service automatically, so theTOWER_ENABLE_GROUNDSWELL
variable does not need to be set when you declare a custom URL. -
Set the
TOWER_ENABLE_GROUNDSWELL
environment variable in thetower.env
file totrue
. This enables the service at the default service URL ofhttp://groundswell:8090
. -
In your docker-compose.yml file, uncomment the
groundswell
section at the bottom.- To create a schema for the optimization service on the same local MySQL container, uncomment the
init.sql
script in thevolumes
section.
- To create a schema for the optimization service on the same local MySQL container, uncomment the
-
Download the init.sql file. Store this file in the mount path of your
docker-compose.yml
file or update thesource: ./init.sql
line in yourdocker-compose.yml
with the file path. -
When the pipeline resource optimization service is active, pipelines that can be optimized display a lightbulb icon in your Launchpad. Any pipeline with at least one successful run can be optimized.
Existing installation
To use the pipeline resource optimization service in an existing Docker Compose installation of Seqera Enterprise, use the following steps:
-
To run the service from a custom URL, declare the URL with the
GROUNDSWELL_SERVER_URL
environment variable. A non-zero value for this environment variable activates the optimization service automatically, so theTOWER_ENABLE_GROUNDSWELL
variable does not need to be set when you declare a custom URL. -
Set the
TOWER_ENABLE_GROUNDSWELL
environment variable totrue
. This enables the service at the default service URLhttp://groundswell:8090
. -
In your docker-compose.yml file, uncomment the
groundswell
section at the bottom. If you use adocker-compose.yml
file older than version 23.3, download a newer version of the file to extract thegroundswell
section. -
Log in to your database server and run the following commands:
CREATE DATABASE IF NOT EXISTS `swell`;
CREATE USER 'swell'@'%' IDENTIFIED BY 'swell';
GRANT ALL PRIVILEGES ON *.* TO 'swell'@'%';
FLUSH PRIVILEGES; -
If you use Amazon RDS or other managed database services, run the following commands in your database instance:
CREATE DATABASE IF NOT EXISTS `swell`;
CREATE USER 'swell'@'%' IDENTIFIED BY 'swell';
GRANT ALL PRIVILEGES ON `%`.* TO 'swell'@'%';
FLUSH PRIVILEGES; -
Download the groundswell.env file. Store this file in the mount path of your
docker-compose.yml
file. Update theTOWER_DB_URL
andSWELL_DB_URL
environment variable values:# Uncomment for container DB instances
# TOWER_DB_URL=mysql://db:3306/tower
# SWELL_DB_URL=mysql://db:3306/swell
# Uncomment for managed DB instances (Example URL shows an Amazon RDS instance URL)
# TOWER_DB_URL=mysql://db1.abcdefghijkl.us-east-1.rds.amazonaws.com:3306/tower
# SWELL_DB_URL=mysql://db1.abcdefghijkl.us-east-1.rds.amazonaws.com:3306/swell -
When the pipeline resource optimization service is active, pipelines that can be optimized display a lightbulb icon in your Launchpad. Any pipeline with at least one successful run can be optimized.
Kubernetes deployment
Kubernetes deployments use an initContainer that runs during pod initialization to set up the pipeline resource optimization service. To use the service in new or existing Kubernetes installations of Seqera Enterprise, do the following:
-
Download the groundswell manifest.
-
Define a set of credentials for the optimization database. This can be the same database used for Seqera, but in a different schema.
-
Log in to your database server and run the following commands:
CREATE DATABASE IF NOT EXISTS `swell`;
CREATE USER 'swell'@'%' IDENTIFIED BY 'swell';
GRANT ALL PRIVILEGES ON *.* TO 'swell'@'%';
FLUSH PRIVILEGES; -
If you use Amazon RDS or other managed database services, run the following commands in your database instance:
CREATE DATABASE IF NOT EXISTS `swell`;
CREATE USER 'swell'@'%' IDENTIFIED BY 'swell';
GRANT ALL PRIVILEGES ON `%`.* TO 'swell'@'%';
FLUSH PRIVILEGES; -
The initContainers process will wait until both the Seqera and pipeline resource optimization service databases are ready before starting the migration in the Seqera database and finally starting the optimization container.
-
When the pipeline resource optimization service is active, pipelines that can be optimized display a lightbulb icon in your Launchpad. Any pipeline with at least one successful run can be optimized.