Install required software:
- PostgreSQL 9.6 or above
- Python 3.13.x
- Poetry
Then use poetry install to install the dependencies. Before that,
a virtualenv is recommended.
If you don't manage your own, Poetry will create one for you
during poetry install, and you must activate it with poetry shell.
You may also need to upgrade pip to the latest version.
Requestor requires a configuration file to run. We have a command line utility to help you create one based on a default configuration.
The configuration file itself will live outside of this repo (to prevent accidentally checking in sensitive information like database passwords).
To create a new configuration file from the default configuration:
python cfg_help.py createThis file will be placed in one of the default search directories for Requestor.
To get the exact path where the new configuration file was created, use:
python cfg_help.py getThe file should have detailed information about each of the configuration variables. Remember to fill out the new configuration file!
To use a configuration file in a custom location, you can set the REQUESTOR_CONFIG_PATH environment variable.
Update your configuration file to set LOCAL_MIGRATION to true, so that no attempts to interact with Arborist are made.
Run database schema migration:
alembic upgrade headRun the server with auto-reloading:
python run.py
OR
uvicorn requestor.asgi:app --reloadTry out the API at http://localhost:8000/_status or http://localhost:8000/docs (you might have to set DOCS_URL_PREFIX to "" in your configuration file for the docs endpoint to work).
You can now deploy individual services via Helm!
If you are looking to deploy all Gen3 services, that can be done via the Gen3 Helm chart. Instructions for deploying all Gen3 services with Helm can be found here.
To deploy the requestor service:
helm repo add gen3 https://helm.gen3.org
helm repo update
helm upgrade --install gen3/requestorThese commands will add the Gen3 helm chart repo and install the requestor service to your Kubernetes cluster.
Deploying requestor this way will use the defaults that are defined in this values.yaml file
You can learn more about these values by accessing the requestor README.md
If you would like to override any of the default values, simply copy the above values.yaml file into a local file and make any changes needed.
To deploy the service independant of other services (for testing purposes), you can set the .postgres.separate value to "true". This will deploy the service with its own instance of Postgres:
postgres:
separate: trueYou can then supply your new values file with the following command:
helm upgrade --install gen3/requestor -f values.yamlIf you are using Docker Build to create new images for testing, you can deploy them via Helm by replacing the .image.repository value with the name of your local image. You will also want to set the .image.pullPolicy to "never" so kubernetes will look locally for your image. Here is an example:
image:
repository: <image name from docker image ls>
pullPolicy: Never
# Overrides the image tag whose default is the chart appVersion.
tag: ""Re-run the following command to update your helm deployment to use the new image:
helm upgrade --install gen3/requestorYou can also store your images in a local registry. Kind and Minikube are popular for their local registries:
- https://kind.sigs.k8s.io/docs/user/local-registry/
- https://minikube.sigs.k8s.io/docs/handbook/registry/#enabling-insecure-registries
Dependencies: Requestor relies on Arborist to run. Please view the Arborist Quick Start Guide for more information.