Skip to content

Commit

Permalink
fix: heap configuration from zowe.yaml (#3087)
Browse files Browse the repository at this point in the history
* chore: move babel to dev, modify webpack config, spring security

Signed-off-by: achmelo <[email protected]>

* allow heap configuration from zowe.yaml

Signed-off-by: achmelo <[email protected]>

* improve setup of default value

Signed-off-by: achmelo <[email protected]>

---------

Signed-off-by: achmelo <[email protected]>
  • Loading branch information
achmelo authored Sep 19, 2023
1 parent 4891904 commit 59ead89
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 6 deletions.
4 changes: 3 additions & 1 deletion api-catalog-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# - ZWE_components_gateway_apiml_security_authorization_resourceClass
# - ZWE_components_gateway_port - the port the api gateway service will use
# - ZWE_components_gateway_server_ssl_enabled
# - ZWE_configs_heap_max
# - ZWE_configs_heap_init
# - ZWE_configs_certificate_keystore_alias - The alias of the key within the keystore
# - ZWE_configs_certificate_keystore_file - The keystore to use for SSL certificates
# - ZWE_configs_certificate_keystore_password - The password to access the keystore supplied by KEYSTORE
Expand Down Expand Up @@ -138,7 +140,7 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi

CATALOG_CODE=AC
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${CATALOG_CODE} java \
-Xms16m -Xmx512m \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
Expand Down
5 changes: 4 additions & 1 deletion caching-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# - ZWE_components_discovery_port - the port the discovery service will use
# - ZWE_components_gateway_port - the port the api gateway service will use
# - ZWE_components_gateway_server_ssl_enabled
# - ZWE_configs_heap_max
# - ZWE_configs_heap_init
# - ZWE_configs_storage_evictionStrategy
# - ZWE_configs_storage_mode
# - ZWE_configs_storage_size
Expand Down Expand Up @@ -125,7 +127,8 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \

CACHING_CODE=CS
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} java -Xms16m -Xmx512m \
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} java \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
Expand Down
4 changes: 3 additions & 1 deletion cloud-gateway-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# - LIBPATH
# - LIBRARY_PATH
# - ZWE_components_discovery_port - the port the discovery service will use
# - ZWE_configs_heap_max
# - ZWE_configs_heap_init
# - ZWE_configs_apiml_service_forwardClientCertEnabled
# - ZWE_configs_certificate_keystore_alias - The alias of the key within the keystore
# - ZWE_configs_certificate_keystore_file - The keystore to use for SSL certificates
Expand Down Expand Up @@ -86,7 +88,7 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi

CLOUD_GATEWAY_CODE=CG
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${CLOUD_GATEWAY_CODE} java \
-Xms32m -Xmx256m \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
Expand Down
6 changes: 5 additions & 1 deletion discovery-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# - LIBPATH
# - LIBRARY_PATH
# - ZWE_components_gateway_server_ssl_enabled
# - ZWE_configs_heap_max
# - ZWE_configs_heap_init
# - ZWE_configs_certificate_keystore_alias - The alias of the key within the keystore
# - ZWE_configs_certificate_keystore_file - The keystore to use for SSL certificates
# - ZWE_configs_certificate_keystore_password - The password to access the keystore supplied by KEYSTORE
Expand Down Expand Up @@ -134,7 +136,9 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \

DISCOVERY_CODE=AD
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${DISCOVERY_CODE} java -Xms32m -Xmx256m ${QUICK_START} \
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${DISCOVERY_CODE} java \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
Expand Down
4 changes: 3 additions & 1 deletion gateway-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# - LIBPATH
# - LIBRARY_PATH
# - ZWE_components_discovery_port - the port the discovery service will use
# - ZWE_configs_heap_max
# - ZWE_configs_heap_init
# - ZWE_configs_apiml_catalog_serviceId
# - ZWE_configs_apiml_gateway_timeoutMillis
# - ZWE_configs_apiml_security_auth_provider
Expand Down Expand Up @@ -198,7 +200,7 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi

GATEWAY_CODE=AG
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${GATEWAY_CODE} java \
-Xms32m -Xmx256m \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
Expand Down
3 changes: 2 additions & 1 deletion metrics-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ truststore_location="${ZWE_configs_certificate_truststore_file:-${ZWE_zowe_certi
# -Dapiml.service.preferIpAddress=${APIML_PREFER_IP_ADDRESS:-false} \

METRICS_CODE=MS
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${METRICS_CODE} java -Xms16m -Xmx512m \
_BPX_JOBNAME=${ZWE_zowe_job_prefix}${METRICS_CODE} java \
-Xms${ZWE_configs_heap_init:-32}m -Xmx${ZWE_configs_heap_max:-512}m \
${QUICK_START} \
-Dibm.serversocket.recover=true \
-Dfile.encoding=UTF-8 \
Expand Down
14 changes: 14 additions & 0 deletions schemas/caching-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
"type": "boolean",
"description": "Enable debug logs in discovery service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
},
"storage": {
"evictionStrategy": {
"type": "string",
Expand Down
14 changes: 14 additions & 0 deletions schemas/catalog-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@
"debug": {
"type": "boolean",
"description": "Enable debug logs in metrics service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions schemas/cloud-gateway-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@
"debug": {
"type": "boolean",
"description": "Enable debug logs in discovery service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions schemas/discovery-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@
"debug": {
"type": "boolean",
"description": "Enable debug logs in discovery service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions schemas/gateway-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@
"$ref": "#/$defs/port",
"default": 7553
},
"debug": {
"type": "boolean",
"description": "Enable debug logs in gateway service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
},
"apiml": {
"type": "object",
"description": "Zowe API ML specific properties.",
Expand Down
14 changes: 14 additions & 0 deletions schemas/metrics-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@
"debug": {
"type": "boolean",
"description": "Enable debug logs in metrics service"
},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB."
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB."
}
}
}
}
}
Expand Down

0 comments on commit 59ead89

Please sign in to comment.