https://github.com/stackhpc/coral-credits
Track cloud credit usage for projects like Azimuth and Blazar
https://github.com/stackhpc/coral-credits
Last synced: 4 days ago
JSON representation
Track cloud credit usage for projects like Azimuth and Blazar
- Host: GitHub
- URL: https://github.com/stackhpc/coral-credits
- Owner: stackhpc
- License: apache-2.0
- Created: 2024-01-30T17:24:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-28T14:45:24.000Z (6 days ago)
- Last Synced: 2026-05-28T16:08:04.719Z (6 days ago)
- Language: Python
- Size: 5.61 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coral-credits
Coral credits is a resource management system that helps build a "coral reef style" fixed capacity cloud, cooperatively sharing community resources through interfaces such as: Azimuth, OpenStack Blazar and Slurm.
You can read more about our plans here:
https://stackhpc.github.io/coral-credits
## Blazar configuration
To use this with Blazar you need to add something like this
into your Blazar configuration:
```
[enforcement]
enabled_filters = ExternalServiceFilter
external_service_bearer_token =
external_service_check_create_endpoint = https://credits./consumer/check-create/
external_service_commit_create_endpoint = https://credits./consumer/create/
external_service_check_update_endpoint = https://credits./consumer/check-update/
external_service_commit_update_endpoint = https://credits./consumer/update/
external_service_on_end_endpoint = https://credits./consumer/on-end/
```
To generate the service bearer token do something
like this:
```
CONTENT_TYPE="Content-Type: application/json"
TEST_PASSWORD=
SITE_URL="https://credits."
TOKEN=$(curl -s -X POST -H "$CONTENT_TYPE" -d \
"{
\"username\": \"admin\",
\"password\": \"$TEST_PASSWORD\"
}" \
$SITE_URL/api-token-auth/ | jq -r '.token')
echo "Auth Token: $TOKEN"
```