Skip to content
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
merged 21 commits into from
Jun 12, 2024

Conversation

sbolosan
Copy link
Collaborator

@sbolosan sbolosan commented Jun 4, 2024

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

jcollins-axway
jcollins-axway previously approved these changes Jun 5, 2024
vivekschauhan
vivekschauhan previously approved these changes Jun 8, 2024
dgghinea
dgghinea previously approved these changes Jun 10, 2024
@sbolosan sbolosan merged commit 7e4da5f into main Jun 12, 2024
1 of 3 checks passed
@sbolosan sbolosan deleted the APIGOV-27617 branch June 12, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants