mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-29 10:57:52 +00:00
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:
parent
cb69114f89
commit
6f5f8de99a
@ -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(
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user