Greatly updates scripts/shell/job/gp/install-gp.sh script
This commit is contained in:
@@ -7,6 +7,7 @@ show_help() {
|
|||||||
echo " --version | --version (Required) Specify the GP version to install"
|
echo " --version | --version (Required) Specify the GP version to install"
|
||||||
echo " --no-download true | --no-dl true (Optional) Make the script not download the files from Artifactory"
|
echo " --no-download true | --no-dl true (Optional) Make the script not download the files from Artifactory"
|
||||||
echo " --no-webmap true | --no-wm true (Optional) Make the script not install the WebMap module"
|
echo " --no-webmap true | --no-wm true (Optional) Make the script not install the WebMap module"
|
||||||
|
echo " --no-gp true | --no-gp true (Optional) Make the script not install GP"
|
||||||
echo " --install-apache true (Optional) Make the script install the Apache dependency for WebMap module"
|
echo " --install-apache true (Optional) Make the script install the Apache dependency for WebMap module"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ version=''
|
|||||||
should_download=true
|
should_download=true
|
||||||
should_install_webmap=true
|
should_install_webmap=true
|
||||||
should_install_apache=false
|
should_install_apache=false
|
||||||
|
should_install_gp=true
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -21,11 +23,18 @@ while [ "$#" -gt 0 ]; do
|
|||||||
--version|-v) version="$2"; shift 2;;
|
--version|-v) version="$2"; shift 2;;
|
||||||
--no-download|--no-dl) should_download=false; shift 2;;
|
--no-download|--no-dl) should_download=false; shift 2;;
|
||||||
--no-webmap|--no-wm) should_install_webmap=false; shift 2;;
|
--no-webmap|--no-wm) should_install_webmap=false; shift 2;;
|
||||||
|
--no-gp|--no-gp) should_install_gp=false; shift 2;;
|
||||||
--install-apache) should_install_apache=true; shift 2;;
|
--install-apache) should_install_apache=true; shift 2;;
|
||||||
*) shift ;;
|
*) shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z "$version" ]; then
|
||||||
|
echo "You must specify the package version!"
|
||||||
|
echo "Example: `basename "$0"` --version 12.0.0.0.0-SNAPSHOT"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
root_dir=`pwd`
|
root_dir=`pwd`
|
||||||
|
|
||||||
if [ `basename $root_dir` != "$version" ]; then
|
if [ `basename $root_dir` != "$version" ]; then
|
||||||
@@ -37,12 +46,6 @@ fi
|
|||||||
|
|
||||||
scripts_folder=$HOME/repos/personal/personal-devboot/scripts/shell/job/gp
|
scripts_folder=$HOME/repos/personal/personal-devboot/scripts/shell/job/gp
|
||||||
|
|
||||||
if [ -z "$version" ]; then
|
|
||||||
echo "You must specify the package version!"
|
|
||||||
echo "Example: `basename "$0"` --version 12.0.0.0.0-SNAPSHOT"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "$scripts_folder" ]; then
|
if [ ! -d "$scripts_folder" ]; then
|
||||||
echo "The git repository \"CloudAlb/personal-devboot\" must be in the \"~/repos\" folder!"
|
echo "The git repository \"CloudAlb/personal-devboot\" must be in the \"~/repos\" folder!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -126,57 +129,59 @@ fi
|
|||||||
# cpqd-msgs-map-1.8.7-RC02-bin.zip cpqd-msgs-package-1.8.7-RC02-bin.zip wildfly-15.0.0.Final.zip wildfly-8.2.1.zip
|
# cpqd-msgs-map-1.8.7-RC02-bin.zip cpqd-msgs-package-1.8.7-RC02-bin.zip wildfly-15.0.0.Final.zip wildfly-8.2.1.zip
|
||||||
cp /l/disk0/mbrunhara/gp/zips/* .
|
cp /l/disk0/mbrunhara/gp/zips/* .
|
||||||
|
|
||||||
# creating folders
|
if $should_install_gp; then
|
||||||
mkdir -p cpqd-folders/audit cpqd-folders/exportacoes cpqd-folders/updater cpqd-folders/dataloader cpqd-folders/virtualdisk
|
# creating folders
|
||||||
|
mkdir -p cpqd-folders/audit cpqd-folders/exportacoes cpqd-folders/updater cpqd-folders/dataloader cpqd-folders/virtualdisk
|
||||||
|
|
||||||
# unpacking files
|
# unpacking files
|
||||||
unzip -qq wildfly-8.2.1.zip
|
unzip -qq wildfly-8.2.1.zip
|
||||||
find wildfly-8.2.1 -type f -name '*.sh' -exec chmod +x {} \;
|
find wildfly-8.2.1 -type f -name '*.sh' -exec chmod +x {} \;
|
||||||
|
|
||||||
unzip -qq -d wildfly-configurator cpqd-etics-configurator-appserver-wildfly*
|
unzip -qq -d wildfly-configurator cpqd-etics-configurator-appserver-wildfly*
|
||||||
chmod +x wildfly-configurator/configurator/bin/setup.sh
|
chmod +x wildfly-configurator/configurator/bin/setup.sh
|
||||||
|
|
||||||
wildfly-configurator/configurator/bin/setup.sh
|
wildfly-configurator/configurator/bin/setup.sh
|
||||||
|
|
||||||
# doing this again to add permissions for newly created files by configurator
|
# doing this again to add permissions for newly created files by configurator
|
||||||
find wildfly-8.2.1 -type f -name '*.sh' -exec chmod +x {} \;
|
find wildfly-8.2.1 -type f -name '*.sh' -exec chmod +x {} \;
|
||||||
|
|
||||||
unzip -qq -d server cpqd-etics-package-server*
|
unzip -qq -d server cpqd-etics-package-server*
|
||||||
mv server/cpqd*/* server/
|
mv server/cpqd*/* server/
|
||||||
rmdir server/cpqd*
|
rmdir server/cpqd*
|
||||||
unzip -qq -o -d server cpqd-dbmanager-etics-package*
|
unzip -qq -o -d server cpqd-dbmanager-etics-package*
|
||||||
unzip -qq -o -d server cpqd-dbmanager-customer*
|
unzip -qq -o -d server cpqd-dbmanager-customer*
|
||||||
unzip -qq -o -d server cpqd-etics-customer-*-package-server*
|
unzip -qq -o -d server cpqd-etics-customer-*-package-server*
|
||||||
|
|
||||||
cd server/dbmanager
|
cd server/dbmanager
|
||||||
# removes '&' from the 'dbmanager.sh' script so this script can run things sequentially
|
# removes '&' from the 'dbmanager.sh' script so this script can run things sequentially
|
||||||
# sed -i 's/org.eclipse.equinox.launcher.Main $ARGS &/org.eclipse.equinox.launcher.Main $ARGS/g' dbmanager.sh
|
# sed -i 's/org.eclipse.equinox.launcher.Main $ARGS &/org.eclipse.equinox.launcher.Main $ARGS/g' dbmanager.sh
|
||||||
./dbmanager.sh
|
./dbmanager.sh
|
||||||
|
|
||||||
cd $root_dir/server/configurator/bin
|
cd $root_dir/server/configurator/bin
|
||||||
chmod +x setup.sh
|
chmod +x setup.sh
|
||||||
./setup.sh
|
./setup.sh
|
||||||
|
|
||||||
deployments_folder=$root_dir/wildfly-8.2.1/ports-01/deployments
|
deployments_folder=$root_dir/wildfly-8.2.1/ports-01/deployments
|
||||||
|
|
||||||
# adding servergroupname
|
# adding servergroupname
|
||||||
cd $deployments_folder
|
cd $deployments_folder
|
||||||
$scripts_folder/$script_explode_java_files_filename
|
$scripts_folder/$script_explode_java_files_filename
|
||||||
|
|
||||||
hostname=`cat /etc/hostname`
|
hostname=`cat /etc/hostname`
|
||||||
|
|
||||||
cd $deployments_folder/../configuration
|
cd $deployments_folder/../configuration
|
||||||
|
|
||||||
cp standalone-full.xml standalone-full.xml.old
|
cp standalone-full.xml standalone-full.xml.old
|
||||||
|
|
||||||
xmlstarlet ed -L -N x="urn:jboss:domain:2.2" -s "//x:server/x:system-properties" -t elem -n property -v "" \
|
xmlstarlet ed -L -N x="urn:jboss:domain:2.2" -s "//x:server/x:system-properties" -t elem -n property -v "" \
|
||||||
-i "//x:server/x:system-properties/property[last()]" -t attr -n name -v "servergroupname" \
|
-i "//x:server/x:system-properties/property[last()]" -t attr -n name -v "servergroupname" \
|
||||||
-i "//x:server/x:system-properties/property[last()]" -t attr -n value -v "$hostname" standalone-full.xml
|
-i "//x:server/x:system-properties/property[last()]" -t attr -n value -v "$hostname" standalone-full.xml
|
||||||
|
|
||||||
# adding ignore database version
|
# adding ignore database version
|
||||||
$scripts_folder/$script_disable_dbversion_check_filename --deployments-dir $deployments_folder
|
$scripts_folder/$script_disable_dbversion_check_filename --deployments-dir $deployments_folder
|
||||||
|
fi
|
||||||
|
|
||||||
if !should_install_webmap; then
|
if ! $should_install_webmap; then
|
||||||
echo "[INFO] Skipping WebMap installation..."
|
echo "[INFO] Skipping WebMap installation..."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -228,7 +233,7 @@ fi
|
|||||||
|
|
||||||
rm $gp_superparent_pom_filename $cdk_superparent_pom_filename
|
rm $gp_superparent_pom_filename $cdk_superparent_pom_filename
|
||||||
|
|
||||||
msgs_package_dir='msgs-package'
|
msgs_package_dir=$root_dir/msgs-package
|
||||||
unzip -qq -d $msgs_package_dir $msgs_package_filename
|
unzip -qq -d $msgs_package_dir $msgs_package_filename
|
||||||
mv $msgs_package_dir/**/* $msgs_package_dir
|
mv $msgs_package_dir/**/* $msgs_package_dir
|
||||||
|
|
||||||
@@ -237,8 +242,9 @@ mv $msgs_package_dir/**/* $msgs_package_dir
|
|||||||
|
|
||||||
find $msgs_package_dir -type f -name '*.sh' -exec chmod +x {} \;
|
find $msgs_package_dir -type f -name '*.sh' -exec chmod +x {} \;
|
||||||
|
|
||||||
|
cd $root_dir
|
||||||
unzip -qq wildfly-15.0.0.Final.zip
|
unzip -qq wildfly-15.0.0.Final.zip
|
||||||
wildfly15_folder='wildfly-15.0.0.Final'
|
wildfly15_folder="$root_dir/wildfly-15.0.0.Final"
|
||||||
|
|
||||||
$msgs_package_dir/appServerConfigurator/bin/setup.sh
|
$msgs_package_dir/appServerConfigurator/bin/setup.sh
|
||||||
|
|
||||||
@@ -256,7 +262,9 @@ unzip -qq -d $wildfly15_folder/standalone/data_dir/www/map $msgs_map_filename
|
|||||||
|
|
||||||
sed -i 's/8788/8789/g' $wildfly15_folder/bin/runstandalone.sh
|
sed -i 's/8788/8789/g' $wildfly15_folder/bin/runstandalone.sh
|
||||||
|
|
||||||
if should_install_apache; then
|
find $wildfly15_folder -type f -name '*.sh' -exec chmod +x {} \;
|
||||||
|
|
||||||
|
if $should_install_apache; then
|
||||||
sudo apt install apache2
|
sudo apt install apache2
|
||||||
sudo a2enmod proxy
|
sudo a2enmod proxy
|
||||||
sudo a2enmod proxy_http
|
sudo a2enmod proxy_http
|
||||||
|
|||||||
Reference in New Issue
Block a user