A lightweight FastAPI service for running ad-hoc data processing and convenience jobs in support of the GDEX data portal. Rather than burdening the main web portal with one-off or background tasks, this service provides a simple, independently deployable API for those operations.
# Install dependencies
pip install -r requirements.txt
# Run the development server
uvicorn app.main:app --reload --port 8080API docs are available at http://localhost:8080/docs once the server is running.
# Install dev dependencies
pip install -r requirements-dev.txt
# Run all tests
pytest tests/ -v# Build the image
docker build -t gdex-web-services .
# Run the container
docker run -d --name gdex-web-services -p 8080:8080 gdex-web-servicesAPI docs are available at http://localhost:8080/docs once the container is running.
# Stop and remove the container
docker stop gdex-web-services && docker rm gdex-web-servicesPushing to main triggers the GitHub Actions workflow, which builds a new Docker image and pushes it to Harbor (hub.k8s.ucar.edu/riley_gdex_test/gdex-web-services). The app is deployed to Kubernetes via the Helm chart in app-chart/.
# Deploy with Helm
helm upgrade --install gdex-webservices ./app-chart -n <namespace>
# Deploy a test instance
helm upgrade --install gdex-webservices ./app-chart -n <namespace> --set testName=<your-name>gdexws is a Python package providing CLI commands used for data curation on the NCAR HPC system. These commands are triggered and used by the API endpoints. See the gdexws README for installation and usage.