Compare commits
5 Commits
master
...
feature/22
Author | SHA1 | Date |
---|---|---|
Luca Frosini | 0f4e699eca | |
Luca Frosini | 567afc73a6 | |
Luca Frosini | fc6ebbff55 | |
Luca Frosini | 41e2e38b5a | |
Luca Frosini | 9ff71aa9e8 |
|
@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
# Changelog for Smartgears Distribution Bundle
|
# Changelog for Smartgears Distribution Bundle
|
||||||
|
|
||||||
|
## [v4.0.0-SNAPSHOT]
|
||||||
|
|
||||||
|
- Upgraded Smartgears to 4.X.X version
|
||||||
|
|
||||||
|
|
||||||
## [v3.0.0] [r5.0.0] -
|
## [v3.0.0] [r5.0.0] -
|
||||||
|
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>smartgears-distribution-bundle</artifactId>
|
<artifactId>smartgears-distribution-bundle</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>A distribution bundle for the SmartGears Framework</name>
|
<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>
|
<description>A distribution bundle for the SmartGears Framework containing Tomcat and ReadMe files to install quickly Smartgears</description>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>smartgears-distribution</artifactId>
|
<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>
|
<type>tar.gz</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includes>
|
<includes>
|
||||||
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.xml</include>
|
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.ini</include>
|
||||||
</includes>
|
</includes>
|
||||||
<replacements>
|
<replacements>
|
||||||
<replacement>
|
<replacement>
|
||||||
|
|
|
@ -10,8 +10,8 @@ STARTUP_SCRIPT="startContainer.sh"
|
||||||
STOP_SCRIPT="stopContainer.sh"
|
STOP_SCRIPT="stopContainer.sh"
|
||||||
|
|
||||||
GHN_HOME=${SMARTGEAR_ROOT}/SmartGears
|
GHN_HOME=${SMARTGEAR_ROOT}/SmartGears
|
||||||
CONTAINER_FILENAME="container.xml"
|
CONTAINER_FILENAME="container.ini"
|
||||||
CONTAINER_XML=${GHN_HOME}/${CONTAINER_FILENAME}
|
CONTAINER_INI=${GHN_HOME}/${CONTAINER_FILENAME}
|
||||||
|
|
||||||
CATALINA_OPTS_BASHRC="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\""
|
CATALINA_OPTS_BASHRC="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\""
|
||||||
GHN_HOME_BASHRC="export GHN_HOME=${GHN_HOME}"
|
GHN_HOME_BASHRC="export GHN_HOME=${GHN_HOME}"
|
||||||
|
@ -37,19 +37,18 @@ function hostname {
|
||||||
|
|
||||||
while [ "$HOST_OK" = false ]
|
while [ "$HOST_OK" = false ]
|
||||||
do
|
do
|
||||||
|
|
||||||
echo "Is ${HOST} correct?"
|
echo "Is ${HOST} correct?"
|
||||||
select yn in "Yes" "No";
|
select yn in "Yes" "No";
|
||||||
do
|
do
|
||||||
case $yn in
|
case $yn in
|
||||||
Yes )
|
Yes )
|
||||||
ok=true
|
ok=true
|
||||||
HOST_OK=true;
|
HOST_OK=true;
|
||||||
break;;
|
break;;
|
||||||
No )
|
No )
|
||||||
ok=false
|
ok=false
|
||||||
break;;
|
break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$ok" = false ]; then
|
if [ "$ok" = false ]; then
|
||||||
|
@ -60,29 +59,29 @@ function hostname {
|
||||||
}
|
}
|
||||||
|
|
||||||
function escape_slashes {
|
function escape_slashes {
|
||||||
sed 's/\//\\\//g'
|
sed 's/\//\\\//g'
|
||||||
}
|
}
|
||||||
|
|
||||||
function change_line {
|
function change_line {
|
||||||
local OLD_LINE_PATTERN=$1; shift
|
local OLD_LINE_PATTERN=$1; shift
|
||||||
local NEW_LINE=$1; shift
|
local NEW_LINE=$1; shift
|
||||||
local FILE=$1
|
local FILE=$1
|
||||||
|
|
||||||
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
|
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
|
||||||
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
|
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":n:fh" opt; do
|
while getopts ":n:fh" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
n) HOST=$OPTARG;;
|
n) HOST=$OPTARG;;
|
||||||
f) force=true;;
|
f) force=true;;
|
||||||
h) showhelp
|
h) showhelp
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
\?) echo -e "\nERROR:invalid option: -$OPTARG";
|
\?) echo -e "\nERROR:invalid option: -$OPTARG";
|
||||||
showhelp;
|
showhelp;
|
||||||
echo -e "\naborting.\n"
|
echo -e "\naborting.\n"
|
||||||
exit 1 >&2 ;;
|
exit 1 >&2 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $force ]; then
|
if [ $force ]; then
|
||||||
|
@ -129,7 +128,7 @@ if [ $force ]; then
|
||||||
./install -s tomcat -g ${GHN_HOME}
|
./install -s tomcat -g ${GHN_HOME}
|
||||||
|
|
||||||
hostname
|
hostname
|
||||||
change_line "<hostname>" "\t<hostname>$HOST</hostname>" ${CONTAINER_XML}
|
change_line "hostname = localhost" "hostname = $HOST" ${CONTAINER_INI}
|
||||||
|
|
||||||
echo -e "\n\n\n"
|
echo -e "\n\n\n"
|
||||||
echo "Just few steps to do to reach the goal:"
|
echo "Just few steps to do to reach the goal:"
|
||||||
|
@ -180,14 +179,14 @@ else
|
||||||
|
|
||||||
echo "Then:"
|
echo "Then:"
|
||||||
|
|
||||||
echo "- Modify ${CONTAINER_XML} with your hostname"
|
echo "- Modify ${CONTAINER_INI} with your hostname"
|
||||||
fi
|
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 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 "- You can Stop the container from ${BUNDLE_HOME} directory using the command ./${STOP_SCRIPT}"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "PLEASE NOTE:"
|
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"
|
Loading…
Reference in New Issue