Skip to content

Commit

Permalink
docs: update README with seqerakit instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Nov 24, 2023
1 parent e1c66c4 commit c635681
Showing 1 changed file with 47 additions and 6 deletions.
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,67 @@

## Infrastructure as code

### Using Seqera Platform CLI

Most [Nextflow Tower](https://cloud.tower.nf/) entities such as Pipelines, Compute Environments and Datasets can be exported in JSON format via the [Nextflow Tower CLI](https://github.com/seqeralabs/tower-cli#nextflow-tower-cli). This is very useful for creating infrastructure as code to store the exact configuration options used to create these entities, and to share and track changes over time.

This repository contains JSON representation of the Nextflow Tower entitites that were used to create the `seqeralabs/showcase` Workspace:
This repository contains JSON representation of the Nextflow Tower entitites generated by the Tower CLI that were used to create the `seqeralabs/showcase` Workspace:

- [Compute Environments](compute-envs)
- [Pipelines](pipelines)
- [Datasets](datasets)

## Scripts
#### Scripts

The bash scripts required to programatically import and export these entities into Tower via the Tower CLI have also been provided in the [`scripts`](scripts) directory.
The bash scripts required to programatically import and export these entities from Tower via the Tower CLI have also been provided in the [`scripts`](scripts) directory.

See Tower CLI [usage docs](https://github.com/seqeralabs/tower-cli/blob/master/USAGE.md#usage-examples) for more examples.

### Prerequisites
#### Prerequisites

1. [Nextflow Tower CLI](https://github.com/seqeralabs/tower-cli#1-installation)
2. [`jq`](https://stedolan.github.io/jq/)

### Assumptions
#### Assumptions

- Tower CLI has been installed and `tw info` has been configured
- `TOWER_API_ENDPOINT` and `TOWER_ACCESS_TOKEN` have been injected into the executing environment
- Credentials have already been set-up in Tower
- Credentials have already been set-up in Tower

### Using `seqerakit`

The [Nextflow Tower](https://https://seqera.io/platform/) entities represented above in JSON can also be represented as YAML configuration files. These configuration YAMLs can be used by `seqerakit`, a Python package wrapping the Seqera Platform CLI, to define and automate how entities should be created.

This repository also contains YAML configuration files defining creation of Seqera Platform entities on the `seqeralabs/showcase` Workspace with `seqerakit`:

- [Compute Environments](seqerakit/compute-envs/)
- [Pipelines](seqerakit/pipelines/)
- [Datasets](seqerakit/datasets/)

#### Prerequisites

To use `seqerakit`, you will need to have the [Seqera Platform CLI](https://github.com/seqeralabs/tower-cli#1-installation) installed, in addition to the package installed via `pip install seqerakit` or `conda install seqerakit`. Please refer to the package's [installation guide](docs/installation.md) for more details on the required dependencies.

#### Running `seqerakit`

Similar to executing the scripts above to import the entities defined in the JSONs files to Seqera Platform, the [YAML files](#using-seqerakit) provided in this repository can be used create `seqeralabs/showcase` entities on the Platform. For example:

To add the compute environments:

```bash
seqerakit seqerakit/compute-envs/*
```

To add the datasets:

```bash
seqerakit seqerakit/datasets/*
```

To add the pipelines:

```bash
seqerakit seqerakit/pipelines/*
```

See the [seqerakit documentation](https://github.com/seqeralabs/seqera-kit#-seqerakit) for more usage examples and options for running `seqerakit`.

0 comments on commit c635681

Please sign in to comment.