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

API ML v3 components #3843

Merged
merged 33 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4bb9efc
wip use zaas service
May 31, 2024
b2e2a07
wip
May 31, 2024
cfe9765
wip
May 31, 2024
90e25a2
wip
May 31, 2024
d3bbc1e
wip
May 31, 2024
a89b96c
add shared libs loading (zaas)
Jun 4, 2024
515bc7c
use libraries from PR
achmelo Jul 12, 2024
c4a5ffe
Merge remote-tracking branch 'origin/v3.x/staging' into reboot/zaas-s…
achmelo Jul 12, 2024
27a8056
define ZAAS variables in the workflow
achmelo Jul 12, 2024
623eac4
new apiml version
achmelo Jul 12, 2024
14641da
set native authorization provider as default
achmelo Jul 12, 2024
862f113
new version
achmelo Jul 12, 2024
bfefadb
sample ext
achmelo Jul 12, 2024
6d1ff80
value according to the schema
achmelo Jul 15, 2024
b104064
enable zaas x509
achmelo Jul 15, 2024
22bf284
enable certificate forwarding
achmelo Jul 16, 2024
4920e5c
define variable
achmelo Jul 16, 2024
1fac856
new apiml version
achmelo Jul 16, 2024
d044b05
debug log
achmelo Jul 16, 2024
bcf2ba9
new apiml version
achmelo Jul 17, 2024
ffa7f3c
update sample extension
achmelo Jul 17, 2024
50fc623
remove test for deprecated functionality
achmelo Jul 18, 2024
9d288ba
remove unused vars
achmelo Jul 18, 2024
96fc76e
switch normal snapshot versions
achmelo Jul 18, 2024
ed9a32c
rename missing variables
achmelo Jul 23, 2024
2c9c515
trigger pax build
Jul 23, 2024
785683f
set default port number for infinispan mode
achmelo Jul 24, 2024
0abda56
Merge remote-tracking branch 'origin/reboot/zaas-service' into reboot…
achmelo Jul 24, 2024
ae5c7c2
swap condition
achmelo Jul 24, 2024
d39dc3b
trigger pax build
Aug 1, 2024
b338165
init zaas-deployment yml
MarkAckert Aug 2, 2024
d2f9e92
update port and add service definition
MarkAckert Aug 5, 2024
cd6602a
fix urls, small formatting changes
MarkAckert Aug 6, 2024
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
2 changes: 1 addition & 1 deletion .pax/pre-packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ EOT
echo "[$SCRIPT_NAME] extract components"
mkdir -p "${BASE_DIR}/logs"
mkdir -p "${ZOWE_ROOT_DIR}/components"
for component in launcher zlux-core zss apiml-common-lib common-java-lib apiml-sample-extension gateway cloud-gateway caching-service discovery api-catalog explorer-jes explorer-mvs explorer-uss; do
for component in launcher zlux-core zss apiml-common-lib common-java-lib apiml-sample-extension zaas gateway caching-service discovery api-catalog explorer-jes explorer-mvs explorer-uss; do
echo "[$SCRIPT_NAME] - ${component}"
component_file=$(find "${ZOWE_ROOT_DIR}/files" -type f \( -name "${component}*.pax" -o -name "${component}*.zip" \) | head -n 1)
"${ZOWE_ROOT_DIR}/bin/zwe" \
Expand Down
1 change: 1 addition & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ These Zowe environment variables are created globally. Any Zowe components, exte
- `ZWE_ENABLED_COMPONENTS` is a list of components will be started in current HA instance.
- `ZWE_GATEWAY_HOST` contains domain name to access gateway internally.
- `ZWE_GATEWAY_SHARED_LIBS` contains a directory where gateway shared libraries are installed.
- `ZWE_ZAAS_SHARED_LIBS` contains a directory where zaas (Zowe Authentication and Authorization Service) libraries are installed.
- `ZWE_INSTALLED_COMPONENTS` is a list of all installed components.
- `ZWE_LAUNCH_COMPONENTS` is a list of enabled components for current HA instance and has start command defined.
- `ZWE_POD_CLUSTERNAME` indicates the current Kubernetes cluster name Zowe is running. This variable is only applicable when Zowe is running in Kubernetes.
Expand Down
24 changes: 19 additions & 5 deletions bin/commands/internal/start/prepare/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ prepare_workspace_directory() {
export ZWE_PRIVATE_WORKSPACE_ENV_DIR="${ZWE_zowe_workspaceDirectory}/.env"
export ZWE_STATIC_DEFINITIONS_DIR="${ZWE_zowe_workspaceDirectory}/api-mediation/api-defs"
export ZWE_GATEWAY_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/gateway/sharedLibs/"
export ZWE_ZAAS_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/zaas/sharedLibs/"
export ZWE_DISCOVERY_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/discovery/sharedLibs/"

mkdir -p "${ZWE_zowe_workspaceDirectory}"
Expand All @@ -88,9 +89,11 @@ prepare_workspace_directory() {

# create apiml static defs directory
mkdir -p "${ZWE_STATIC_DEFINITIONS_DIR}"
# create apiml gateway share library directory
# create apiml gateway shared libraries directory
mkdir -p "${ZWE_GATEWAY_SHARED_LIBS}"
# create apiml discovery share library directory
# create apiml zaas shared libraries directory
mkdir -p "${ZWE_ZAAS_SHARED_LIBS}"
# create apiml discovery shared libraries directory
mkdir -p "${ZWE_DISCOVERY_SHARED_LIBS}"

# Copy Zowe manifest into WORKSPACE_DIR so we know the version for support enquiries/migration
Expand Down Expand Up @@ -128,7 +131,7 @@ global_validate() {
validate_this "validate_node_home 2>&1" "zwe-internal-start-prepare,global_validate:${LINENO}"

# validate java for some core components
if [[ ${ZWE_ENABLED_COMPONENTS} == *"gateway"* || ${ZWE_ENABLED_COMPONENTS} == *"cloud-gateway"* || ${ZWE_ENABLED_COMPONENTS} == *"discovery"* || ${ZWE_ENABLED_COMPONENTS} == *"api-catalog"* || ${ZWE_ENABLED_COMPONENTS} == *"caching-service"* ]]; then
if [[ ${ZWE_ENABLED_COMPONENTS} == *"gateway"* || ${ZWE_ENABLED_COMPONENTS} == *"zaas"* || ${ZWE_ENABLED_COMPONENTS} == *"discovery"* || ${ZWE_ENABLED_COMPONENTS} == *"api-catalog"* || ${ZWE_ENABLED_COMPONENTS} == *"caching-service"* ]]; then
validate_this "validate_java_home 2>&1" "zwe-internal-start-prepare,global_validate:${LINENO}"
fi
else
Expand All @@ -142,8 +145,8 @@ global_validate() {
if [[ ${ZWE_ENABLED_COMPONENTS} == *"discovery"* ]]; then
validate_this "validate_zosmf_host_and_port \"${ZOSMF_HOST}\" \"${ZOSMF_PORT}\" 2>&1" "zwe-internal-start-prepare,global_validate:${LINENO}"
fi
elif [ "${ZWE_components_gateway_apiml_security_auth_provider}" = "zosmf" ]; then
validate_this "validate_zosmf_as_auth_provider \"${ZOSMF_HOST}\" \"${ZOSMF_PORT}\" \"${ZWE_components_gateway_apiml_security_auth_provider}\" 2>&1" "zwe-internal-start-prepare,global_validate:${LINENO}"
elif [ "${ZWE_components_zaas_apiml_security_auth_provider}" = "zosmf" ]; then
validate_this "validate_zosmf_as_auth_provider \"${ZOSMF_HOST}\" \"${ZOSMF_PORT}\" \"${ZWE_components_zaas_apiml_security_auth_provider}\" 2>&1" "zwe-internal-start-prepare,global_validate:${LINENO}"
fi

check_runtime_validation_result "zwe-internal-start-prepare,global_validate:${LINENO}"
Expand Down Expand Up @@ -266,6 +269,17 @@ configure_components() {
fi
fi

# - zaas shared lib
result=$(process_component_zaas_shared_libs "${component_dir}" 2>&1)
retval=$?
if [ -n "${result}" ]; then
if [ "${retval}" = "0" ]; then
print_formatted_debug "ZWELS" "zwe-internal-start-prepare,configure_components:${LINENO}" "${result}"
else
print_formatted_error "ZWELS" "zwe-internal-start-prepare,configure_components:${LINENO}" "${result}"
fi
fi

# - gateway shared lib
result=$(process_component_gateway_shared_libs "${component_dir}" 2>&1)
retval=$?
Expand Down
12 changes: 10 additions & 2 deletions bin/commands/internal/start/prepare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function globalValidate(enabledComponents:string[]): void {

// validate java for some core components
//TODO this should be a manifest parameter that you require java, not a hardcoded list. What if extensions require it?
if (enabledComponents.includes('gateway') || enabledComponents.includes('cloud-gateway') || enabledComponents.includes('discovery') || enabledComponents.includes('api-catalog') || enabledComponents.includes('caching-service')) {
if (enabledComponents.includes('gateway') || enabledComponents.includes('zaas') || enabledComponents.includes('discovery') || enabledComponents.includes('api-catalog') || enabledComponents.includes('caching-service')) {
let javaOk = java.validateJavaHome();
if (!javaOk) {
privateErrors++;
Expand All @@ -172,7 +172,7 @@ function globalValidate(enabledComponents:string[]): void {
privateErrors++;
common.printFormattedError('ZWELS', "zwe-internal-start-prepare,global_validate", "Zosmf validation failed");
}
} else if (std.getenv('ZWE_components_gateway_apiml_security_auth_provider') == "zosmf") {
} else if (std.getenv('ZWE_components_zaas_apiml_security_auth_provider') == "zosmf") {
let zosmfOk = zosmf.validateZosmfAsAuthProvider(zosmfHost, zosmfPort, 'zosmf');
if (!zosmfOk) {
privateErrors++;
Expand Down Expand Up @@ -318,6 +318,14 @@ function configureComponents(componentEnvironments?: any, enabledComponents?:str
} else {
common.printFormattedError("ZWELS", "zwe-internal-start-prepare,configure_components", `${componentName} processComponentAppfwPlugin failure`);
}

// zaas shared lib
success=component.processComponentZaasSharedLibs(componentDir);
if (success) {
common.printFormattedDebug("ZWELS", "zwe-internal-start-prepare,configure_components", `${componentName} processComponentZaasSharedLibs success`);
} else {
common.printFormattedError("ZWELS", "zwe-internal-start-prepare,configure_components", `${componentName} processComponentZaasSharedLibs failure`);
}

// - gateway shared lib
success=component.processComponentGatewaySharedLibs(componentDir);
Expand Down
24 changes: 13 additions & 11 deletions bin/commands/migrate/for/kubernetes/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ mkdir -p "${ZWE_PRIVATE_WORKSPACE_ENV_DIR}"
generate_instance_env_from_yaml_config convert-for-k8s
source_env "${ZWE_PRIVATE_WORKSPACE_ENV_DIR}/.instance-convert-for-k8s.env"
# prepare full SAN list for k8s
full_k8s_domain_list="${ZWE_CLI_PARAMETER_DOMAINS},localhost.localdomain,localhost,127.0.0.1,*.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.pod.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.discovery-service.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.gateway-service.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME}"
full_k8s_domain_list="${ZWE_CLI_PARAMETER_DOMAINS},localhost.localdomain,localhost,127.0.0.1,*.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.pod.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.discovery-service.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.gateway-service.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME},*.zaas-service.${ZWE_CLI_PARAMETER_K8S_NAMESPACE}.svc.${ZWE_CLI_PARAMETER_K8S_CLUSTER_NAME}"
original_zss_host="${ZWE_zowe_externalDomains_0}"
original_zss_port="${ZWE_components_zss_port}"

Expand Down Expand Up @@ -77,9 +77,9 @@ if [[ "${ZWE_zowe_certificate_keystore_type}" == JCE*KS ]]; then
ZWE_zowe_certificate_truststore_password="${ZWE_CLI_PARAMETER_PASSWORD}"

keystore_content=$(pkeytool -list \
-keystore "${ZWE_zowe_certificate_keystore_file}" \
-storepass "${ZWE_zowe_certificate_keystore_password}" \
-storetype "${ZWE_zowe_certificate_keystore_type}")
-keystore "${ZWE_zowe_certificate_keystore_file}" \
-storepass "${ZWE_zowe_certificate_keystore_password}" \
-storetype "${ZWE_zowe_certificate_keystore_type}")

ZWE_zowe_certificate_keystore_alias=
aliases=$(echo "${keystore_content}" | grep -i keyentry | awk -F, '{print $1}')
Expand Down Expand Up @@ -145,7 +145,7 @@ if [ "${ZWE_zowe_setup_certificate_type}" = "PKCS12" -a "${ZWE_zowe_verifyCertif
print_error_and_exit "Error ZWEL0169E: Failed to create certificate \"${ZWE_zowe_setup_certificate_pkcs12_name}\"." "" 169
fi
if [ ! -f "${temp_dir}/keystore/${ZWE_zowe_setup_certificate_pkcs12_name}/${ZWE_zowe_setup_certificate_pkcs12_name}.keystore.p12" ]; then
>&2 echo "Error: failed to generate keystore for Kubernetes"
echo >&2 "Error: failed to generate keystore for Kubernetes"
exit 1
fi

Expand Down Expand Up @@ -204,12 +204,14 @@ done

update_zowe_yaml "${temp_dir}/zowe.yaml" "zowe.externalPort" "${ZWE_CLI_PARAMETER_EXTERNAL_PORT}"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.gateway.port" "7554"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.zaas.port" "7563"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.discovery.port" "7553"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.api-catalog.port" "7552"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.caching-service.port" "7555"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.app-server.port" "7556"

update_zowe_yaml "${temp_dir}/zowe.yaml" "components.gateway.enabled" "true"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.zaas.enabled" "true"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.discovery.enabled" "true"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.api-catalog.enabled" "true"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.caching-service.enabled" "true"
Expand All @@ -218,13 +220,13 @@ update_zowe_yaml "${temp_dir}/zowe.yaml" "components.explorer-jes.enabled" "true
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.explorer-mvs.enabled" "true"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.explorer-uss.enabled" "true"

update_zowe_yaml "${temp_dir}/zowe.yaml" "components.gateway.apiml.security.x509.externalMapperUrl" ""
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.gateway.apiml.security.authorization.endpoint.url" ""
gateway_auth_provider=$(read_yaml "${temp_dir}/zowe.yaml" ".components.gateway.apiml.security.authorization.endpoint.provider")
if [ "${gateway_auth_provider}" != "" ]; then
print_message "Zowe APIML Gateway authorization provider is suggested to be empty when running in Kubernetes. 'native' is not supported off Z platform."
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.zaas.apiml.security.x509.externalMapperUrl" ""
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.zaas.apiml.security.authorization.endpoint.url" ""
zaas_auth_provider=$(read_yaml "${temp_dir}/zowe.yaml" ".components.zaas.apiml.security.authorization.endpoint.provider")
if [ "${zaas_auth_provider}" != "" ]; then
print_message "Zowe APIML ZAAS authorization provider is suggested to be empty when running in Kubernetes. 'native' is not supported off Z platform."
fi
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.gateway.apiml.security.authorization.endpoint.provider" ""
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.zaas.apiml.security.authorization.endpoint.provider" ""
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.discovery.replicas" "1"
update_zowe_yaml "${temp_dir}/zowe.yaml" "components.caching-service.storage.mode" ""

Expand Down
2 changes: 1 addition & 1 deletion bin/libs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,6 @@ std.setenv('ZWE_PRIVATE_DEFAULT_ZIS_USER', 'ZWESIUSR');
std.setenv('ZWE_PRIVATE_DEFAULT_ZOWE_STC', 'ZWESLSTC');
std.setenv('ZWE_PRIVATE_DEFAULT_ZIS_STC', 'ZWESISTC');
std.setenv('ZWE_PRIVATE_DEFAULT_AUX_STC', 'ZWESASTC');
std.setenv('ZWE_PRIVATE_CORE_COMPONENTS_REQUIRE_JAVA', 'gateway,cloud-gateway,discovery,api-catalog,caching-service');
std.setenv('ZWE_PRIVATE_CORE_COMPONENTS_REQUIRE_JAVA', 'gateway,zaas,discovery,api-catalog,caching-service');

std.setenv('ZWE_PRIVATE_CLI_LIBRARY_LOADED', 'true');
67 changes: 66 additions & 1 deletion bin/libs/component.sh
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,72 @@ process_component_appfw_plugin() {
fi
}

###############################
# Parse and process manifest Gateway Shared Libs (gatewaySharedLibs) definitions
#
# The supported manifest entry is ".gatewaySharedLibs". All shared libs
# defined will be passed to install-app.sh for proper installation.
#
# Note: this function requires node, which means NODE_HOME should have been defined,
# and ensure_node_is_on_path should have been executed.
#
# @param string component directory
process_component_zaas_shared_libs() {
component_dir="${1}"

# make sure $ZWE_ZAAS_SHARED_LIBS exists
mkdir -p "${ZWE_ZAAS_SHARED_LIBS}"

all_succeed=true
iterator_index=0
plugin_name=
zaas_shared_libs_workspace_path=
zaas_shared_libs_path=$(read_component_manifest "${component_dir}" ".zaasSharedLibs[${iterator_index}]" 2>/dev/null)
while [ -n "${zaas_shared_libs_path}" ]; do
cd "${component_dir}"

if [ -z "${plugin_name}" ]; then
# prepare plugin directory
plugin_name=$(read_component_manifest "${component_dir}" ".name" 2>/dev/null)
if [ -z "${plugin_name}" ]; then
print_error "Cannot read name from the plugin ${component_dir}"
all_succeed=false
break
fi
zaas_shared_libs_workspace_path="${ZWE_ZAAS_SHARED_LIBS}/${plugin_name}"
mkdir -p "${zaas_shared_libs_workspace_path}"
fi

# copy manifest to workspace
component_manifest=$(get_component_manifest "${component_dir}")
if [ ! -z "${component_manifest}" -a -f "${component_manifest}" ]; then
cp "${component_manifest}" "${zaas_shared_libs_workspace_path}"
fi

# copy libraries to workspace/zaas/sharedLibs/<plugin-id>
# Due to limitation of how Java loading shared libraries, all jars are copied to plugin root directly.
if [ -f "${zaas_shared_libs_path}" ]; then
cp "${zaas_shared_libs_path}" "${zaas_shared_libs_workspace_path}"
elif [ -d "${zaas_shared_libs_path}" ]; then
find "${zaas_shared_libs_path}" -type f | xargs -I{} cp {} "${zaas_shared_libs_workspace_path}"
else
print_error "Zaas shared libs directory ${zaas_shared_libs_path} is not accessible"
all_succeed=false
break
fi

iterator_index=`expr $iterator_index + 1`
zaas_shared_libs_path=$(read_component_manifest "${component_dir}" ".zaasSharedLibs[${iterator_index}]" 2>/dev/null)
done

if [ "${all_succeed}" = "true" ]; then
return 0
else
# error message should have be echoed before this
return 1
fi
}

###############################
# Parse and process manifest Gateway Shared Libs (gatewaySharedLibs) definitions
#
Expand All @@ -695,7 +761,6 @@ process_component_gateway_shared_libs() {

# make sure $ZWE_GATEWAY_SHARED_LIBS exists
mkdir -p "${ZWE_GATEWAY_SHARED_LIBS}"

all_succeed=true
iterator_index=0
plugin_name=
Expand Down
51 changes: 50 additions & 1 deletion bin/libs/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,57 @@ export function processComponentAppfwPlugin(componentDir: string): boolean {
}

/*
Parse and process manifest Gateway Shared Libs (gatewaySharedLibs) definitions
Parse and process manifest Zaas Shared Libs (zaasSharedLibs) definitions
The supported manifest entry is ".zaasSharedLibs". All shared libs
defined will be passed to install-app.sh for proper installation.
*/
export function processComponentZaasSharedLibs(componentDir: string): boolean {
const zaasSharedLibs = std.getenv('ZWE_ZAAS_SHARED_LIBS');
fs.mkdirp(zaasSharedLibs, 0o770);

const manifest = getManifest(componentDir);
let pluginName;
let zaasSharedLibsWorkspacePath:string|undefined;

if (manifest && manifest.zaasSharedLibs) {
for (let i = 0; i < manifest.zaasSharedLibs.length; i++) {
const zaasSharedLibsDef = manifest.zaasSharedLibs[i];
const fileOrDir=`${componentDir}/${zaasSharedLibsDef}`;
if (!pluginName) {
pluginName = manifest.name;
if (!pluginName) {
common.printError(`Cannot read name from the plugin ${componentDir}`);
return false;
}
zaasSharedLibsWorkspacePath = `${zaasSharedLibs}/${pluginName}`;
fs.mkdirp(zaasSharedLibsWorkspacePath, 0o770);
}

if (!zaasSharedLibsWorkspacePath){
common.printError("Unexpected error: did not find zaasSharedLibsWorkspacePath");
return false;
}

const manifestPath = getManifestPath(componentDir);
if (manifestPath){
fs.cp(manifestPath, zaasSharedLibsWorkspacePath);
}

if (fs.fileExists(fileOrDir)) {
fs.cp(fileOrDir, zaasSharedLibsWorkspacePath);
} else if (fs.directoryExists(fileOrDir)) {
fs.cp(`${fileOrDir}/\*`, zaasSharedLibsWorkspacePath);
} else {
common.printError(`Zaas shared libs directory ${fileOrDir} is not accessible`);
return false;
}
}
}
return true;
}

/*
Parse and process manifest Gateway Shared Libs (gatewaySharedLibs) definitions
The supported manifest entry is ".gatewaySharedLibs". All shared libs
defined will be passed to install-app.sh for proper installation.
*/
Expand Down
1 change: 1 addition & 0 deletions bin/libs/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ load_environment_variables() {
export ZWE_PRIVATE_WORKSPACE_ENV_DIR="${ZWE_zowe_workspaceDirectory}/.env"
export ZWE_STATIC_DEFINITIONS_DIR="${ZWE_zowe_workspaceDirectory}/api-mediation/api-defs"
export ZWE_GATEWAY_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/gateway/sharedLibs/"
export ZWE_ZAAS_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/zaas/sharedLibs/"
export ZWE_DISCOVERY_SHARED_LIBS="${ZWE_zowe_workspaceDirectory}/discovery/sharedLibs/"

# now we can load all variables
Expand Down
1 change: 1 addition & 0 deletions bin/libs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export function loadEnvironmentVariables(componentId?: string) {
std.setenv('ZWE_PRIVATE_WORKSPACE_ENV_DIR', zwePrivateWorkspaceEnvDir);
std.setenv('ZWE_STATIC_DEFINITIONS_DIR', `${workspaceDirectory}/api-mediation/api-defs`);
std.setenv('ZWE_GATEWAY_SHARED_LIBS', `${workspaceDirectory}/gateway/sharedLibs/`);
std.setenv('ZWE_ZAAS_SHARED_LIBS', `${workspaceDirectory}/zaas/sharedLibs/`);
std.setenv('ZWE_DISCOVERY_SHARED_LIBS', `${workspaceDirectory}/discovery/sharedLibs/`);

// now we can load all variables
Expand Down
2 changes: 1 addition & 1 deletion bin/libs/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export ZWE_PRIVATE_DEFAULT_ZIS_USER=ZWESIUSR
export ZWE_PRIVATE_DEFAULT_ZOWE_STC=ZWESLSTC
export ZWE_PRIVATE_DEFAULT_ZIS_STC=ZWESISTC
export ZWE_PRIVATE_DEFAULT_AUX_STC=ZWESASTC
export ZWE_PRIVATE_CORE_COMPONENTS_REQUIRE_JAVA=gateway,cloud-gateway,discovery,api-catalog,caching-service
export ZWE_PRIVATE_CORE_COMPONENTS_REQUIRE_JAVA=zaas,gateway,discovery,api-catalog,caching-service

. "${ZWE_zowe_runtimeDirectory}/bin/libs/certificate.sh"
. "${ZWE_zowe_runtimeDirectory}/bin/libs/container.sh"
Expand Down
5 changes: 5 additions & 0 deletions containers/kubernetes/samples/config-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ data:
port: 7554
debug: false

zaas:
enabled: true
port: 7563
debug: false

discovery:
enabled: true
port: 7553
Expand Down
Loading
Loading