Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5f53d8b
Update README.md
michael-conway Jun 27, 2025
862c92e
more readme docs
michael-conway Jul 1, 2025
896e659
more readme
michael-conway Jul 1, 2025
391d689
added some troubleshooting tips
michael-conway Jul 2, 2025
a9612b6
addl docs
michael-conway Jul 22, 2025
3b48c19
save mongodb nodeport chart
michael-conway Jul 23, 2025
e158e64
image pull always for airflow
michael-conway Aug 5, 2025
29de752
try to get to 3.1 airflow
michael-conway Aug 6, 2025
c0be5ff
1.18 migration
michael-conway Aug 6, 2025
5906d82
upgrade to 3.0.2 airflow
michael-conway Aug 6, 2025
8f454e6
upgrades to 3.0.2
michael-conway Aug 6, 2025
2301076
update chart
michael-conway Nov 13, 2025
701e3b0
added info on mongo connections strings
michael-conway Nov 24, 2025
f249620
add ref tag to docker image #5
michael-conway Nov 25, 2025
8a39a5b
add ref tag to docker image #5
michael-conway Nov 25, 2025
a8f7a9c
add ref tag to docker image #5
michael-conway Nov 25, 2025
517182e
add ref tag to docker image #5
michael-conway Nov 25, 2025
1a400b7
Merge pull request #6 from NIEHS/5-dataverse-dag
michael-conway Nov 25, 2025
28b3c66
merged in latest mongo and updated comments
michael-conway Nov 25, 2025
672696d
update requirements for develop
michael-conway Dec 1, 2025
55b24d9
update mongo and correct services for mongo
michael-conway Dec 3, 2025
46d2af7
independent postgres
michael-conway Dec 10, 2025
fa556ac
add pvcs and pvs
michael-conway Jan 30, 2026
c8fe49a
fix pvcs and add ssh tunnel instructions for mongo
michael-conway Jan 30, 2026
5604d0a
add nih cert to docker image
michael-conway Feb 10, 2026
b197281
add pem to certifi
michael-conway Feb 10, 2026
c114d61
add pem to certifi
michael-conway Feb 11, 2026
ee8f5f7
revise cert for litellm
michael-conway Feb 11, 2026
5ffa0df
env var for certs
michael-conway Feb 11, 2026
51739f7
env var for certs
michael-conway Feb 12, 2026
b2e6fb5
env var for certs
michael-conway Feb 12, 2026
5de3c55
env var for certs
michael-conway Feb 12, 2026
08710f5
env var for certs
michael-conway Feb 12, 2026
b8c5a7e
toxpipe certs
michael-conway Feb 12, 2026
2404813
toxpipe cert issues
michael-conway Feb 12, 2026
8fee57c
toxpipe cert issues
michael-conway Feb 12, 2026
14b9c55
update proper certs
michael-conway Feb 12, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "develop" ]
branches: [ "main", "develop", "5-dataverse-dag" ]
pull_request:
branches: [ "main" ]

Expand Down Expand Up @@ -42,9 +42,9 @@ jobs:
uses: actions/checkout@v4

- name: Build the Docker image
run: docker build ./accelerator/accel-worker-image -t ghcr.io/niehs/accel-airflow:latest
run: docker build ./accelerator/accel-worker-image -t ghcr.io/niehs/accel-airflow:${{ github.ref_name }}

- name: publish
run: docker push ghcr.io/niehs/accel-airflow:latest
run: docker push ghcr.io/niehs/accel-airflow:${{ github.ref_name }}


173 changes: 170 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Helm charts and support for Navigator/Accelerator infrastructure
## Links:

* Helm Docs - https://helm.sh/docs/
* Airflow Command Ref - https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html


## Basic usage
Expand All @@ -32,8 +33,27 @@ Here I cd into the accelerator subdir of the repo, give a namespace and point to
```sh
kubectl create namespace accelerator-dev

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add airflow https://airflow.apache.org/
```

Now set up secrets...

Postgres admin password

```sh

# Admin/superuser credentials
kubectl create secret generic postgres-credentials --from-literal=postgres-password=your-admin-password


```

This secret is expected in the default values.yaml.



```sh

cd accelerator

helm dependency build

Expand All @@ -45,7 +65,7 @@ helm install -f ../../accel-values/accel-values.yaml -n accelerator-dev accelera
here i have alias k="kubectl" and am setting the default namespace as above

```sh
k config set-context --current --namespace=accelerator-dev
k config set-context --current --namespace accelerator

```

Expand All @@ -58,9 +78,156 @@ Here we're uninstalling
helm uninstall accelerator -ns accelerator-dev
```


### Staging

For staging, the procedures are the same, with differing namespaces



```sh

k config set-context --current --namespace=ods-test

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add airflow https://airflow.apache.org/

cd accelerator

helm dependency build

helm install -f ../../accel-values/accel-values-staging.yaml -n ods-test accelerator .


```


## Custom Accelerator Worker

This repo contains a custom airflow container for workers that includes some additional system and python dependencies.
See the [accel-worker-image](./accelerator/accel-worker-image/README.md)

The build of the custom container is automated by a GitHub action and the image is stored at: ghcr.io/niehs/accel-airflow:TAG, with latest being the default

## Accelerator Variables

For development environments, an example Accelerator variable set looks like this:

```json

{
"accelerator.xcom.tempfiles.supported": true,
"accelerator.xcom.tempfile.path": "/opt/xcom"
}


```

## Connections

A connection to Mongo needs to be created as follows

![image](https://github.com/user-attachments/assets/c81343c1-2f2a-4f3c-ad53-eaef30ba169d)

Suggested values for local:


connection id: mongo_default
connection type: http
description: rs0
host: mongo-service
schema: admin
login: root
password: ---password as set in helm values.yaml---
port:


# Notes


## Connections page shows error

If you run into an error where you cannot see connections in Airflow, it may be due to the fernet key, you can follow these steps:

1) Shell into the web container
2) Shell into the database running ```sh airflow db shell ```
3) Delete the connections from the db: ```sh delete from connection; ```


you should now be able to go in and edit connections


## redis pod does not terminate

Forcefully delete it with:

```
k delete pod --grace-period=0 --force accelerator-redis-0
```

NB this uses the k alias for kubectl

## importing and exporting connections

See https://airflow.apache.org/docs/apache-airflow/stable/howto/usage-cli.html#cli-export-connections

## staging

Use

```
helm install -f ../../accel-values/accel-values-staging.yaml -n ods-test accelerator .
```

## connection string tips
```
from pymongo import MongoClient

client = MongoClient(
"mongodb://<username>:<password>@"
"mongo-service-0.mongo-service-headless.accelerator-dev.svc.cluster.local:27017/"
"?replicaSet=rs0&authSource=admin"
)

db = client["<your_database_name>"]
```
### If you don’t care about replica set behavior locally

You can simplify:

mongodb://root:PASSWORD@localhost:27017/admin


(no replicaSet, no directConnection)

###add In-cluster apps (no port-forward, running in Kubernetes)

Those should not use localhost. They should use the service DNS name and can omit directConnection=true, e.g.:

mongodb://root:PASSWORD@mongo-service.accelerator-dev.svc.cluster.local:27017/admin?replicaSet=rs0


(Or just mongo-service:27017 from same namespace.)

An example configuration as an airflow connection for mongo:

name: mongo_default
type: http

description: rs0
host: x
user: root
password: xxxx

port: 27017
schema: accelerator

# tunneling to Mongo

port forward mongodb pod on server using k9s

open ssh tunnel on local machine: ➜ ~ ssh -L 27017:localhost:27017 user@accelserver

update mongodb compass connection string to: mongodb://root:xxxxxxxx@127.0.0.1:27017/?directConnection=true&authSource=admin


11 changes: 7 additions & 4 deletions accelerator/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
dependencies:
- name: mongodb
repository: https://charts.bitnami.com/bitnami
version: 16.5.8
version: 18.1.23
- name: postgres
repository: https://cloudpirates-io.github.io/helm-charts
version: 0.12.4
- name: airflow
repository: https://airflow.apache.org/
version: 1.16.0
digest: sha256:13b23acf7604dd97db8fac3496ca48a0c88ca21c6d09d36d4d16eaac3245af41
generated: "2025-05-16T13:21:37.691183-04:00"
version: 1.18.0
digest: sha256:b46f4454e59d72342fffef9be7313478f1988c5fd65c81dd4594aff9002d4ef4
generated: "2026-01-29T14:29:29.405314-05:00"
37 changes: 18 additions & 19 deletions accelerator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
apiVersion: v2
name: accelerator
description: A Helm chart for deployment of the Accelerator infrastructure

type: application

version: "0.1.3" # ⬅️ REQUIRED: chart version (semver)
appVersion: "1.16.3" # optional: your app version

sources:
- https://github.com/NIEHS/accelerator-helm
- https://github.com/apache/airflow
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
- https://github.com/bitnami/charts/tree/main/bitnami/mongodb

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
- https://github.com/CloudPirates-io/helm-charts/tree/main/charts/mongodb

dependencies:
- name: mongodb
version: ~16.5.1
repository: "https://charts.bitnami.com/bitnami"
- name: airflow
version: ~1.16.0
repository: "https://airflow.apache.org/"
#- name: mongodb
# version: "~0.6.6"
# repository: "https://cloudpirates-io.github.io/helm-charts"

- name: mongodb
version: ~18.1.10
repository: "https://charts.bitnami.com/bitnami"

- name: postgres
version: "~0.12.4"
repository: "https://cloudpirates-io.github.io/helm-charts"

- name: airflow
version: "~1.18.0"
repository: "https://airflow.apache.org/"
9 changes: 7 additions & 2 deletions accelerator/accel-worker-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM apache/airflow:2.10.5
FROM apache/airflow:3.0.2
USER root
COPY requirements.txt /
#COPY cacert.pem /home/airflow/.local/lib/python3.12/site-packages/certifi/
COPY NIH-FULL.crt /usr/local/share/ca-certificates/
COPY toxpipe.crt /etc/ssl/certs/
ENV REQUESTS_CA_BUNDLE=/home/airflow/.local/lib/python3.12/site-packages/certifi/cacert.pem

RUN apt-get update && apt-get install -y git
RUN apt-get update && apt-get install -y git nano wget less
RUN update-ca-certificates
USER airflow
RUN pip install --no-cache-dir -r /requirements.txt

75 changes: 75 additions & 0 deletions accelerator/accel-worker-image/NIH-FULL.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
-----BEGIN CERTIFICATE-----
MIIF3zCCA8egAwIBAgIQPPMxRkhpgrdLNl+H1sUiuzANBgkqhkiG9w0BAQsFADA2
MQswCQYDVQQGEwJVUzEMMAoGA1UEChMDTklIMRkwFwYDVQQDExBOSUgtRFBLSS1S
T09ULTFBMB4XDTE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