Skip to content

Commit

Permalink
Merge pull request #273 from zowe/v2.x/rc
Browse files Browse the repository at this point in the history
Sync staging with RC
  • Loading branch information
1000TurquoisePogs authored Jul 28, 2023
2 parents db08e23 + b3cedfb commit 53d91da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
5 changes: 4 additions & 1 deletion bin/install-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ if [ -n "${ZWE_zowe_workspaceDirectory}" -a -n "${ZWE_zowe_runtimeDirectory}" ];
ZLUX_CONTAINER_MODE=1
INSTALL_NO_NODE=1
fi
if [ ! -d "${COMPONENT_HOME}/share/zlux-app-server" ]; then
COMPONENT_HOME=${ZWE_zowe_runtimeDirectory}/components/app-server
fi
fi
zlux_path="$COMPONENT_HOME/share"

if [ -z "$INSTALL_NO_NODE" ]; then
zlux_path="$COMPONENT_HOME/share"
setVars
if [ ! -e "${ZWE_zowe_workspaceDirectory}/app-server/plugins/org.zowe.zlux.json" ]; then
cd ${zlux_path}/zlux-app-server/lib
Expand Down
18 changes: 16 additions & 2 deletions defaults/serverConfig/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,22 @@ components:
loopbackAddress: "${{ function a(){ if (process.env.ZOWE_LOOPBACK_ADDRESS) { return process.env.ZOWE_LOOPBACK_ADDRESS; } else { return undefined; } }; a() }}"
mediationLayer:
server:
hostname: ${{ zowe.externalDomains[0] }}
gatewayHostname: ${{ zowe.externalDomains[0] }}
# if ZWE_DISCOVERY_SERVICES_LIST exists, its more accurate than zowe.externalDomains, as that doesn't handle containers well.
# if exists, its in the format of "https://discovery-0.discovery-service.zowe.svc.cluster.local:7553/eureka/"
hostname: '${{ function a() {
if (process.env.ZWE_DISCOVERY_SERVICES_LIST) {
return process.env.ZWE_DISCOVERY_SERVICES_LIST.split(",")[0].split("/")[2].split(":")[0];
} else {
return zowe.externalDomains[0] } };
a() }}'
# usually, externalDomains is where gateway is. But on containers, this isnt accessible to containers, so
# HACK: special var ZWE_GATEWAY_HOST is used instead
gatewayHostname: '${{ function a() {
if (process.env.ZWE_RUN_IN_CONTAINER=="true" && process.env.ZWE_GATEWAY_HOST) {
return process.env.ZWE_GATEWAY_HOST;
} else {
return zowe.externalDomains[0] } };
a() }}'
port: ${{ components.discovery.port }}
gatewayPort: ${{ zowe.externalPort }}
isHttps: true
Expand Down
4 changes: 2 additions & 2 deletions lib/zluxArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ if(process.env.overrideFileConfig !== "false"){
if (cluster.isMaster) {
console.log('\nZWED5015I - Processed environment variables:\n'+JSON.stringify(envConfig, null, 2));
}
configJSON = mergeUtils.deepAssign(configJSON, envConfig);
configJSON = Object.assign(configJSON, {components: {"app-server": mergeUtils.deepAssign(configJSON.components['app-server'], envConfig) } });
}
if (userInput.D) {
if (cluster.isMaster) {
console.log('\nZWED5016I - Processed -D arguments:\n'+JSON.stringify(userInput.D, null, 2));
}
configJSON = mergeUtils.deepAssign(configJSON, userInput.D);
configJSON = Object.assign(configJSON, {components: {"app-server": mergeUtils.deepAssign(configJSON.components['app-server'], userInput.D) } })
}
} else {
console.log("ZWED5017I - Using config JSON, discarding CLI args");
Expand Down
4 changes: 2 additions & 2 deletions schemas/plugindefinition-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"semverVersion": {
"type": "string",
"description": "A semantic version, see https://semver.org/",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-*[a-zA-Z][0-9a-zA-Z\\-\\.]*)?(\\+[0-9a-zA-Z\\-\\.]*)?$"
"pattern": "^[0-9]*\\.[0-9]*\\.[0-9]*(-*[a-zA-Z][0-9a-zA-Z\\-\\.]*)?(\\+[0-9a-zA-Z\\-\\.]*)?$"
},
"semverRange": {
"type": "string",
"description": "A semantic version, see https://semver.org/",
"pattern": "^(([\\^\\~\\>\\<]?)|(>=?)|(<=?))(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-*[a-zA-Z][0-9a-zA-Z\\-\\.]*)?(\\+[0-9a-zA-Z\\-\\.]*)?$"
"pattern": "^(([\\^\\~\\>\\<]?)|(>=?)|(<=?))[0-9]*\\.[0-9]*\\.[0-9]*(-*[a-zA-Z][0-9a-zA-Z\\-\\.]*)?(\\+[0-9a-zA-Z\\-\\.]*)?$"
},
"appFwPlugin": {
"type": "object",
Expand Down

0 comments on commit 53d91da

Please sign in to comment.