diff --git a/gradle.properties b/gradle.properties index ab0af593..479d361c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ artifactoryPublishingMavenRepo=https://gizaartifactory.jfrog.io/gizaartifactory/ artifactoryPublishingMavenSnapshotRepo=https://gizaartifactory.jfrog.io/gizaartifactory/libs-snapshot-local # Artifacts version -version=0.2.6 +version=0.2.7 defaultSpringBootVersion=2.0.2.RELEASE defaultSpringBootCloudVersion=2.0.0.RELEASE diff --git a/jobs-zowe-server-package/build.gradle b/jobs-zowe-server-package/build.gradle index f3813f77..965e1d76 100644 --- a/jobs-zowe-server-package/build.gradle +++ b/jobs-zowe-server-package/build.gradle @@ -20,13 +20,14 @@ task packageJobsApiServer(type: Zip) { } into('scripts/') { - from "$buildDir/convert/jobs-api-server-start.sh" + from "$buildDir/convert/jobs-api-start.sh", "$buildDir/convert/jobs-api-configure.sh" } } packageJobsApiServer.doFirst { List scriptFiles = new ArrayList() {{ - add(file('src/main/resources/scripts/jobs-api-server-start.sh')); + add(file('src/main/resources/scripts/jobs-api-start.sh')); + add(file('src/main/resources/scripts/jobs-api-configure.sh')); }}; for (File scriptFile : scriptFiles){ def inputStream = new InputStreamReader(new FileInputStream(scriptFile), "ISO-8859-1"); diff --git a/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-configure.sh b/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-configure.sh new file mode 100644 index 00000000..37d9ca70 --- /dev/null +++ b/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-configure.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +################################################################################ +# This program and the accompanying materials are made available under the terms of the +# Eclipse Public License v2.0 which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-v20.html +# +# SPDX-License-Identifier: EPL-2.0 +# +# Copyright IBM Corporation 2019 +################################################################################ + +# Add static definition for jobs-api +cat <${STATIC_DEF_CONFIG_DIR}/jobs-api.ebcidic.yml +# +services: + - serviceId: jobs + title: IBM z/OS Jobs + description: IBM z/OS Jobs REST API service + catalogUiTileId: jobs + instanceBaseUrls: + - https://${ZOWE_EXPLORER_HOST}:${JOBS_API_PORT}/ + homePageRelativeUrl: + routedServices: + - gatewayUrl: api/v1 + serviceRelativeUrl: api/v1/jobs + apiInfo: + - apiId: com.ibm.jobs + gatewayUrl: api/v1 + version: 1.0.0 + documentationUrl: https://${ZOWE_EXPLORER_HOST}:${JOBS_API_PORT}/swagger-ui.html +catalogUiTiles: + jobs: + title: z/OS Jobs services + description: IBM z/OS Jobs REST services +EOF +iconv -f IBM-1047 -t IBM-850 ${STATIC_DEF_CONFIG_DIR}/jobs-api.ebcidic.yml > $STATIC_DEF_CONFIG_DIR/jobs-api.yml +rm ${STATIC_DEF_CONFIG_DIR}/jobs-api.ebcidic.yml +chmod 770 $STATIC_DEF_CONFIG_DIR/jobs-api.yml + +#Make sure Java is available on the path - TODO needed at all, move to a all zowe setup/validate? +export JAVA_HOME=$ZOWE_JAVA_HOME +if [[ ":$PATH:" == *":$JAVA_HOME/bin:"* ]]; then + echo "ZOWE_JAVA_HOME already exists on the PATH" +else + echo "Appending ZOWE_JAVA_HOME/bin to the PATH..." + export PATH=$PATH:$JAVA_HOME/bin + echo "Done." +fi \ No newline at end of file diff --git a/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-server-start.sh b/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-server-start.sh deleted file mode 100644 index 662e07a1..00000000 --- a/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-server-start.sh +++ /dev/null @@ -1,31 +0,0 @@ -# Variables to be replaced: -# - JAVA_SETUP -- sets JAVA_HOME by ZOWE_JAVA_HOME -# - SERVER_PORT - The port the jobs server will use -# - KEYSTORE - The keystore to use for SSL certificates -# - KEYSTORE_PASSWORD - The password to access the keystore supplied by KEYSTORE -# - KEY_ALIAS - The alias of the key within the keystore -# - ZOSMF_HTTPS_PORT - The SSL port z/OSMF is listening on. -# - ZOSMF_IP - The IP Address z/OSMF can be reached - -**JAVA_SETUP** -if [[ ":$PATH:" == *":$JAVA_HOME/bin:"* ]]; then - echo "ZOWE_JAVA_HOME already exists on the PATH" -else - echo "Appending ZOWE_JAVA_HOME/bin to the PATH..." - export PATH=$PATH:$JAVA_HOME/bin - echo "Done." -fi - -DIR=`dirname $0` - -java -Xms16m -Xmx512m -Dibm.serversocket.recover=true -Dfile.encoding=UTF-8 \ - -Djava.io.tmpdir=/tmp -Xquickstart \ - -Dserver.port=**SERVER_PORT** \ - -Dserver.ssl.keyAlias=**KEY_ALIAS** \ - -Dserver.ssl.keyStore=**KEYSTORE** \ - -Dserver.ssl.keyStorePassword=**KEYSTORE_PASSWORD** \ - -Dserver.ssl.keyStoreType=PKCS12 \ - -Dzosmf.httpsPort=**ZOSMF_HTTPS_PORT** \ - -Dzosmf.ipAddress=**ZOSMF_IP** \ - -Dspring.main.banner-mode=off \ - -jar $DIR/../**JOBS_JAR** & diff --git a/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-start.sh b/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-start.sh new file mode 100644 index 00000000..2e01f3b1 --- /dev/null +++ b/jobs-zowe-server-package/src/main/resources/scripts/jobs-api-start.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +################################################################################ +# This program and the accompanying materials are made available under the terms of the +# Eclipse Public License v2.0 which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-v20.html +# +# SPDX-License-Identifier: EPL-2.0 +# +# Copyright IBM Corporation 2018, 2019 +################################################################################ + +# Variables required on shell: +# - ZOWE_PREFIX +# - JOBS_API_PORT - The port the data sets server will use +# - KEY_ALIAS +# - KEYSTORE - The keystore to use for SSL certificates +# - KEYSTORE_PASSWORD - The password to access the keystore supplied by KEYSTORE +# - KEY_ALIAS - The alias of the key within the keystore +# - ZOSMF_PORT - The SSL port z/OSMF is listening on. +# - ZOSMF_IP_ADDRESS - The IP Address z/OSMF can be reached + +COMPONENT_CODE=EJ +_BPX_JOBNAME=${ZOWE_PREFIX}${COMPONENT_CODE} java -Xms16m -Xmx512m -Dibm.serversocket.recover=true -Dfile.encoding=UTF-8 \ + -Djava.io.tmpdir=/tmp -Xquickstart \ + -Dserver.port=${JOBS_API_PORT} \ + -Dserver.ssl.keyAlias=${KEY_ALIAS} \ + -Dserver.ssl.keyStore=${KEYSTORE} \ + -Dserver.ssl.keyStorePassword=${KEYSTORE_PASSWORD} \ + -Dserver.ssl.keyStoreType=PKCS12 \ + -Dzosmf.httpsPort=${ZOSMF_PORT} \ + -Dzosmf.ipAddress=${ZOSMF_IP_ADDRESS} \ + -jar {{jar_path}} &