Once you run the app, see the API documentation at the app domain under path /docs
Configuration values are set as env vars in .env file.
You can see the full list of available configuration options in the following files:
- App configuration values: cwm_cdn_api/config.py
- Web server configuration values: gunicorn_conf.py
Prerequisites:
- Python 3.12
- uv
- Docker
- kubectl connected to a Kubernetes cluster with cwm-cdn-operator and related CRDs installed
Install:
uv sync
Set configuration values in .env file (See Configuration section above for details)
Run the CLI:
uv run cwm-minio-api --helpRun the web app:
uv run uvicorn cwm_cdn_api.app:app --reload --factory
Access the API Docs at http://localhost:8000/docs
Install load-test dependencies:
uv sync --extra load-testRecommended minimal configuration:
CWM_CDN_API_URL=
CWM_CDN_API_USERNAME=
CWM_CDN_API_PASSWORD=
CWM_CDN_KEEP_TENANTS=true
CWM_CDN_NUM_TENANTS=5
CWM_CDN_EDGE_HOSTS=
CWM_CDN_ORIGIN_URL=Run a smoke test:
uv run locust -f cwm_cdn_api/load_tests/locustfile.py --processes 2Start tests from the web UI:
Cleanup load-test tenants by prefix:
uv run cwm-cdn-api load-tests cleanup