-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIGOV-27617 - introduce var CENTRAL_REGION for default URL endpoints based on region (US, EU, AP) #787
Merged
Conversation
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
sbolosan
requested review from
jcollins-axway,
dfeldick,
vivekschauhan,
alrosca and
dgghinea
as code owners
June 4, 2024 14:33
jcollins-axway
previously approved these changes
Jun 5, 2024
vivekschauhan
previously approved these changes
Jun 8, 2024
dgghinea
previously approved these changes
Jun 10, 2024
jcollins-axway
approved these changes
Jun 11, 2024
vivekschauhan
approved these changes
Jun 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a production environment, allow the customer to set (a new variable called) CENTRAL_REGION.
Possible values - US, EU, AP.
If CENTRAL_REGION is not set, it takes US by default.
When CENTRAL_REGION is set, the following variables is automatically set based on region
SingleURL:
CentralURL:
AuthURL:
PlatformURL:
TraceabilityHost:
Deployment:
The users can still declare these values in the env vars when CENTRAL_REGION is set. When this is done, it will override the regional default value(s)
For local environments, we do not want to have the CENTRAL_SINGLEURL set. To override this, you can set the value explicitly to "" (empty).
CENTRAL_SINGLEURL=
For local environments, you can also set CENTRAL_REGION explicitly to blank, while still explicitly filling in the needed URL endpoints, ie. centralURL, platformURL, authURL, etc.
Example configurations
Static
CENTRAL_ENVIRONMENT=centralregion
CENTRAL_AGENT_NAME=centralregion-da
CENTRAL_AUTH_PRIVATEKEY=/Users/sbolosan/go/credentials/keys/private_key.pem
CENTRAL_AUTH_PUBLICKEY=/Users/sbolosan/go/credentials/keys/public_key.pem
CENTRAL_VERSIONCHECKER=false
region set to US
#CENTRAL_REGION=US
#CENTRAL_DEPLOYMENT=teams
#CENTRAL_ORGANIZATIONID=108333611468989
#CENTRAL_AUTH_CLIENTID=agents-shane_7fd20fc9-ef33-4b19-981e-1afff6bc4c97
region set to EU
#CENTRAL_REGION=EU
#CENTRAL_DEPLOYMENT=teams
#CENTRAL_ORGANIZATIONID=247719145165135
#CENTRAL_AUTH_CLIENTID=agents-shane_c296cce5-6409-4974-9c27-47b4668f32e9
region set to AP
#CENTRAL_REGION=AP
#CENTRAL_DEPLOYMENT=teams
#CENTRAL_ORGANIZATIONID=532494281232308
#CENTRAL_AUTH_CLIENTID=agents-shane_30f0af02-bf38-4b61-8f45-44448d770d79
No region - development
CENTRAL_SINGLEURL=
CENTRAL_REGION=
CENTRAL_URL=https://sbolosan.dev.ampc.axwaytest.net
CENTRAL_PLATFORMURL=https://platform.axwaytest.net
CENTRAL_AUTH_CLIENTID=sbolosan_a5db3893-634a-45f8-98b2-562385ccf9d6
CENTRAL_AUTH_URL=https://login.axwaytest.net/auth
CENTRAL_DEPLOYMENT=teams
CENTRAL_ORGANIZATIONID=732373823941016