Skip to content

Commit

Permalink
Merge pull request zowe#30 from 1000TurquoisePogs/feature/allow-speci…
Browse files Browse the repository at this point in the history
…fication-of-addresses

Adding ipAddresses field for zlux and agent(zss) for specifying binding to specific IPs
  • Loading branch information
1000TurquoisePogs authored Jan 14, 2019
2 parents 71dd400 + c30e226 commit cd0ec64
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
10 changes: 10 additions & 0 deletions config/zluxserver.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"node": {
"https": {
"ipAddresses": ["0.0.0.0"],
"port": 8544,
//pfx (string), keys, certificates, certificateAuthorities, and certificateRevocationLists are all valid here.
"keys": ["../deploy/product/ZLUX/serverConfig/zlux.keystore.key"],
Expand All @@ -22,6 +23,15 @@
}
]
},
"agent": {
//host is for zlux to know, not zss
"host": "localhost",
"http": {
"ipAddresses": ["0.0.0.0"],
//to be a replacement for zssPort
"port": 8542
}
},
// All paths relative to ZLUX/node or ZLUX/bin
// In real installations, these values will be configured during the install.
"rootDir":"../deploy",
Expand Down
23 changes: 21 additions & 2 deletions js/zluxArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const DEFAULT_CONFIG = {

"node": {
"https": {
"ipAddresses": ["0.0.0.0"],
"port": 8544,
//pfx (string), keys, certificates, certificateAuthorities, and certificateRevocationLists are all valid here.
"keys": ["../deploy/product/ZLUX/serverConfig/zlux.keystore.key"],
Expand All @@ -95,7 +96,15 @@ const DEFAULT_CONFIG = {
}
}
},
"zssPort":8542
"agent": {
//host is for zlux to know, not zss
"host": "localhost",
"http": {
"ipAddresses": ["0.0.0.0"],
//to be a replacement for zssPort
"port": 8542
}
}
};

const MVD_ARGS = [
Expand Down Expand Up @@ -141,7 +150,17 @@ if(eUser && ePass){
configJSON.node.mediationLayer.eureka.serviceUrls.default = [`http://${eUser}:${ePass}@${configJSON.node.mediationLayer.server.hostname}:${configJSON.node.mediationLayer.server.port}/eureka/apps/`];
}
if (!hostPort) {
hostPort = configJSON.zssPort;
if (configJSON.agent) {
if (configJSON.agent.https) {
hostPort = configJSON.agent.https.port;
} else if (configJSON.agent.http) {
hostPort = configJSON.agent.http.port;
} else {
console.warn(`Invalid server configuration. Agent specified without http or https port`);
}
} else if (configJSON.zssPort) {
hostPort = configJSON.zssPort;
}
}
if (userInput.hostServer) {
zssHost = userInput.hostServer;
Expand Down

0 comments on commit cd0ec64

Please sign in to comment.