This is the main reporsitory of the Upgrade Risks Predictions Inference service.
Related Jira: CCXDEV-9718
The idea behind this service is to provide a REST API to interact with the predictive models that the TDI team will develop for predicting the likelihood of an upgrade failure.
The service is deployed as part of the external data pipeline and managed via app-interface. You can monitor the deployment of this service in Grafana.
Check the CONTRIBUTING for more information about how to collaborate.
Use docker or podman:
docker build -t ccx-upgrades-inference . && docker run --rm -p 8000:8000 ccx-upgrades-inference
Change to the source folder and run the app using uvicorn:
uvicorn ccx_upgrades_inference.main:app --reload
Then run some requests against the server:
curl -X 'GET' \
'http://127.0.0.1:8000/upgrade-risks-prediction' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"alerts": [
{
"name": "APIRemovedInNextEUSReleaseInUse",
"namespace": "openshift-kube-apiserver",
"severity": "info"
}
],
"operator_conditions": [
{"name": "authentication", "condition": "Degraded", "reason": "AsExpected"}
]
}'
Check the API documentation at http://127.0.0.1:8000/docs or http://127.0.0.1:8000/redoc.