Compare commits

...

5 Commits

Author SHA1 Message Date
Luca Frosini 0f4e699eca Fixed indentation 2022-07-08 14:35:53 +02:00
Luca Frosini 567afc73a6 Fixed setup.sh 2022-07-08 13:52:22 +02:00
Luca Frosini fc6ebbff55 fixing bundle 2022-07-05 16:37:57 +02:00
Luca Frosini 41e2e38b5a Upgrading version 2022-07-05 15:39:06 +02:00
Luca Frosini 9ff71aa9e8 Creating create distribution bundle for smartgears 4 2022-07-05 15:00:17 +02:00
3 changed files with 30 additions and 27 deletions

View File

@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for Smartgears Distribution Bundle
## [v4.0.0-SNAPSHOT]
- Upgraded Smartgears to 4.X.X version
## [v3.0.0] [r5.0.0] -

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.distribution</groupId>
<artifactId>smartgears-distribution-bundle</artifactId>
<version>3.0.0</version>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>A distribution bundle for the SmartGears Framework</name>
<description>A distribution bundle for the SmartGears Framework containing Tomcat and ReadMe files to install quickly Smartgears</description>
@ -34,7 +34,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>smartgears-distribution</artifactId>
<version>[3.0.0, 4.0.0-SNAPSHOT)</version>
<version>[4.0.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
<type>tar.gz</type>
</dependency>
@ -119,7 +119,7 @@
</executions>
<configuration>
<includes>
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.xml</include>
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.ini</include>
</includes>
<replacements>
<replacement>

View File

@ -10,8 +10,8 @@ STARTUP_SCRIPT="startContainer.sh"
STOP_SCRIPT="stopContainer.sh"
GHN_HOME=${SMARTGEAR_ROOT}/SmartGears
CONTAINER_FILENAME="container.xml"
CONTAINER_XML=${GHN_HOME}/${CONTAINER_FILENAME}
CONTAINER_FILENAME="container.ini"
CONTAINER_INI=${GHN_HOME}/${CONTAINER_FILENAME}
CATALINA_OPTS_BASHRC="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\""
GHN_HOME_BASHRC="export GHN_HOME=${GHN_HOME}"
@ -37,19 +37,18 @@ function hostname {
while [ "$HOST_OK" = false ]
do
echo "Is ${HOST} correct?"
select yn in "Yes" "No";
do
case $yn in
Yes )
ok=true
HOST_OK=true;
break;;
No )
ok=false
break;;
esac
case $yn in
Yes )
ok=true
HOST_OK=true;
break;;
No )
ok=false
break;;
esac
done
if [ "$ok" = false ]; then
@ -60,29 +59,29 @@ function hostname {
}
function escape_slashes {
sed 's/\//\\\//g'
sed 's/\//\\\//g'
}
function change_line {
local OLD_LINE_PATTERN=$1; shift
local NEW_LINE=$1; shift
local FILE=$1
local OLD_LINE_PATTERN=$1; shift
local NEW_LINE=$1; shift
local FILE=$1
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
}
while getopts ":n:fh" opt; do
case $opt in
n) HOST=$OPTARG;;
f) force=true;;
h) showhelp
h) showhelp
exit 0 ;;
\?) echo -e "\nERROR:invalid option: -$OPTARG";
showhelp;
echo -e "\naborting.\n"
exit 1 >&2 ;;
esac
esac
done
if [ $force ]; then
@ -129,7 +128,7 @@ if [ $force ]; then
./install -s tomcat -g ${GHN_HOME}
hostname
change_line "<hostname>" "\t<hostname>$HOST</hostname>" ${CONTAINER_XML}
change_line "hostname = localhost" "hostname = $HOST" ${CONTAINER_INI}
echo -e "\n\n\n"
echo "Just few steps to do to reach the goal:"
@ -180,14 +179,14 @@ else
echo "Then:"
echo "- Modify ${CONTAINER_XML} with your hostname"
echo "- Modify ${CONTAINER_INI} with your hostname"
fi
echo "- Modify ${CONTAINER_XML} startup infrastructure and vres"
echo "- Modify ${CONTAINER_INI} authorization section"
echo "- You can Start the container from ${BUNDLE_HOME} directory using the command ./${STARTUP_SCRIPT}"
echo "- You can Stop the container from ${BUNDLE_HOME} directory using the command ./${STOP_SCRIPT}"
echo ""
echo "PLEASE NOTE:"
echo "By default Tomcat start on 8080 port. If you want to change this port REMEMBER to modify ${CONTAINER_XML} consistently"
echo "By default Tomcat start on 8080 port. If you want to change this port REMEMBER to modify ${CONTAINER_INI} consistently"