Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: debug for production #3962

Merged
merged 6 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions api-catalog-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,25 @@ if [ -z "${LIBRARY_PATH}" ]
then
LIBRARY_PATH="../common-java-lib/bin/"
fi
# API Mediation Layer Debug Mode
export LOG_LEVEL=

if [ "${ZWE_configs_debug}" = "true" ]
then
export LOG_LEVEL="debug"
if [ -n "${ZWE_configs_spring_profiles_active}" ];
then
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
fi
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}debug"
fi

# FIXME: APIML_DIAG_MODE_ENABLED is not officially mentioned. We can still use it behind the scene,
# or we can define configs.diagMode in manifest, then use "$ZWE_configs_diagMode".
# if [[ ! -z "${APIML_DIAG_MODE_ENABLED}" ]]
# then
# LOG_LEVEL=${APIML_DIAG_MODE_ENABLED}
# if [ -n "${ZWE_configs_spring_profiles_active}" ];
# then
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
# fi
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}diag"
# fi

# NOTE: ZWEAD_EXTERNAL_STATIC_DEF_DIRECTORIES is not defined in Zowe level any more, never heard anyone use it.
Expand Down Expand Up @@ -287,7 +293,6 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CATALOG_CODE} ${JAVA_BIN_DIR}java \
-Dserver.ssl.ciphers=${server_ciphers} \
-Dserver.ssl.protocol=${server_protocol} \
-Dserver.ssl.enabled-protocols=${server_enabled_protocols} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dserver.address=${ZWE_configs_zowe_network_server_listenAddresses_0:-${ZWE_zowe_network_server_listenAddresses_0:-"0.0.0.0"}} \
-Dserver.ssl.enabled=${ZWE_configs_server_ssl_enabled:-true} \
-Dserver.ssl.keyStore="${keystore_location}" \
Expand Down
9 changes: 5 additions & 4 deletions caching-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ else
fi

echo "jar file: "${JAR_FILE}
# API Mediation Layer Debug Mode
export LOG_LEVEL=

if [ "${ZWE_configs_debug}" = "true" ]
then
export LOG_LEVEL="debug"
if [ -n "${ZWE_configs_spring_profiles_active}" ];
then
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
fi
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}debug"
fi

if [ -z "${LIBRARY_PATH}" ]
Expand Down Expand Up @@ -239,7 +241,6 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} ${JAVA_BIN_DIR}java \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dapiml.logs.location=${ZWE_zowe_logDirectory} \
-Dapiml.health.protected=${ZWE_configs_apiml_health_protected:-true} \
-Dapiml.service.port=${ZWE_configs_port:-7555} \
Expand Down
4 changes: 0 additions & 4 deletions config/zowe-api-dev/alternative_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ _BPX_JOBNAME=${ZOWE_PREFIX}${GATEWAY_CODE} java \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${APIML_SPRING_PROFILES:-} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dapiml.service.hostname=${ZOWE_EXPLORER_HOST} \
-Dapiml.service.port=${GATEWAY_PORT} \
-Dapiml.service.discoveryServiceUrls=${ZWE_DISCOVERY_SERVICES_LIST} \
Expand Down Expand Up @@ -135,7 +134,6 @@ _BPX_JOBNAME=${ZOWE_PREFIX}${DISCOVERY_CODE} java -Xms32m -Xmx256m ${QUICK_START
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${APIML_SPRING_PROFILES:-https} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dserver.address=0.0.0.0 \
-Dapiml.discovery.userid=eureka \
-Dapiml.discovery.password=password \
Expand Down Expand Up @@ -181,7 +179,6 @@ _BPX_JOBNAME=${ZOWE_PREFIX}${CATALOG_CODE} java \
-Dapiml.logs.location=${WORKSPACE_DIR}/api-mediation/logs \
-Dapiml.security.ssl.verifySslCertificatesOfServices=${VERIFY_CERTIFICATES:-false} \
-Dapiml.security.ssl.nonStrictVerifySslCertificatesOfServices=${NONSTRICT_VERIFY_CERTIFICATES:-false} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dserver.address=0.0.0.0 \
-Dserver.ssl.enabled=${APIML_SSL_ENABLED:-true} \
-Dserver.ssl.keyStore="${KEYSTORE}" \
Expand All @@ -206,7 +203,6 @@ _BPX_JOBNAME=${ZOWE_PREFIX}${CACHING_CODE} java -Xms16m -Xmx512m \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${APIML_SPRING_PROFILES:-} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dapiml.service.port=${ZWE_CACHING_SERVICE_PORT} \
-Dapiml.service.hostname=${ZOWE_EXPLORER_HOST} \
-Dapiml.service.discoveryServiceUrls=${ZWE_DISCOVERY_SERVICES_LIST} \
Expand Down
18 changes: 12 additions & 6 deletions discovery-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,25 @@ fi
if [ -z "${LIBRARY_PATH}" ]; then
LIBRARY_PATH="../common-java-lib/bin/"
fi
# API Mediation Layer Debug Mode
unset LOG_LEVEL

if [ "${ZWE_configs_debug}" = "true" ]; then
export LOG_LEVEL="debug"
if [ "${ZWE_configs_debug}" = "true" ]
then
if [ -n "${ZWE_configs_spring_profiles_active}" ];
then
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
fi
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}debug"
fi

# FIXME: APIML_DIAG_MODE_ENABLED is not officially mentioned. We can still use it behind the scene,
# or we can define configs.diagMode in manifest, then use "$ZWE_configs_diagMode".
# if [[ ! -z "${APIML_DIAG_MODE_ENABLED}" ]]
# then
# LOG_LEVEL=${APIML_DIAG_MODE_ENABLED}
# if [ -n "${ZWE_configs_spring_profiles_active}" ];
# then
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
# fi
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}diag"
# fi

# NOTE: ZWEAD_EXTERNAL_STATIC_DEF_DIRECTORIES is not defined in Zowe level any more, never heard anyone use it.
Expand Down Expand Up @@ -246,7 +253,6 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${DISCOVERY_CODE} ${JAVA_BIN_DIR}java \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-https} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dserver.address=${ZWE_configs_zowe_network_server_listenAddresses_0:-${ZWE_zowe_network_server_listenAddresses_0:-"0.0.0.0"}} \
-Dapiml.discovery.userid=eureka \
-Dapiml.discovery.password=password \
Expand Down
10 changes: 5 additions & 5 deletions gateway-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,13 @@ then
LIBRARY_PATH="../common-java-lib/bin/"
fi

# API Mediation Layer Debug Mode
export LOG_LEVEL=

if [ "${ZWE_configs_debug}" = "true" ]
then
export LOG_LEVEL="debug"
if [ -n "${ZWE_configs_spring_profiles_active}" ];
then
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
fi
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}debug"
fi

if [ "${ZWE_configs_apiml_security_auth_uniqueCookie}" = "true" ]; then
Expand Down Expand Up @@ -288,7 +289,6 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${GATEWAY_CODE} ${JAVA_BIN_DIR}java \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \
-Dspring.profiles.include=${LOG_LEVEL} \
-Dapiml.service.apimlId=${ZWE_configs_apimlId:-} \
-Dapiml.service.hostname=${ZWE_haInstance_hostname:-localhost} \
-Dapiml.service.port=${ZWE_configs_port:-7554} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ instanceEnv:
ZWE_configs_apiml_security_auth_zosmf_jwtAutoconfiguration: JWT
ZWE_STATIC_DEFINITIONS_DIR: config/local/api-defs
ZWE_configs_server_internal_enabled: true
ZWE_configs_debug: true
ZWE_configs_debug: false
ZWE_configs_apiml_catalog_serviceId: apicatalog
ZWE_configs_storage_size: 100
ZWE_zowe_verifyCertificates: true
Expand Down
2 changes: 2 additions & 0 deletions onboarding-enabler-nodejs-sample-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ node {

build.dependsOn npmInstall

npmInstall.dependsOn ":onboarding-enabler-nodejs:build"

task nodeClean(type: Delete) {
group = 'node'
if (rootProject.cleanNodeModules == 'true') {
Expand Down
2 changes: 1 addition & 1 deletion onboarding-enabler-nodejs-sample-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion onboarding-enabler-nodejs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,27 @@
* Copyright Contributors to the Zowe Project.
*/

plugins {
alias(libs.plugins.gradle.node)
}

node {
download = true
version = libs.versions.projectNode.get()
npmVersion = libs.versions.projectNpm.get()
distBaseUrl = "https://nodejs.org/dist"
npmInstallCommand = "ci"
workDir = file("${project.projectDir}/tools/nodejs")
npmWorkDir = file("${project.projectDir}/tools/npm")
nodeProjectDir = file("${project.projectDir}")
}

task nodeClean(type: Delete) {
group = 'node'
delete 'node_modules'
}
clean.dependsOn nodeClean

build.dependsOn npmInstall
jar {
enabled false
}
2 changes: 1 addition & 1 deletion onboarding-enabler-nodejs/license-checker-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"ignore": [
"bin", "lib", "coverage",
".*", "*.md", "*.gradle", "**/*.yml"
".*", "*.md", "*.gradle", "**/*.yml", "tools"
]
}
16 changes: 10 additions & 6 deletions zaas-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ then
LIBRARY_PATH="../common-java-lib/bin/"
fi

# API Mediation Layer Debug Mode
export LOG_LEVEL=

if [ "${ZWE_configs_debug}" = "true" ]
then
export LOG_LEVEL="debug"
if [ -n "${ZWE_configs_spring_profiles_active}" ];
then
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
fi
ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}debug"
fi

# setting the cookieName based on the instances
Expand All @@ -114,7 +115,11 @@ fi
# DIAG_MODE=${APIML_DIAG_MODE_ENABLED}
# if [ ! -z "$DIAG_MODE" ]
# then
# LOG_LEVEL=$DIAG_MODE
# if [ -n "${ZWE_configs_spring_profiles_active}" ];
# then
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active},"
# fi
# ZWE_configs_spring_profiles_active="${ZWE_configs_spring_profiles_active}diag"
# fi

# how to verifyCertificates
Expand Down Expand Up @@ -298,7 +303,6 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${ZAAS_CODE} ${JAVA_BIN_DIR}java \
-Dfile.encoding=UTF-8 \
-Djava.io.tmpdir=${TMPDIR:-/tmp} \
-Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dapiml.service.hostname=${ZWE_haInstance_hostname:-localhost} \
-Dapiml.service.port=${ZWE_configs_port:-7558} \
-Dapiml.service.discoveryServiceUrls=${ZWE_DISCOVERY_SERVICES_LIST} \
Expand Down
Loading