Skip to content

NaaVRE/NaaVRE-containerizer-service

Repository files navigation

NaaVRE-containerizer-service

Running locally

Create conda environment:

conda env create -f environment.yaml

Activate the environment:

conda activate naavre-containerizer-service

Run the dev server

fastapi dev app/main.py

Build Docker image

docker build . -f docker/Dockerfile -t naavre-containerizer-service:dev

To run it:

docker run -p 127.0.0.1:8000:8000 naavre-containerizer-service:dev

and open http://127.0.0.1:8000/docs

Deployment

We use Helm for the deployment:

helm -n naavre-containerizer-service upgrade --install --create-namespace naavre-containerizer-service ./helm/naavre-containerizer-service -f values.yaml

values.yaml should contain ingress, OAuth2, and other configuration ( checkout ./helm/naavre-containerizer-service/values-example.yaml).

Configuration

Test on GitHub

The secrets.CONFIG_FILE should have quotes escaped:

{   \"vl_configurations\": [     {       \"name\": \"virtual_lab_1\",       \"base_image_tags_url\": \"https://github.com/QCDIS/NaaVRE-flavors/releases/latest/download/base_image_tags.json\",       \"module_mapping_url\": \"https://raw.githubusercontent.com/QCDIS/NaaVRE-conf/main/module_mapping.json\",       \"cell_github_url\": \"https://github.com/QCDIS/NaaVRE-cells-test-3.git\",       \"cell_github_token\": \"TOKEN\",       \"registry_url\": \"ghcr.io/qcdis/naavre-cells-test-3\"     },     {       \"name\": \"virtual_lab_2\",       \"base_image_tags_url\": \"https://github.com/QCDIS/NaaVRE-flavors/releases/latest/download/base_image_tags.json\",       \"module_mapping_url\": \"https://raw.githubusercontent.com/QCDIS/NaaVRE-conf/main/module_mapping.json\",       \"cell_github_url\": \"\",       \"cell_github_token\": \"\",       \"registry_url\": \"https://registry.naavre.com\"     }   ] }