From: Roland Häder Date: Thu, 6 Feb 2020 11:39:46 +0000 (+0100) Subject: Updated to "latest" Payara 4.1 build: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b0e3aa6e3090e76003989397db62420499a6e644;p=payara-vagrant.git Updated to "latest" Payara 4.1 build: - removed no longer available 15x releases - removed PRE-RELEASE - added 4.1.2.181 release Signed-off-by: Roland Häder --- diff --git a/payara_service-4.1.151 b/payara_service-4.1.151 deleted file mode 100644 index 190ff63..0000000 --- a/payara_service-4.1.151 +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Basic Payara service -# - -PAYARA_HOME=/opt/payara/payara-4.1.151/payara41 -export PAYARA_HOME - - - -start() { - echo -n "Starting Payara: " - $PAYARA_HOME/bin/asadmin start-domain $1 -} - -stop() { - echo -n "Stopping Payara: " - $PAYARA_HOME/bin/asadmin stop-domain $1 -} - - -case "$1" in -start) - start ${2:-payaradomain} - ;; -stop) - stop ${2:-payaradomain} - ;; -restart) - $PAYARA_HOME/bin/asadmin restart-domain >/dev/null - ;; -\*) - echo "usage: $0 (start|stop|restart|help)" -esac diff --git a/payara_service-4.1.152 b/payara_service-4.1.152 deleted file mode 100644 index 505edc6..0000000 --- a/payara_service-4.1.152 +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Basic Payara service -# - -PAYARA_HOME=/opt/payara/payara-4.1.152/payara41 -export PAYARA_HOME - - - -start() { - echo -n "Starting Payara: " - $PAYARA_HOME/bin/asadmin start-domain $1 -} - -stop() { - echo -n "Stopping Payara: " - $PAYARA_HOME/bin/asadmin stop-domain $1 -} - - -case "$1" in -start) - start ${2:-payaradomain} - ;; -stop) - stop ${2:-payaradomain} - ;; -restart) - $PAYARA_HOME/bin/asadmin restart-domain >/dev/null - ;; -\*) - echo "usage: $0 (start|stop|restart|help)" -esac diff --git a/payara_service-4.1.153 b/payara_service-4.1.153 deleted file mode 100644 index 15d884a..0000000 --- a/payara_service-4.1.153 +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Basic Payara service -# - -PAYARA_HOME=/opt/payara/payara-4.1.153/payara41 -export PAYARA_HOME - - - -start() { - echo -n "Starting Payara: " - $PAYARA_HOME/bin/asadmin start-domain $1 -} - -stop() { - echo -n "Stopping Payara: " - $PAYARA_HOME/bin/asadmin stop-domain $1 -} - - -case "$1" in -start) - start ${2:-payaradomain} - ;; -stop) - stop ${2:-payaradomain} - ;; -restart) - $PAYARA_HOME/bin/asadmin restart-domain >/dev/null - ;; -\*) - echo "usage: $0 (start|stop|restart|help)" -esac diff --git a/payara_service-4.1.2.181 b/payara_service-4.1.2.181 new file mode 100644 index 0000000..a3467c5 --- /dev/null +++ b/payara_service-4.1.2.181 @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Basic Payara service +# + +export PAYARA_HOME="/opt/payara/payara-4.1.2.181/payara41" + +startDomain() { + echo -n "Starting Payara: '$1' " + ${PAYARA_HOME}/bin/asadmin start-domain "$1" +} + +stopDomain() { + echo -n "Stopping Payara: '$1' " + ${PAYARA_HOME}/bin/asadmin stop-domain "$1" +} + + +case "$1" in +start) + startDomain "${2:-payaradomain}" + ;; +stop) + stopDomain "${2:-payaradomain}" + ;; +restart) + ${PAYARA_HOME}/bin/asadmin restart-domain >/dev/null + ;; +\*) + echo "usage: $0 (start|stop|restart|help)" +esac diff --git a/payara_service-PRE-RELEASE b/payara_service-PRE-RELEASE deleted file mode 100644 index 15d884a..0000000 --- a/payara_service-PRE-RELEASE +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Basic Payara service -# - -PAYARA_HOME=/opt/payara/payara-4.1.153/payara41 -export PAYARA_HOME - - - -start() { - echo -n "Starting Payara: " - $PAYARA_HOME/bin/asadmin start-domain $1 -} - -stop() { - echo -n "Stopping Payara: " - $PAYARA_HOME/bin/asadmin stop-domain $1 -} - - -case "$1" in -start) - start ${2:-payaradomain} - ;; -stop) - stop ${2:-payaradomain} - ;; -restart) - $PAYARA_HOME/bin/asadmin restart-domain >/dev/null - ;; -\*) - echo "usage: $0 (start|stop|restart|help)" -esac diff --git a/provision.sh b/provision.sh index d5eaccc..6052d4d 100644 --- a/provision.sh +++ b/provision.sh @@ -9,74 +9,31 @@ JDK="OPENJDK" # Payara Version -PAYARA_VERSION=4.1.1.154 +PAYARA_VERSION="4.1.2.181" # Payara directory -PAYARA_HOME=/opt/payara/payara-$PAYARA_VERSION +PAYARA_HOME="/opt/payara/payara-${PAYARA_VERSION}" # Payara Edition URLs -case "$PAYARA_VERSION" in - 4.1.151) - FULL=http://bit.ly/1CGCtI9 - WEB=http://bit.ly/1DmWTUY - MINIMAL=http://bit.ly/163XP6f - EMBEDDED_FULL=http://bit.ly/1zG59ls - EMBEDDED_WEB=http://bit.ly/1KdVP87 - EMBEDDED_NUCLEUS=http://bit.ly/1ydQTKw - MULTI_LANGUAGE_FULL=https://bit.ly/1zv1YeB - MULTI_LANGUAGE_WEB=https://bit.ly/1wVXaZ - ;; - 4.1.152) - # The below links are to 4.1.152 Patch 1 - FULL=http://bit.ly/1czs5bH - WEB=http://bit.ly/1A2mXrq - MINIMAL=http://bit.ly/1ICWv9p - MICRO=http://bit.ly/1EFXzEA - EMBEDDED_FULL=http://bit.ly/1A21MpQ - EMBEDDED_WEB=http://bit.ly/1KMzD61 - MULTI_LANGUAGE_FULL=http://bit.ly/1H4SrdQ - MULTI_LANGUAGE_WEB=http://bit.ly/1G8NKnd - ;; - 4.1.153) - # The below links are to 4.1.153 - FULL=http://bit.ly/1I4tz9r - WEB=http://bit.ly/1IaXo67 - MINIMAL=http://bit.ly/1OQGy0K - MICRO=http://bit.ly/1JTP36N - EMBEDDED_FULL=http://bit.ly/1h7MeZ6 - EMBEDDED_WEB=http://bit.ly/1DS74QT - MULTI_LANGUAGE_FULL=http://bit.ly/1Sk4NKm - MULTI_LANGUAGE_WEB=http://bit.ly/1H6pcXw - ;; - 4.1.1.154) - # The below links are to 4.1.1.154 - FULL=http://bit.ly/1Gm0GIw - WEB=http://bit.ly/1S0EEMI - MINIMAL=http://bit.ly/1LrpLAz - MICRO=http://bit.ly/1W9d2Lb - EMBEDDED_FULL=http://bit.ly/1W8PyAw - EMBEDDED_WEB=http://bit.ly/1Ktz9zG - MULTI_LANGUAGE_FULL=http://bit.ly/1i0pKJm - MULTI_LANGUAGE_WEB=http://bit.ly/1NXOVus - ;; - PRE-RELEASE) - # The below links are to the latest successful build - FULL=http://payara.co.s3-website-eu-west-1.amazonaws.com/payara-prerelease.zip - WEB=http://payara.co.s3-website-eu-west-1.amazonaws.com/payara-web-prerelease.zip - MINIMAL=http://payara.co.s3-website-eu-west-1.amazonaws.com/payara-minimal-prerelease.zip - MICRO=https://s3-eu-west-1.amazonaws.com/payara.co/payara-micro-prerelease.jar - EMBEDDED_FULL=http://payara.co.s3-website-eu-west-1.amazonaws.com/payara-embedded-all-prerelease.jar - EMBEDDED_WEB=http://payara.co.s3-website-eu-west-1.amazonaws.com/payara-embedded-web-prerelease.jar - MULTI_LANGUAGE_FULL=https://s3-eu-west-1.amazonaws.com/payara.co/payara-ml-prerelease.zip - MULTI_LANGUAGE_WEB=https://s3-eu-west-1.amazonaws.com/payara.co/payara-web-ml-prerelease.zip +case "${PAYARA_VERSION}" in + 4.1.2.181) + # The below links are to 4.1.2.181 + FULL=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/4.1.2.181/payara-4.1.2.181.zip + WEB=https://search.maven.org/remotecontent?filepath=fish/payara/blue/distributions/payara-web/4.1.2.181/payara-web-4.1.2.181.zip + MINIMAL= + MICRO= + EMBEDDED_FULL= + EMBEDDED_WEB= + MULTI_LANGUAGE_FULL=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-ml/4.1.2.181/payara-ml-4.1.2.181.zip + MULTI_LANGUAGE_WEB=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-web-ml/4.1.2.181/payara-web-ml-4.1.2.181.zip ;; \*) echo "unknown version number" esac # Payara edition (Full, Web, Micro, etc., from above list) -PAYARA_ED=$WEB +PAYARA_ED=${FULL} # # @@ -123,21 +80,21 @@ installPayara() { wget -q $PAYARA_ED -O temp.zip > /dev/null # Download Payara mkdir -p $PAYARA_HOME # Make dirs for Payara unzip -qq temp.zip -d $PAYARA_HOME # unzip Payara to dir - rm temp.zip # cleanup temp file - - echo "Enabling secure admin mode for domains (u/p = admin/payara0payara)" - PWDFILE=/tmp/pwdfile - DOMAINS_DIR="${PAYARA_HOME}/payara41/glassfish/domains" - echo "AS_ADMIN_PASSWORD=payara0payara" > ${PWDFILE} - for DOMAIN in domain1 payaradomain; do - echo "admin;{SSHA256}Rzyr/2/C1Zv+iZyIn/VnL0zDYESs8nTH8t/OMlOpazehMGn5L9ejkg==;asadmin" > "${DOMAINS_DIR}/${DOMAIN}/config/admin-keyfile" - ${PAYARA_HOME}/payara41/bin/asadmin start-domain ${DOMAIN} - ${PAYARA_HOME}/payara41/bin/asadmin --user admin --passwordfile "${PWDFILE}" enable-secure-admin - ${PAYARA_HOME}/payara41/bin/asadmin stop-domain ${DOMAIN} - done - rm "${PWDFILE}" - - echo "Setting ownership of ${PAYARA_HOME} content" + rm temp.zip # cleanup temp file + + echo "Enabling secure admin mode for domains (u/p = admin/payara0payara)" + PWDFILE=/tmp/pwdfile + DOMAINS_DIR="${PAYARA_HOME}/payara41/glassfish/domains" + echo "AS_ADMIN_PASSWORD=payara0payara" > ${PWDFILE} + for DOMAIN in domain1 payaradomain; do + echo "admin;{SSHA256}Rzyr/2/C1Zv+iZyIn/VnL0zDYESs8nTH8t/OMlOpazehMGn5L9ejkg==;asadmin" > "${DOMAINS_DIR}/${DOMAIN}/config/admin-keyfile" + ${PAYARA_HOME}/payara41/bin/asadmin start-domain ${DOMAIN} + ${PAYARA_HOME}/payara41/bin/asadmin --user admin --passwordfile "${PWDFILE}" enable-secure-admin + ${PAYARA_HOME}/payara41/bin/asadmin stop-domain ${DOMAIN} + done + rm "${PWDFILE}" + + echo "Setting ownership of ${PAYARA_HOME} content" chown -R vagrant:vagrant $PAYARA_HOME # Make sure vagrant owns dir } @@ -145,10 +102,10 @@ installPayara() { # Copy startup script, and create service installService() { echo "installing startup scripts" - mkdir -p $PAYARA_HOME/startup # Make dirs for Payara - cp /vagrant/payara_service-$PAYARA_VERSION $PAYARA_HOME/startup/ - chmod +x $PAYARA_HOME/startup/payara_service-$PAYARA_VERSION - ln -s $PAYARA_HOME/startup/payara_service-$PAYARA_VERSION /etc/init.d/payara + mkdir -p ${PAYARA_HOME}/startup # Make dirs for Payara + cp /vagrant/payara_service-${PAYARA_VERSION} ${PAYARA_HOME}/startup/ + chmod +x ${PAYARA_HOME}/startup/payara_service-${PAYARA_VERSION} + ln -s ${PAYARA_HOME}/startup/payara_service-${PAYARA_VERSION} /etc/init.d/payara echo "Adding payara system startup..." update-rc.d payara defaults > /dev/null @@ -156,20 +113,8 @@ installService() { echo "starting Payara..." # Explicitly start payaradomain by default - case "$PAYARA_VERSION" in - 4.1.151) - su - vagrant -c 'service payara start domain1' - ;; - 4.1.152) - su - vagrant -c 'service payara start payaradomain' - ;; - 4.1.153) - su - vagrant -c 'service payara start payaradomain' - ;; - 4.1.1.154) - su - vagrant -c 'service payara start payaradomain' - ;; - PRE-RELEASE) + case "${PAYARA_VERSION}" in + 4.1.2.181) su - vagrant -c 'service payara start payaradomain' ;; /*) @@ -188,9 +133,9 @@ fi installPayara -if [ $PAYARA_ED = $WEB ] || - [ $PAYARA_ED = $FULL ] || - [ $PAYARA_ED = $MULTI_LANGUAGE_FULL ] || - [ $PAYARA_ED = $MULTI_LANGUAGE_WEB ]; then +if [ ${PAYARA_ED} = ${WEB} ] || + [ ${PAYARA_ED} = ${FULL} ] || + [ ${PAYARA_ED} = ${MULTI_LANGUAGE_FULL} ] || + [ ${PAYARA_ED} = ${MULTI_LANGUAGE_WEB} ]; then installService fi