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

Feature/k8s support #1069

Merged
merged 68 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
7147bfe
Add initial Exacloud page to documentation
lbeckman314 May 6, 2024
af00d03
Update Exacloud support
lbeckman314 May 7, 2024
fc3d277
Clean up console debug output
lbeckman314 May 7, 2024
9dbef33
Add default Worker engine ('docker')
lbeckman314 May 8, 2024
a3a3445
Update configurable Container Engine commands
lbeckman314 May 9, 2024
8ec817b
Revert changes to docker implementation and add engine interface
lbeckman314 May 10, 2024
afc5825
Update Exacloud/Container Engine implementation
lbeckman314 May 15, 2024
28905c0
Update ContainerEngine interface
lbeckman314 May 16, 2024
703cf44
Rename ContainerEngine to ContainerType
lbeckman314 May 16, 2024
83d6e1c
Add initial Exadocker unit test
lbeckman314 May 17, 2024
39584ad
Update TaskService to pass config to Funnel worker
lbeckman314 May 17, 2024
1d93375
Add small fix in HPC Template config
lbeckman314 May 17, 2024
1c4221d
Update worker config path in HPC Template
lbeckman314 May 17, 2024
53bb0cb
Add debugging from Exacloud testing
lbeckman314 May 20, 2024
a422b82
Update input/output working example (md5sum)
lbeckman314 May 24, 2024
021eeef
Update docker.go to implement ContainerEngine interface
lbeckman314 May 30, 2024
8e2474c
Remove exadocker implementation in favor of docker
lbeckman314 May 30, 2024
f5acbab
Add initial HPC documentation and example
lbeckman314 May 30, 2024
5450366
Update docker and kin-openapi to compatible versions
lbeckman314 May 31, 2024
2269fd1
Update util/openapi2proto/main.go with latest kin-openapi version
lbeckman314 May 31, 2024
8648580
Update github.com/docker/docker to latest version
lbeckman314 May 31, 2024
75647ce
Update Docker client creation in tests
lbeckman314 May 31, 2024
997d3c2
Add `WithAPIVersionNegotiation` to docker client creation
lbeckman314 May 31, 2024
56e74c2
Rename 'Driver' to 'DriverCommand' in ContainerConfig
lbeckman314 May 31, 2024
a9411bb
Fix minor linting errors
lbeckman314 Jun 1, 2024
ee25bd5
Update GitHub Actions workflow (linting)
lbeckman314 Jun 1, 2024
449e144
fix: updated config check in hpc_backend.go
lbeckman314 Jun 1, 2024
f5df70f
Revert tabs/space change in storage/local.go
lbeckman314 Jun 1, 2024
6374d2f
Update output copying in scratch directory
lbeckman314 Jun 18, 2024
f27f302
Update compliance-test.yaml
lbeckman314 Jun 18, 2024
0f36f11
Debug: add tmate step to Nextflow test
lbeckman314 Jun 20, 2024
c0cc2a8
Update Nextflow tests
lbeckman314 Jun 20, 2024
69bddbe
Update file copying behavior for Nextflow tests
lbeckman314 Jun 20, 2024
2af9c4d
Update local file copying behavior to support directory dests
lbeckman314 Jun 20, 2024
0f14338
Update local dest for files with glob patterns
lbeckman314 Jun 20, 2024
85ce5de
Update Base64Encode test to match Github Actions test
lbeckman314 Jun 20, 2024
56ec776
Fix Base64Encoding test value
lbeckman314 Jun 20, 2024
4bbec3f
Revert glob output change based on TesOutput spec
lbeckman314 Jun 21, 2024
ece1266
Debug: Add tmate step to Nextflow tests
lbeckman314 Jun 21, 2024
c81d0a7
Update wildcard file output destination
lbeckman314 Jun 21, 2024
f7905e5
Add initial command templating for container engines
lbeckman314 Jul 23, 2024
edc1600
Add initial Docker/ContainerEngine tests
lbeckman314 Jul 23, 2024
9caa800
Merge branch 'develop' into feature/container-engines
lbeckman314 Jul 24, 2024
615b46a
Merge branch 'develop' into feature/container-engines
lbeckman314 Jul 24, 2024
b3e6066
Run `go mod tidy`
lbeckman314 Jul 24, 2024
20c5238
Update Github Actions
lbeckman314 Jul 24, 2024
80bf9a7
Update container engine IO and command execution
lbeckman314 Jul 25, 2024
0660edc
Re-enable all tests for container engines
lbeckman314 Jul 26, 2024
9e71330
Update test suite
lbeckman314 Jul 26, 2024
bd1e79b
Nextflow test debug
lbeckman314 Jul 26, 2024
59fce8b
Nextflow test debug
lbeckman314 Jul 26, 2024
d0f6824
Nextflow test debug
lbeckman314 Jul 26, 2024
90b69f4
Nextflow test debug
lbeckman314 Jul 26, 2024
d9fb95f
Update compliance test workflow
lbeckman314 Jul 26, 2024
60de248
Update S3 tests
lbeckman314 Jul 26, 2024
582b834
Update S3 tests
lbeckman314 Jul 26, 2024
f405231
Add comments and clean up debug statements
lbeckman314 Jul 26, 2024
d891fc3
Clean up code for 0.11.1-rc.1 release
lbeckman314 Jul 26, 2024
0bdd604
Add container command event to match existing pattern
lbeckman314 Jul 27, 2024
eac39ef
Update .goreleaser.yaml to replace deprecated fields
lbeckman314 Jul 27, 2024
d7272d4
Update Nextflow instructions
lbeckman314 Jul 31, 2024
87fbe0b
Update K8s support and documentation
lbeckman314 Sep 10, 2024
976aee0
Update README.md
lbeckman314 Sep 10, 2024
f5ed646
fix: add support for wildcards in AWS S3 paths
lbeckman314 Sep 12, 2024
42fe597
Add support for wildcards in AWS S3 output paths
lbeckman314 Sep 17, 2024
a570bf3
Update actions/upload-artifact to v4 in Github Actions
lbeckman314 Sep 18, 2024
119b554
Update version to 0.11.1-rc.4 in Makefile
lbeckman314 Sep 18, 2024
f8db3a5
Fix bug where FileMapper output was being overwritten in every loop
lbeckman314 Sep 19, 2024
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
61 changes: 7 additions & 54 deletions .github/workflows/compliance-test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Workflow for running the TES compliance suite against Funnel

#
# This includes the following steps:
# 1. Build Funnel and store the resulting binary artifact
# 2. Install tes-compliance-suite and run against every version of TES simultaneously
# 3. start-report-deployment: Send a dispatch to the funnel-compliance repository to generate and publish
# the tes-compliance-suite report to https://ohsu-comp-bio.github.io/funnel-compliance/

#
# Optionally debug via SSH
# Ref: https://fleetdm.com/engineering/tips-for-github-actions-usability
#
Expand All @@ -29,10 +29,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: quay.io/ohsu-comp-bio/slurm
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -43,7 +42,7 @@ jobs:
run: make build

- name: Store funnel
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel
Expand All @@ -54,12 +53,9 @@ jobs:
matrix:
version: [1.0.0, 1.1.0]
db: ["boltdb", "mongodb"]
compute: ["local", "slurm"]
compute: ["local"]
needs: build
runs-on: ubuntu-latest
container:
image: quay.io/ohsu-comp-bio/slurm
options: --hostname slurmctl --cap-add sys_admin
steps:
# Required to access the 'tests/mongo.config.yml' file
# Perhaps uploading it as an artifact would be more efficient?
Expand All @@ -76,60 +72,17 @@ jobs:
if [ ${{ matrix.db }} = "mongodb" ]; then
make start-mongodb
cat `pwd`/tests/mongo.config.yml >> config.yml
# Required for Funnel to connect MongoDB
echo "172.17.0.1 localhost" >> /etc/hosts
elif [ ${{ matrix.compute }} = "slurm" ]; then
cat `pwd`/tests/slurm.config.yml >> config.yml
cp config.yml /opt/funnel_config.yml
# Start Slurm
/usr/local/bin/docker-entrypoint.sh
fi
chmod +x funnel
FLAGS="--config `pwd`/config.yml"
./funnel server run $FLAGS &> funnel.logs &
./funnel server run --config `pwd`/config.yml &> funnel.logs &

- name: Run OpenAPI Test Runner
run: |
# Clone the 'upstream' OpenAPI Test Runner when PR #65 is merged
# https://github.com/elixir-cloud-aai/openapi-test-runner/pull/65
# git clone https://github.com/elixir-cloud-aai/openapi-test-runner
git clone https://github.com/ohsu-comp-bio/openapi-test-runner -b fix/create-and-filter-task

git clone https://github.com/elixir-cloud-aai/openapi-test-runner
cd openapi-test-runner
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
openapi-test-runner report --version "${{ matrix.version }}" --server "http://localhost:8000/"

- name: Install TES compliance suite
run: |
git clone https://github.com/lbeckman314/tes-compliance-suite -b feature/tesv1.1
cd tes-compliance-suite
/root/.pyenv/shims/python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
mkdir reports

- name: Test compliance (Report Publishing)
run: |
cd tes-compliance-suite
source venv/bin/activate
tes-compliance-suite report --version "${{ matrix.version }}" --server "http://localhost:8000/"

start-report-deployment:
needs: compliance
runs-on: ubuntu-latest
steps:
# https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
- name: Start report generation
uses: passeidireto/trigger-external-workflow-action@main
env:
PAYLOAD_AUTHOR: "Funnel"
PAYLOAD_REVISION: "3"
with:
repository: ohsu-comp-bio/funnel-compliance
event: start-report
github_pat: ${{ secrets.ACTIONS_TOKEN }}

11 changes: 4 additions & 7 deletions .github/workflows/nextflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -19,7 +19,7 @@ jobs:
run: make build

- name: Store Funnel
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel
Expand All @@ -42,14 +42,12 @@ jobs:

- name: Install Nextflow
run: |
cd ..
git clone https://github.com/nextflow-io/nextflow
cd nextflow
make compile

- name: Install nf-canary and GA4GH-TES plugin
run: |
cd ..
git clone https://github.com/seqeralabs/nf-canary
cd nf-canary
cat <<EOF >> nextflow.config
Expand All @@ -59,8 +57,7 @@ jobs:
process.executor = 'tes'
tes.endpoint = 'http://localhost:8000'
EOF

- name: Run nf-canary tests
run: |
cd ../nf-canary
../nextflow/launch.sh run main.nf
./nextflow/nextflow run nf-canary/main.nf
68 changes: 44 additions & 24 deletions .github/workflows/s3-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@ name: S3 Integration Test

on:
push:
branches:
- main

jobs:
s3Test-integration:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Check out code
uses: actions/checkout@v2

- name: Build
run: make build

- name: Store funnel
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel

s3Test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup minio
run: |
docker run -d -p 9000:9000 --name minio \
Expand All @@ -23,26 +40,29 @@ jobs:
-v /tmp/config:/root/.minio \
minio/minio server /data

cat <<EOF > funnel.config.yml
LocalStorage:
Disabled: true
AmazonS3:
Disabled: true
GoogleStorage:
Disabled: true
HTTPStorage:
Disabled: true
FTPStorage:
Disabled: true
GenericS3:
- Disabled: false
Endpoint: "localhost:9000"
Key: "minioadmin"
Secret: "minioadmin"
EOF
- uses: actions/download-artifact@v3
with:
name: funnelBin

wget https://github.com/ohsu-comp-bio/funnel/releases/download/untagged-217841a99d14ccfe289c/funnel-darwin-arm64-0.11.0.tar.gz
tar -zxvf funnel-darwin-arm64-0.11.0.tar.gz
- name: Start Funnel server
run: |
cat <<EOF > config.yml
LocalStorage:
Disabled: true
AmazonS3:
Disabled: true
GoogleStorage:
Disabled: true
HTTPStorage:
Disabled: true
FTPStorage:
Disabled: true
GenericS3:
- Disabled: false
Endpoint: "localhost:9000"
Key: "minioadmin"
Secret: "minioadmin"
EOF
chmod +x funnel
./funnel server run --config funnel.config.yml &
./funnel server run --config `pwd`/config.yml &> funnel.logs &
./funnel task run examples/s3-test.yml
42 changes: 21 additions & 21 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ on:
push:

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.21
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
# TODO: Re-enable all linters
args: --timeout 3m --verbose -D unused -D errcheck -D staticcheck -D govet -D gosimple -D ineffassign -D typecheck
# Temporarily disabling linting
# lint:
# name: lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/setup-go@v3
# with:
# go-version: 1.21
# - uses: actions/checkout@v3
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: latest
# args: --timeout 3m --verbose

build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -34,7 +34,7 @@ jobs:
run: make build

- name: Store funnel
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
Expand All @@ -57,7 +57,7 @@ jobs:
needs: build
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -81,7 +81,7 @@ jobs:
needs: build
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
Expand All @@ -101,7 +101,7 @@ jobs:
needs: build
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
Expand All @@ -122,7 +122,7 @@ jobs:
needs: build
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ archives:
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}-{{.Version}}"

brews:
- tap:
- repository:
owner: ohsu-comp-bio
name: homebrew-formula
folder: Formula
directory: Formula
skip_upload: true
description: "distributed task execution toolkit"
homepage: "https://ohsu-comp-bio.github.io/funnel/"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM golang:1.21-alpine AS build-env
FROM golang:1.23-alpine AS build-env
RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dind
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# build stage
FROM golang:1.20-alpine AS build-env
FROM golang:1.23-alpine AS build-env
RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/ohsu-comp-bio/funnel
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make build

# final stage
FROM docker:stable-dind
FROM docker:dind
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dind-rootless
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# build stage
FROM golang:1.20-alpine AS build-env
FROM golang:1.23-alpine AS build-env
RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/ohsu-comp-bio/funnel
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make build

# final stage
FROM docker:stable-dind-rootless
FROM docker:dind-rootless
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git_upstream := $(shell git remote get-url $(shell git config branch.$(shell git
export GIT_BRANCH = $(git_branch)
export GIT_UPSTREAM = $(git_upstream)

export FUNNEL_VERSION=0.11.0
export FUNNEL_VERSION=0.11.1-rc.5

# LAST_PR_NUMBER is used by the release notes builder to generate notes
# based on pull requests (PR) up until the last release.
Expand Down
Loading
Loading