Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

developmentfeature/docker-compose-tes: Add initial Docker Compose + TES support #10

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions README-docker-compose-tes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

## Steps to Install Funnel + MinIO with Docker Compose

### 1. Install Docker & Docker-Compose

Ensure you have **Docker** and **Docker-Compose** installed:

```sh
docker --version
docker-compose --version
```

### Step 3: Download the `docker-compose-tes.yaml` File

Ensure you have the `docker-compose-tes.yaml` file in your project directory.

### Step 4: Start the Funnel Services

Run:

```sh
docker-compose -f docker-compose-tes.yaml up -d
```

This starts the following containers:
- `funnel`: Funnel server.
- `minio`: MinIO server for S3 API.

### Step 5: Access the Funnel Web UI

http://localhost:8000

## 2. Managing Funnel with Docker-Compose

### Launch with Airflow

```sh
docker compose -f docker-compose.yaml -f docker-compose-tes.yaml up
```

### Check Expected Containers

```sh
docker compose -f docker-compose.yaml -f docker-compose-tes.yaml ps

NAME IMAGE SERVICE PORTS
tractor-airflow-scheduler-1 apache/airflow:2.10.4 airflow-scheduler 8080/tcp
tractor-airflow-triggerer-1 apache/airflow:2.10.4 airflow-triggerer 8080/tcp
tractor-airflow-webserver-1 apache/airflow:2.10.4 airflow-webserver 0.0.0.0:8080->8080/tcp
tractor-airflow-worker-1 apache/airflow:2.10.4 airflow-worker 8080/tcp
tractor-funnel-1 quay.io/ohsu-comp-bio/funnel:development funnel 0.0.0.0:8000->8000/tcp, 0.0.0.0:9090->9090/tcp
tractor-minio-1 minio/minio:latest minio 0.0.0.0:9000-9001->9000-9001/tcp
tractor-postgres-1 postgres:13 postgres 5432/tcp
tractor-redis-1 redis:7.2-bookworm redis 6379/tcp
```

### Check Connection with Funnel

```sh
docker compose exec airflow-webserver /bin/bash

(airflow) curl funnel:8000/service-info
{
"contactUrl": "https://ohsu-comp-bio.github.io/funnel/",
"createdAt": "2016-03-21T16:27:49-07:00",
"description": "Funnel is a toolkit for distributed task execution via a simple, standard API.",
...
}
```

### Check Connection with MinIO

```sh
docker compose exec airflow-webserver /bin/bash

curl -I minio:9000/minio/health/live
HTTP/1.1 200 OK
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding section on how to configure airflow connection to both funnel and minio.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — adding now!

31 changes: 31 additions & 0 deletions docker-compose-tes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
funnel:
image: quay.io/ohsu-comp-bio/funnel:development
command:
- server
- run
- --config
- /opt/funnel/config.yaml
depends_on:
- minio
ports:
- "8000:8000" # HTTP
- "9090:9090" # gRPC
volumes:
- ${FUNNEL_CONFIG:-/dev/null}:/opt/funnel/config.yaml

minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000" # S3 API
- "9001:9001" # MinIO Console
environment:
MINIO_ROOT_USER: "minioadmin"
MINIO_ROOT_PASSWORD: "minioadmin"
volumes:
- ./minio-data:/data

volumes:
minio-data: