-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed the project to github.com/cyverse-de/qms
- Loading branch information
Showing
27 changed files
with
81 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*.dll | ||
*.so | ||
*.dylib | ||
QMS | ||
qms | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
all: QMS | ||
all: qms | ||
|
||
install-swagger: | ||
which swagger || go install github.com/go-swagger/go-swagger/cmd/swagger@latest | ||
|
||
swagger.json: install-swagger | ||
swagger generate spec -o ./swagger.json --scan-models | ||
|
||
QMS: swagger.json | ||
qms: swagger.json | ||
go build --buildvcs=false . | ||
|
||
clean: | ||
rm -rf QMS swagger.json | ||
rm -rf qms swagger.json | ||
|
||
.PHONY: install-swagger clean all | ||
lint: | ||
golangci-lint run | ||
|
||
test: | ||
go test ./... | ||
|
||
.PHONY: install-swagger clean all lint test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# QMS | ||
# qms | ||
|
||
QMS is the CyVerse Quota Management System. Its purpose is to keep track of resource usage limits and totals for | ||
qms is the CyVerse Quota Management System. Its purpose is to keep track of resource usage limits and totals for | ||
CyVerse users. | ||
|
||
## Concepts | ||
|
@@ -20,21 +20,21 @@ user. Quotas can be customized if necessary, but customizing quotas should be a | |
|
||
### Current Usage | ||
|
||
The QMS tracks the current resource usage totals for each CyVerse user. These usage totals are calculated by other | ||
CyVerse microservices and reported to the QMS. | ||
The qms tracks the current resource usage totals for each CyVerse user. These usage totals are calculated by other | ||
CyVerse microservices and reported to the qms. | ||
|
||
### Updates | ||
|
||
Updates to both quotas and resource usage totals are recorded in the QMS database for auditing purposes. | ||
Updates to both quotas and resource usage totals are recorded in the qms database for auditing purposes. | ||
|
||
## Configuration Settings | ||
|
||
The QMS uses environment variables for its configuration settings. The following configuration settings are supported. | ||
The qms uses environment variables for its configuration settings. The following configuration settings are supported. | ||
|
||
### QMS_DATABASE_URI (Required) | ||
|
||
This environment variable contains the database connection URI. The QMS uses a PostgreSQL database to keep track of | ||
its data. Any version of PostgreSQL that supports the required extensions should work, but the QMS has been tested | ||
This environment variable contains the database connection URI. The qms uses a PostgreSQL database to keep track of | ||
its data. Any version of PostgreSQL that supports the required extensions should work, but the qms has been tested | ||
against versions 12, 13, and 14. The following extensions are required: | ||
|
||
1. uuid-ossp | ||
|
@@ -58,20 +58,20 @@ postgresql://[email protected]:5432/dbname?sslmode=disable | |
|
||
### QMS_DATABASE_MIGRATE (Optional, Default: `false`) | ||
|
||
If this environment variable is defined and set to `true` then QMS will automatically run database schema migrations | ||
If this environment variable is defined and set to `true` then qms will automatically run database schema migrations | ||
on startup. | ||
|
||
### QMS_DATABASE_REINIT (Optional, Default: `false`) | ||
|
||
If this environment variable is defined and set to `true` then the QMS will reinitialize the database upon startup. | ||
If this environment variable is defined and set to `true` then the qms will reinitialize the database upon startup. | ||
This feature is intended to be used only during development testing, when the schema migrations are being actively | ||
updated. Note: this parameter is only applicable if `QMS_DATABASE_MIGRATE` is also enabled. | ||
|
||
## Database Schema Migraions | ||
|
||
The QMS runs its schema migrations upon startup. For this to succeed, two prerequisites must be satisfied. The first | ||
The qms runs its schema migrations upon startup. For this to succeed, two prerequisites must be satisfied. The first | ||
requirement is that the database must exist and must have the required extensions listed above installed. Having the | ||
extensions installed in advance allows QMS to use a regular PostgreSQL account instead of requiring an administrative | ||
extensions installed in advance allows qms to use a regular PostgreSQL account instead of requiring an administrative | ||
account. | ||
|
||
The second requirement is that the schema migrations must exist in a subdirectory of the current working directory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/cyverse/QMS | ||
module github.com/cyverse/qms | ||
|
||
go 1.21 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.