Skip to content

Commit

Permalink
Change envPrefix to match new component name
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyTetrahedron committed Nov 17, 2023
1 parent e4fe089 commit 9e3f2b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ build-docker: build-bin ## Build docker image
ensure-prometheus: .cache/prometheus ## Ensures that Prometheus is installed in the project dir. Downloads it if necessary.

.PHONY: test
test: export ACR_DB_URL = postgres://user:password@localhost:55432/db?sslmode=disable
test: ensure-prometheus
go test ./... -tags integration -coverprofile cover.out -covermode atomic

Expand Down Expand Up @@ -72,4 +71,4 @@ clean:
# current date in UTC in ISO 8601 format (RFC 3339) with Z as timezone that works on both linux and macos
.PHONY: current-date
current-date:
date -u +"%Y-%m-%dT%H:%M:%SZ"
date -u +"%Y-%m-%dT%H:%M:%SZ"
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ oc login --server=https://api.cloudscale-lpg-2.appuio.cloud:6443
kubectl --as cluster-admin -nvshn-appuio-mimir service/vshn-appuio-mimir-query-frontend 8080

# Set environment
export ACR_PROM_URL="http://localhost:8080/prometheus"
export ACR_ORG_ID="appuio-managed-openshift-billing" # mimir organization in which data is stored
export ACR_ODOO_URL=https://test.central.vshn.ch/api/v2/product_usage_report_POST
export ACR_ODOO_OAUTH_TOKEN_URL="https://test.central.vshn.ch/api/v2/authentication/oauth2/token"
export ACR_ODOO_OAUTH_CLIENT_ID="your_client_id" # see https://docs.central.vshn.ch/rest-api.html#_authentication_and_authorization
export ACR_ODOO_OAUTH_CLIENT_SECRET="your_client_secret"
export AR_PROM_URL="http://localhost:8080/prometheus"
export AR_ORG_ID="appuio-managed-openshift-billing" # mimir organization in which data is stored
export AR_ODOO_URL=https://test.central.vshn.ch/api/v2/product_usage_report_POST
export AR_ODOO_OAUTH_TOKEN_URL="https://test.central.vshn.ch/api/v2/authentication/oauth2/token"
export AR_ODOO_OAUTH_CLIENT_ID="your_client_id" # see https://docs.central.vshn.ch/rest-api.html#_authentication_and_authorization
export AR_ODOO_OAUTH_CLIENT_SECRET="your_client_secret"

# Run a query
go run . report --query 'sum by (label) (metric)' --begin "2023-07-08T13:00:00Z" --product-id "your-odoo-product-id" --instance-jsonnet 'local labels = std.extVar("labels"); "instance-%(label)s" % labels' --unit-id "your_odoo_unit_id" --timerange 1h --item-description-jsonnet '"This is a description."' --item-group-description-jsonnet 'local labels = std.extVar("labels"); "Instance %(label)s" % labels'
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
appLongName = "Reporting for APPUiO Cloud"

// envPrefix is the global prefix to use for the keys in environment variables
envPrefix = "ACR"
envPrefix = "AR"
)

func main() {
Expand Down

0 comments on commit 9e3f2b8

Please sign in to comment.