feat(upgrade): add gms protocol variable (#7752)

Co-authored-by: Felipe Ribeiro <fribeiro@fanatics.com>
Co-authored-by: david-leifker <114954101+david-leifker@users.noreply.github.com>
This commit is contained in:
Felipe Ribeiro 2023-04-12 18:47:55 -07:00 committed by GitHub
parent cb69114f89
commit 6f5f8de99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -69,8 +69,9 @@ public class GMSQualificationStep implements UpgradeStep {
return (context) -> {
String gmsHost = System.getenv("DATAHUB_GMS_HOST") == null ? "localhost" : System.getenv("DATAHUB_GMS_HOST");
String gmsPort = System.getenv("DATAHUB_GMS_PORT") == null ? "8080" : System.getenv("DATAHUB_GMS_PORT");
String gmsProtocol = System.getenv("DATAHUB_GMS_PROTOCOL") == null ? "http" : System.getenv("DATAHUB_GMS_PROTOCOL");
try {
String spec = String.format("http://%s:%s/config", gmsHost, gmsPort);
String spec = String.format("%s://%s:%s/config", gmsProtocol, gmsHost, gmsPort);
URLConnection gmsConnection = new URL(spec).openConnection();
InputStream response = gmsConnection.getInputStream();
@ -92,8 +93,9 @@ public class GMSQualificationStep implements UpgradeStep {
} catch (Exception e) {
e.printStackTrace();
context.report().addLine(String.format("ERROR: Cannot connect to GMS"
+ "at host %s port %s. Make sure GMS is on the latest version "
+ "at %s://host %s port %s. Make sure GMS is on the latest version "
+ "and is running at that host before starting the migration.",
gmsProtocol,
gmsHost,
gmsPort));
return new DefaultUpgradeStepResult(

View File

@ -57,6 +57,9 @@ NEO4J_PASSWORD=datahub
DATAHUB_GMS_HOST=<your-gms-host>>
DATAHUB_GMS_PORT=8080
# Datahub protocol (default http)
# DATAHUB_GMS_PROTOCOL=http
DATAHUB_MAE_CONSUMER_HOST=<your-mae-consumer-host>
DATAHUB_MAE_CONSUMER_PORT=9091