Compare commits
60 Commits
Author | SHA1 | Date |
---|---|---|
lucio | 4f8c429175 | |
Alfredo Oliviero | 42c285a4c6 | |
Lucio Lelii | 56fcf28afa | |
lucio | 0edcfe3ad5 | |
Alfredo Oliviero | d381f2bc30 | |
Alfredo Oliviero | dcecfe224c | |
Alfredo Oliviero | 9d52aef7cb | |
Alfredo Oliviero | 6bc3bd6714 | |
Alfredo Oliviero | abd273cc0b | |
lucio | 8b3224226e | |
lucio | e185fdde66 | |
lucio | f7d4877e5c | |
lucio | a8aa65b889 | |
lucio | 834f30a5ad | |
lucio | 56a49c1ec5 | |
Alfredo Oliviero | b50f991932 | |
lucio | d621e840ba | |
lucio | d645c63d84 | |
lucio | a8a6fab7a6 | |
lucio | 1234c7db69 | |
lucio | 6ea2e4696f | |
lucio | 18d1fd9370 | |
luca.frosini | a10604dd24 | |
lucio | 873188eac3 | |
lucio | 6dcb9c527f | |
lucio | 360ef51c6b | |
Lucio Lelii | 650b23cfcc | |
lucio | c0326edbe1 | |
Luca Frosini | 932f7d4351 | |
Luca Frosini | 8b86b76926 | |
Luca Frosini | 23ecfe3924 | |
Luca Frosini | ca0b020813 | |
Luca Frosini | 9ff239d520 | |
Luca Frosini | 42f62c62df | |
Luca Frosini | e7a86bfad4 | |
Luca Frosini | 44b0ce8473 | |
Luca Frosini | 51d9ae6f42 | |
Luca Frosini | 35ef5b7f32 | |
Luca Frosini | c6ca91c877 | |
Lucio Lelii | 814f57d6b1 | |
Lucio Lelii | 3b153a2716 | |
Luca Frosini | 4a27523c32 | |
Luca Frosini | 99beeb3d6f | |
Luca Frosini | 1f893338fb | |
Lucio Lelii | 2fbedef6f6 | |
Luca Frosini | 6611831b5e | |
Luca Frosini | b4d84a15d8 | |
Luca Frosini | 43911a9da9 | |
Lucio Lelii | 24c9cc6c0c | |
Lucio Lelii | 884af77957 | |
Lucio Lelii | b8ed21c71f | |
Lucio Lelii | ef3ac3784f | |
Lucio Lelii | 90dca7b0f1 | |
Lucio Lelii | dbeaf97783 | |
Lucio Lelii | 4beadb0ee3 | |
Lucio Lelii | 3862f22ad1 | |
Luca Frosini | c22eb5364a | |
Luca Frosini | 9b26cf27cc | |
Lucio Lelii | 37c896049f | |
Lucio Lelii | 03c0d63c70 |
|
@ -2,3 +2,6 @@ target
|
||||||
.classpath
|
.classpath
|
||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
|
/.DS_Store
|
||||||
|
/bin/
|
||||||
|
/package-lock.json
|
||||||
|
|
1
.project
1
.project
|
@ -3,6 +3,7 @@
|
||||||
<name>smartgears-distribution</name>
|
<name>smartgears-distribution</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
|
<project>common-service</project>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
|
|
25
CHANGELOG.md
25
CHANGELOG.md
|
@ -2,36 +2,59 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
# Changelog for Smartgears Distribution
|
# Changelog for Smartgears Distribution
|
||||||
|
|
||||||
|
## [v4.0.1-SNAPSHOT] - 2022-03-30
|
||||||
|
|
||||||
|
- new version number
|
||||||
|
|
||||||
|
## [v4.0.0-SNAPSHOT] - 2022-03-30
|
||||||
|
|
||||||
|
- moving to smartgears-4.0.0
|
||||||
|
|
||||||
|
## [v3.4.5] - 2022-03-29
|
||||||
|
|
||||||
|
- fixes issue [#23075]
|
||||||
|
|
||||||
|
|
||||||
|
## [v3.4.4] - 2022-03-23
|
||||||
|
|
||||||
|
- solved issue on policy check
|
||||||
|
|
||||||
|
|
||||||
## [v3.4.3] - 2022-01-19
|
## [v3.4.3] - 2022-01-19
|
||||||
|
|
||||||
- enabled policy check on smartgears
|
- enabled policy check on smartgears
|
||||||
- container configuration for test added
|
- container configuration for test added
|
||||||
|
|
||||||
|
|
||||||
## [v3.4.2] - 2021-11-08
|
## [v3.4.2] - 2021-11-08
|
||||||
|
|
||||||
- common-smartgrears library updated
|
- common-smartgrears library updated
|
||||||
|
|
||||||
|
|
||||||
## [v3.4.1] - 2021-06-25
|
## [v3.4.1] - 2021-06-25
|
||||||
|
|
||||||
- Released to have and up-to-date distribution
|
- Released to have and up-to-date distribution
|
||||||
|
|
||||||
|
|
||||||
## [v3.4.0] - 2020-05-25
|
## [v3.4.0] - 2020-05-25
|
||||||
|
|
||||||
- Released to have and up-to-date distribution
|
- Released to have and up-to-date distribution
|
||||||
|
|
||||||
|
|
||||||
## [v3.3.0]
|
## [v3.3.0]
|
||||||
|
|
||||||
- Accounting-lib inherited dependency has been upgraded to 4.1.0
|
- Accounting-lib inherited dependency has been upgraded to 4.1.0
|
||||||
|
|
||||||
|
|
||||||
## [v3.2.0]
|
## [v3.2.0]
|
||||||
|
|
||||||
- clean-container script uses proxy
|
- clean-container script uses proxy
|
||||||
|
|
||||||
|
|
||||||
## [v3.1.0]
|
## [v3.1.0]
|
||||||
|
|
||||||
- Upgraded gcube-smartgears-bom to version 2.1.0
|
- Upgraded gcube-smartgears-bom to version 2.1.0
|
||||||
|
|
||||||
|
|
||||||
## [v3.0.0] - 2020-11-11
|
## [v3.0.0] - 2020-11-11
|
||||||
|
|
||||||
- Switched JSON management to gcube-jackson [#19283]
|
- Switched JSON management to gcube-jackson [#19283]
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
for current platform:
|
||||||
|
docker build -t smartgears-distribution:4.0.0-SNAPSHOT-java11-tomcat9 .
|
||||||
|
|
||||||
|
for multiple platforms:
|
||||||
|
docker build -t smartgears-distribution:4.0.0-SNAPSHOT-java11-tomcat9 --platform=linux/amd64,linux/arm64,linux/arm/v7 .
|
26
Dockerfile
26
Dockerfile
|
@ -1,12 +1,22 @@
|
||||||
FROM tomcat:8.5.47-jdk8-openjdk
|
ARG JAVA_VERSION=11
|
||||||
ARG nexuspath
|
|
||||||
ARG filename
|
FROM tomcat:10.1.19-jdk${JAVA_VERSION}-temurin-jammy
|
||||||
ARG version
|
ARG SMARTGEARS_VERSION=""
|
||||||
|
ENV FILENAME=smartgears-distribution-${SMARTGEARS_VERSION}
|
||||||
|
|
||||||
|
COPY ./target/${FILENAME}.tar.gz /smartgears-distro.tar.gz
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN curl -k $nexuspath/$filename.tar.gz --output /smartgears-distro.tar.gz
|
# all file and folder in etc/config are moved to the smartgears applications configuration directory
|
||||||
|
# for specific application configuration ( configuration file for app with contextPath "contextPath" must be placed in /etc/config/contextPath)
|
||||||
|
RUN mkdir -p /etc/config
|
||||||
RUN tar zxvf /smartgears-distro.tar.gz
|
RUN tar zxvf /smartgears-distro.tar.gz
|
||||||
|
RUN rm /smartgears-distro.tar.gz
|
||||||
RUN export CATALINA_HOME=/usr/local/tomcat
|
RUN export CATALINA_HOME=/usr/local/tomcat
|
||||||
RUN mv smartgears-distribution-$version smartgears-distribution
|
RUN ln -s /usr/local/tomcat tomcat
|
||||||
|
RUN mv smartgears-distribution-$SMARTGEARS_VERSION smartgears-distribution
|
||||||
ENV GHN_HOME=./smartgears-distribution
|
ENV GHN_HOME=./smartgears-distribution
|
||||||
RUN ./smartgears-distribution/install -s tomcat
|
RUN ./smartgears-distribution/install -s tomcat
|
||||||
|
COPY tomcat_files/startContainer.sh /startContainer.sh
|
||||||
|
RUN chmod +x /startContainer.sh
|
||||||
|
ENTRYPOINT ["/startContainer.sh"]
|
||||||
|
CMD ["catalina.sh","run"]
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM tomcat:10.1.19-jdk11-temurin-jammy
|
||||||
|
ARG filename=smartgears-distribution-4.0.0-SNAPSHOT
|
||||||
|
ARG version=4.0.0-SNAPSHOT
|
||||||
|
COPY ./target/$filename.tar.gz /smartgears-distro.tar.gz
|
||||||
|
WORKDIR /
|
||||||
|
RUN tar zxvf /smartgears-distro.tar.gz
|
||||||
|
RUN rm /smartgears-distro.tar.gz
|
||||||
|
RUN export CATALINA_HOME=/usr/local/tomcat
|
||||||
|
RUN ln -s /usr/local/tomcat tomcat
|
||||||
|
RUN mv smartgears-distribution-$version smartgears-distribution
|
||||||
|
ENV GHN_HOME=./smartgears-distribution
|
||||||
|
RUN ./smartgears-distribution/install -s tomcat
|
||||||
|
COPY exec/startContainer.sh /startContainer.sh
|
||||||
|
RUN chmod +x /startContainer.sh
|
||||||
|
ENTRYPOINT ["/startContainer.sh"]
|
||||||
|
CMD ["catalina.sh","run"]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Acknowledgments
|
||||||
|
|
||||||
|
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||||
|
|
||||||
|
- the Sixth Framework Programme for Research and Technological Development
|
||||||
|
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
|
||||||
|
- the Seventh Framework Programme for research, technological development and demonstration
|
||||||
|
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
|
||||||
|
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
|
||||||
|
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
|
||||||
|
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
|
||||||
|
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
|
||||||
|
- the H2020 research and innovation programme
|
||||||
|
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
|
||||||
|
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
|
||||||
|
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
|
||||||
|
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
|
||||||
|
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
|
||||||
|
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
|
||||||
|
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
|
||||||
|
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
|
||||||
|
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
|
||||||
|
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
|
||||||
|
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
|
||||||
|
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
|
||||||
|
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
|
24
README.md
24
README.md
|
@ -6,6 +6,8 @@ A set of gCube library which empower a servlet container (e.g. tomcat) with a se
|
||||||
- authorization
|
- authorization
|
||||||
- accounting
|
- accounting
|
||||||
|
|
||||||
|
## Structure of the project
|
||||||
|
|
||||||
|
|
||||||
## Built With
|
## Built With
|
||||||
|
|
||||||
|
@ -55,26 +57,6 @@ open-source software toolkit used for building and operating Hybrid Data
|
||||||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||||
by favouring the realisation of reuse oriented policies.
|
by favouring the realisation of reuse oriented policies.
|
||||||
|
|
||||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
||||||
|
|
||||||
- the Sixth Framework Programme for Research and Technological Development
|
|
||||||
- DILIGENT (grant no. 004260).
|
|
||||||
- the Seventh Framework Programme for research, technological development and demonstration
|
|
||||||
- D4Science (grant no. 212488);
|
|
||||||
- D4Science-II (grant no.239019);
|
|
||||||
- ENVRI (grant no. 283465);
|
|
||||||
- iMarine(grant no. 283644);
|
|
||||||
- EUBrazilOpenBio (grant no. 288754).
|
|
||||||
- the H2020 research and innovation programme
|
|
||||||
- SoBigData (grant no. 654024);
|
|
||||||
- PARTHENOS (grant no. 654119);
|
|
||||||
- EGIEngage (grant no. 654142);
|
|
||||||
- ENVRIplus (grant no. 654182);
|
|
||||||
- BlueBRIDGE (grant no. 675680);
|
|
||||||
- PerformFish (grant no. 727610);
|
|
||||||
- AGINFRAplus (grant no. 731001);
|
|
||||||
- DESIRA (grant no. 818194);
|
|
||||||
- ARIADNEplus (grant no. 823914);
|
|
||||||
- RISIS2 (grant no. 824091);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,115 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ACCEPTED_JAVA_VERSIONS=(11 17)
|
||||||
|
|
||||||
|
NAME=smartgears-distribution
|
||||||
|
SMARTGEARS_VERSION=4.0.1-SNAPSHOT
|
||||||
|
|
||||||
|
JAVA_VERSION=11
|
||||||
|
TOMCAT_VERSION=10.1.19
|
||||||
|
PUSH_DOCKER=false
|
||||||
|
PUSH_HARBOR=false
|
||||||
|
LOGIN_HARBOR=false
|
||||||
|
MULTI_PLATFORM=false
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Help #
|
||||||
|
################################################################################
|
||||||
|
Help()
|
||||||
|
{
|
||||||
|
# Display Help
|
||||||
|
echo "build and create docker image form smartgears distribution"
|
||||||
|
echo
|
||||||
|
echo "Syntax: buildDistribution [-g arg] [-j arg] [-p|u|h]"
|
||||||
|
echo "options:"
|
||||||
|
echo "-g arg specifies the maven [g]oal {package, install, deploy etc} default is package."
|
||||||
|
echo "-j arg specify [j]ava version (default is 11)"
|
||||||
|
echo " accepted version are: ${ACCEPTED_JAVA_VERSIONS[@]}"
|
||||||
|
echo "-m build docker image for [m]ultiple platform (must be suppported by local docker agent)"
|
||||||
|
echo "-p [p]ush image to d4science harbor (with login already done, or -l to login)"
|
||||||
|
echo "-l [l]ogin to d4science harbor"
|
||||||
|
echo "-u p[u]sh image to dockerhub (with docker login already done)"
|
||||||
|
echo "-h Print this [h]elp."
|
||||||
|
echo
|
||||||
|
echo "to build a multiplatform image and push on d4science harbor"
|
||||||
|
echo " ./buildDistribution.sh -m -l -p"
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
################################################################################
|
||||||
|
# Main program #
|
||||||
|
################################################################################
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while getopts g:muplj:h flag
|
||||||
|
do
|
||||||
|
case "${flag}" in
|
||||||
|
g) GOAL=${OPTARG};;
|
||||||
|
m) MULTI_PLATFORM=true ;;
|
||||||
|
u) PUSH_DOCKER=true ;;
|
||||||
|
p) PUSH_HARBOR=true ;;
|
||||||
|
l) LOGIN_HARBOR=true ;;
|
||||||
|
j) if [[ ${ACCEPTED_JAVA_VERSIONS[@]} =~ ${OPTARG} ]]
|
||||||
|
then JAVA_VERSION=${OPTARG};
|
||||||
|
else echo "Invalid java version" && echo "accepted version are: ${ACCEPTED_JAVA_VERSIONS[@]}" && exit 1;
|
||||||
|
fi;;
|
||||||
|
h) Help
|
||||||
|
exit 0;;
|
||||||
|
*) echo "Invalid option"
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
IMAGE_VERSION=${SMARTGEARS_VERSION}-java${JAVA_VERSION}-tomcat${TOMCAT_VERSION}
|
||||||
|
|
||||||
|
BUILD_NAME=$NAME:$IMAGE_VERSION
|
||||||
|
|
||||||
|
echo "BUILD_NAME=$BUILD_NAME"
|
||||||
|
|
||||||
|
if [ ${LOGIN_HARBOR} = true ];
|
||||||
|
then
|
||||||
|
./loginHarborHub.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $GOAL ];
|
||||||
|
then
|
||||||
|
mvn clean package;
|
||||||
|
else
|
||||||
|
mvn clean ${GOAL};
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $MULTI_PLATFORM ];
|
||||||
|
then
|
||||||
|
echo "build multiplatform"
|
||||||
|
docker build -t $BUILD_NAME --build-arg="JAVA_VERSION=${JAVA_VERSION}" --build-arg="SMARTGEARS_VERSION=${SMARTGEARS_VERSION}" --platform=linux/amd64,linux/arm64,linux/arm/v7 .;
|
||||||
|
else
|
||||||
|
echo "build single platform"
|
||||||
|
docker build -t $BUILD_NAME --build-arg="JAVA_VERSION=${JAVA_VERSION}" --build-arg="SMARTGEARS_VERSION=${SMARTGEARS_VERSION}" . ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">>> generated docker image ${IMAGE_VERSION}"
|
||||||
|
|
||||||
|
|
||||||
|
if [ ${PUSH_DOCKER} = true ];
|
||||||
|
then
|
||||||
|
DOCKER_NAME=d4science/$BUILD_NAME
|
||||||
|
docker tag $BUILD_NAME $DOCKER_NAME;
|
||||||
|
docker push $DOCKER_NAME;
|
||||||
|
echo ">>> pushed on dockerhub the image $DOCKER_NAME"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ ${PUSH_HARBOR} = true ];
|
||||||
|
then
|
||||||
|
HARBOR_NAME=hub.dev.d4science.org/gcube/$BUILD_NAME
|
||||||
|
echo ">>> PUSHING on hub.dev.d4science.org the image $HARBOR_NAME"
|
||||||
|
docker tag $BUILD_NAME $HARBOR_NAME;
|
||||||
|
docker push $HARBOR_NAME;
|
||||||
|
echo ">>> pushed on hub.dev.d4science.org the image $HARBOR_NAME"
|
||||||
|
fi
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE xml>
|
|
||||||
<ReleaseNotes>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-2-3" date="${buildDate}">
|
|
||||||
<Change>Fixed gxHTTP dependecy to allow ETICs to build the component</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-2-2" date="2018-12-11">
|
|
||||||
<Change>Using gcube-bom and gcube-smartgears-bom instead of maven-smartgears-bom</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-2-1" date="2017-02-15">
|
|
||||||
<Change>Fixed changelog</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-2-0" date="2017-02-15">
|
|
||||||
<Change>Changed log level from FATAL to ERROR #9708</Change>
|
|
||||||
<Change>Added document-store-lib-accounting-service in place of document-store-lib-couchbase</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-1-3" date="2017-10-09">
|
|
||||||
<Change>Added logback 1.11 to support Time and Size rolling of logs</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-1-2" date="2017-05-02">
|
|
||||||
<Change>common-smartgear-utils re-adedd to the distribution</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-1-0" date="2017-02-01">
|
|
||||||
<Change>Fixed distro files</Change>
|
|
||||||
<Change>Added data-transfer service as part of the distribution</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.2-0-0" date="2016-02-08">
|
|
||||||
<Change>Added new Authorization Mechanism based on token</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-6" date="2016-01-08">
|
|
||||||
<Change>smartgears-distribution 1.2.6: set default log level to WARN (refs #2145)</Change>
|
|
||||||
<Change>smartgears-distribution 1.2.6: distribution field on monitor is missing when a smartgears node is upgraded (refs #1268)</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-5" date="2015-07-31">
|
|
||||||
<Change>Added smartgear-distribution (this project) version on ghn profile.</Change>
|
|
||||||
<Change>Added accounting and authorization libs</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-4" date="2015-07-22">
|
|
||||||
<Change>Added possibility to use WEB_CONTAINER_HOME to specify the container folder. This environment variable has priority over CATALINA_HOME in the install script.</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-3" date="2015-06-18">
|
|
||||||
<Change>Stripped version from name of the included war</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-2" date="2015-04-28">
|
|
||||||
<Change>Moved libs and war directories under target to make mvn clean properly working. The generated tar.gz remain the same</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-1" date="2015-04-15">
|
|
||||||
<Change>smartgear-distribution-bundle version is published on ghn profile</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-2-0" date="2014-04-04">
|
|
||||||
<Change>included smartgears-utils</Change>
|
|
||||||
<Change>upgraded clean scripts to clean the IS</Change>
|
|
||||||
<Change>added symlink for shared libs</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-1-0" date="2014-01-31">
|
|
||||||
<Change>JAVA 7 Release</Change>
|
|
||||||
<Change>Included wHN manager service</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.distribution.smartgears-distribution.1-0-0" date="2013-10-24">
|
|
||||||
<Change>First Release</Change>
|
|
||||||
</Changeset>
|
|
||||||
</ReleaseNotes>
|
|
|
@ -27,27 +27,29 @@ function showhelp {
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":d:s:g:a:xh" opt; do
|
while getopts ":d:s:g:a:xh" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
d) distro=$OPTARG;;
|
d) distro=$OPTARG;;
|
||||||
s) shared=$OPTARG;;
|
s) shared=$OPTARG;;
|
||||||
g) ghnhome=$OPTARG;;
|
g) ghnhome=$OPTARG;;
|
||||||
a) apps=$OPTARG;;
|
a) apps=$OPTARG;;
|
||||||
x) dryrun="true";;
|
x) dryrun="true";;
|
||||||
h) showhelp
|
h) showhelp
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
:) echo -e "\nERROR:option -$OPTARG requires an argument." >&2 ;
|
:) echo -e "\nERROR:option -$OPTARG requires an argument." >&2 ;
|
||||||
showhelp;
|
showhelp;
|
||||||
echo -e "\naborting.\n"
|
echo -e "\naborting.\n"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
\?) 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 [ -z "$ghnhome" ]; then
|
if [ -z "$ghnhome" ]
|
||||||
if [ -z "$GHN_HOME" ]; then
|
then
|
||||||
|
if [ -z "$GHN_HOME" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR:please specify the gHN directory (-g) or define the GHN_HOME env var." >&2
|
echo -e "\nERROR:please specify the gHN directory (-g) or define the GHN_HOME env var." >&2
|
||||||
showhelp
|
showhelp
|
||||||
echo -e "\naborting.\n"
|
echo -e "\naborting.\n"
|
||||||
|
@ -56,31 +58,37 @@ if [ -z "$ghnhome" ]; then
|
||||||
ghnhome=$GHN_HOME
|
ghnhome=$GHN_HOME
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -d "$ghnhome" ]; then
|
if [ ! -d "$ghnhome" ]
|
||||||
if [ -z "$dryrun" ]; then
|
then
|
||||||
mkdir $ghnhome
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
mkdir $ghnhome
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#tomcat target
|
#tomcat target
|
||||||
if [ "$shared" = "tomcat" ]; then
|
if [ "$shared" = "tomcat" ]
|
||||||
if [ -z "$CATALINA_HOME" ]; then
|
then
|
||||||
if [ -z "$WEB_CONTAINER_HOME" ] ; then
|
if [ -z "$CATALINA_HOME" ]
|
||||||
echo -e "\nERROR: both CATALINA_HOME and WEB_CONTAINER_HOME are undefined." >&2
|
then
|
||||||
showhelp
|
if [ -z "$WEB_CONTAINER_HOME" ]
|
||||||
echo -e "\naborting.\n"
|
then
|
||||||
exit 1
|
echo -e "\nERROR: both CATALINA_HOME and WEB_CONTAINER_HOME are undefined." >&2
|
||||||
else
|
showhelp
|
||||||
CATALINA_HOME=$WEB_CONTAINER_HOME
|
echo -e "\naborting.\n"
|
||||||
fi
|
exit 1
|
||||||
fi
|
else
|
||||||
|
CATALINA_HOME=$WEB_CONTAINER_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
shared=$CATALINA_HOME/lib
|
shared=$CATALINA_HOME/lib
|
||||||
apps=$CATALINA_HOME/webapps
|
apps=$CATALINA_HOME/webapps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#shared is set
|
#shared is set
|
||||||
if [ -z "$shared" ]; then
|
if [ -z "$shared" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR: shared directory is undefined (-s)." >&2
|
echo -e "\nERROR: shared directory is undefined (-s)." >&2
|
||||||
showhelp
|
showhelp
|
||||||
echo -e "\naborting.\n"
|
echo -e "\naborting.\n"
|
||||||
|
@ -88,25 +96,29 @@ if [ -z "$shared" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#shared exists and is a directory
|
#shared exists and is a directory
|
||||||
if [ ! -d "$shared" ]; then
|
if [ ! -d "$shared" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR: shared folder does not exist or is not a directory, aborting." >&2
|
echo -e "\nERROR: shared folder does not exist or is not a directory, aborting." >&2
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#shared exists and is a directory
|
#shared exists and is a directory
|
||||||
if [ ! -d "$apps" ]; then
|
if [ ! -d "$apps" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR: apps folder does not exist or is not a directory, aborting." >&2
|
echo -e "\nERROR: apps folder does not exist or is not a directory, aborting." >&2
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#distrolibs exists and is a directory
|
#distrolibs exists and is a directory
|
||||||
if [ ! -d "$distrolibs" ]; then
|
if [ ! -d "$distrolibs" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR: distro libs does not exist or is not a directory, aborting."
|
echo -e "\nERROR: distro libs does not exist or is not a directory, aborting."
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#distroapps exists and is a directory
|
#distroapps exists and is a directory
|
||||||
if [ ! -d "$distroapps" ]; then
|
if [ ! -d "$distroapps" ]
|
||||||
|
then
|
||||||
echo -e "\nERROR: distro apps does not exist or is not a directory, aborting."
|
echo -e "\nERROR: distro apps does not exist or is not a directory, aborting."
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
@ -119,127 +131,134 @@ echo -e " target app directory = $(cd $(dirname $apps); pwd)/$(basename $apps
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
#uninstall libraries
|
#uninstall libraries
|
||||||
if [ -f $shared/$liblist ]; then
|
if [ -f $shared/$liblist ]
|
||||||
|
then
|
||||||
echo -e "\nuninstalling existing libraries \c"
|
echo -e "\nuninstalling existing libraries \c"
|
||||||
while read line; do
|
while read line
|
||||||
if [ -z "$dryrun" ]; then
|
do
|
||||||
rm $shared/$line
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
rm $shared/$line
|
||||||
fi
|
fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
sleep .01
|
sleep .01
|
||||||
|
done < $shared/$liblist
|
||||||
done < $shared/$liblist
|
|
||||||
if [ -z "$dryrun" ]; then
|
|
||||||
rm $shared/$liblist
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
rm $shared/$liblist
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#uninstall apps
|
#uninstall apps
|
||||||
if [ -f $shared/$applist ]; then
|
if [ -f $shared/$applist ]
|
||||||
|
then
|
||||||
echo -e "\nuninstalling existing apps \c"
|
echo -e "\nuninstalling existing apps \c"
|
||||||
while read line; do
|
while read line
|
||||||
if [ -z "$dryrun" ]; then
|
do
|
||||||
rm $apps/$line
|
if [ -z "$dryrun" ]
|
||||||
folder=${line:0:-4}
|
then
|
||||||
if [ ! -z "$folder" ]; then
|
rm $apps/$line
|
||||||
rm -rf $apps/$folder
|
folder=${line:0:-4}
|
||||||
fi
|
if [ ! -z "$folder" ]
|
||||||
|
then
|
||||||
|
rm -rf $apps/$folder
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo -n "."
|
|
||||||
sleep .01
|
echo -n "."
|
||||||
|
sleep .01
|
||||||
done < $shared/$applist
|
done < $shared/$applist
|
||||||
if [ -z "$dryrun" ]; then
|
|
||||||
rm $shared/$applist
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
rm $shared/$applist
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#install libraries
|
#install libraries
|
||||||
echo -e "\ninstalling components \c"
|
echo -e "\ninstalling components \c"
|
||||||
for f in $distrolibs/*.*;
|
for f in $distrolibs/*.*;
|
||||||
do
|
do
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]
|
||||||
cp $f $shared/
|
then
|
||||||
basename $f | sed -r 's/[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?(-SNAPSHOT)?(-[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?-[0-9]{4,8})?/*/' >> $shared/$liblist
|
cp $f $shared/
|
||||||
fi
|
basename $f | sed -r 's/[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?(-SNAPSHOT)?(-[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?-[0-9]{4,8})?/*/' >> $shared/$liblist
|
||||||
echo -n "."
|
fi
|
||||||
sleep .01
|
|
||||||
done
|
echo -n "."
|
||||||
|
sleep .01
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
#install apps
|
#install apps
|
||||||
echo -e "\ninstalling applications \c"
|
echo -e "\ninstalling applications \c"
|
||||||
for f in $distroapps/*;
|
for f in $distroapps/*;
|
||||||
do
|
do
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]
|
||||||
cp $f $apps/
|
then
|
||||||
basename $f >> $shared/$applist
|
cp $f $apps/
|
||||||
fi
|
basename $f >> $shared/$applist
|
||||||
echo -n "."
|
fi
|
||||||
sleep .01
|
echo -n "."
|
||||||
done
|
sleep .01
|
||||||
|
done
|
||||||
|
|
||||||
#install scripts
|
#install scripts
|
||||||
echo -e "\ninstalling scripts \c"
|
echo -e "\ninstalling scripts \c"
|
||||||
if [ ! -d "$ghnhome/scripts" ]; then
|
if [ ! -d "$ghnhome/scripts" ]
|
||||||
if [ -z "$dryrun" ]; then
|
then
|
||||||
mkdir $ghnhome/scripts
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
mkdir $ghnhome/scripts
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $distroscripts/*;
|
for f in $distroscripts/*;
|
||||||
do
|
do
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]
|
||||||
cp $f $ghnhome/scripts/
|
then
|
||||||
fi
|
cp $f $ghnhome/scripts/
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "."
|
echo -n "."
|
||||||
sleep .01
|
sleep .01
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#install config
|
#install config
|
||||||
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}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function replace_property {
|
function replace_property {
|
||||||
local PROPERTY=$1
|
local PROPERTY=$1
|
||||||
#local OLD_LINE=$(sed -n "/${PROPERTY}/p" $ghnhome/container.xml)
|
local NEW_LINE=$(sed -n "/${PROPERTY}/p" $distro/container.ini)
|
||||||
local NEW_LINE=$(sed -n "/${PROPERTY}/p" $distro/container.xml)
|
change_line "${PROPERTY}" "${NEW_LINE}" $ghnhome/container.ini
|
||||||
#echo "Replacing property ${PROPERTY}:"
|
|
||||||
#echo $OLD_LINE
|
|
||||||
#echo $NEW_LINE
|
|
||||||
change_line "${PROPERTY}" "${NEW_LINE}" $ghnhome/container.xml
|
|
||||||
#echo "done."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "\ninstalling configuration \c"
|
echo -e "\ninstalling configuration \c"
|
||||||
if [ ! -s "$ghnhome/container.xml" ]; then
|
if [ ! -s "$ghnhome/container.ini" ]
|
||||||
if [ -z "$dryrun" ]; then
|
then
|
||||||
cp $distro/container.xml $ghnhome/
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
|
cp $distro/container.ini $ghnhome/
|
||||||
fi
|
fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
sleep .01
|
sleep .01
|
||||||
else
|
else
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]; then
|
||||||
#echo "Creating a backup copy of $ghnhome/container.xml"
|
#echo "Creating a backup copy of $ghnhome/container.ini"
|
||||||
cp $ghnhome/container.xml $ghnhome/container.xml.bck
|
cp $ghnhome/container.ini $ghnhome/container.ini.bck
|
||||||
|
|
||||||
## Please note the ' at the end of SmartGearsDistribution property
|
## Please note the ' at the end of SmartGearsDistribution property
|
||||||
## the ' is needed to exactly math the property otherwise also
|
## the ' is needed to exactly math the property otherwise also
|
||||||
|
@ -249,22 +268,27 @@ else
|
||||||
replace_property $property
|
replace_property $property
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "."
|
echo -n "."
|
||||||
sleep .01
|
sleep .01
|
||||||
fi
|
fi
|
||||||
if [ -z "$dryrun" ]; then
|
|
||||||
cat $distro/logback.xml | sed "s|\${LOGFILE}|$ghnhome|" > $shared/logback.xml
|
if [ -z "$dryrun" ]
|
||||||
echo -n "."
|
then
|
||||||
sleep .01
|
cat $distro/logback.xml | sed "s|\${LOGFILE}|$ghnhome|" > $shared/logback.xml
|
||||||
|
echo -n "."
|
||||||
|
sleep .01
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#creating the symlink to shared and apps folder
|
#creating the symlink to shared and apps folder
|
||||||
|
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
ln -s $shared $ghnhome/lib
|
ln -s $shared $ghnhome/lib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]
|
||||||
|
then
|
||||||
ln -s $apps $ghnhome/apps
|
ln -s $apps $ghnhome/apps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<configuration scan="true" debug="false">
|
<configuration scan="true" debug="false">
|
||||||
|
|
||||||
<appender name="FILE"
|
<appender name="FILE"
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
[node]
|
||||||
|
; mandatory
|
||||||
|
; optional fields: mode (=online), publicationFrequencyInSeconds (=60), authorizeChildrenContext (=false)
|
||||||
|
mode = offline
|
||||||
|
hostname = localhost
|
||||||
|
protocol = http
|
||||||
|
port = 8080
|
||||||
|
infrastructure = gcube
|
||||||
|
authorizeChildrenContext = true
|
||||||
|
publicationFrequencyInSeconds = 60
|
||||||
|
|
||||||
|
[properties]
|
||||||
|
; not mandatory
|
||||||
|
SmartGearsDistribution = ${project.version}
|
||||||
|
SmartGearsDistributionBundle = UnBundled
|
||||||
|
|
||||||
|
[site]
|
||||||
|
; mandatory
|
||||||
|
country = it
|
||||||
|
location = rome
|
||||||
|
|
||||||
|
;[proxy]
|
||||||
|
; not mandatory
|
||||||
|
;protocol = https
|
||||||
|
;hostname = proxy
|
||||||
|
;port = 80
|
||||||
|
|
||||||
|
|
||||||
|
[authorization]
|
||||||
|
; mandatory
|
||||||
|
; optional fields: provider factory (=org.gcube.smartgears.security.defaults.DefaultAuthorizationProviderFactory)
|
||||||
|
factory = org.gcube.smartgears.security.defaults.DefaultAuthorizationProviderFactory
|
||||||
|
factory.endpoint = https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/token
|
||||||
|
credentials.class = org.gcube.smartgears.security.SimpleCredentials
|
||||||
|
credentials.clientID = testClient
|
||||||
|
credentials.secret = testSecret
|
||||||
|
|
||||||
|
;[persistence]
|
||||||
|
; not mandatory (default is LocalPersistence writing in the ghn home)
|
||||||
|
;class = utils.PersistenceWriterTest
|
||||||
|
;location = /tmp
|
|
@ -1,41 +0,0 @@
|
||||||
<container mode='offline'>
|
|
||||||
|
|
||||||
<hostname>localhost</hostname>
|
|
||||||
<port>8080</port>
|
|
||||||
<infrastructure>gcube</infrastructure>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Add container tokens generated via portal for this host and port.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<token>token1</token>
|
|
||||||
<token>token2</token>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
this tag enables authorize calls to this container also on VRE belonging to start tokens
|
|
||||||
-->
|
|
||||||
<!-- <authorizeChildrenContext>true</authorizeChildrenContext> -->
|
|
||||||
|
|
||||||
<site>
|
|
||||||
<country>it</country>
|
|
||||||
<location>rome</location>
|
|
||||||
<latitude>41.9000</latitude>
|
|
||||||
<longitude>12.5000</longitude>
|
|
||||||
</site>
|
|
||||||
|
|
||||||
<property name='SmartGearsDistribution' value='${project.version}' />
|
|
||||||
<property name='SmartGearsDistributionBundle' value='UnBundled' />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Add your own property value here. This values will be published on
|
|
||||||
GHN porfile in /Profile/GHNDescription/RunTimeEnv/ tag.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<property name='prop1' value='val1' />
|
|
||||||
<property name='prop2' value='val2' />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<publication-frequency>60</publication-frequency>
|
|
||||||
|
|
||||||
</container>
|
|
|
@ -21,6 +21,12 @@
|
||||||
<fileMode>755</fileMode>
|
<fileMode>755</fileMode>
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>/config/apps</outputDirectory>
|
||||||
|
<directory>${distroDirectory}/config/apps</directory>
|
||||||
|
<useDefaultExcludes>true</useDefaultExcludes>
|
||||||
|
<fileMode>755</fileMode>
|
||||||
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${distroDirectory}/contents</directory>
|
<directory>${distroDirectory}/contents</directory>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
|
@ -47,8 +53,8 @@
|
||||||
</fileSets>
|
</fileSets>
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>${distroDirectory}/contents/samplecontainer.xml</source>
|
<source>${distroDirectory}/contents/samplecontainer.ini</source>
|
||||||
<destName>container.xml</destName>
|
<destName>container.ini</destName>
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
</file>
|
</file>
|
||||||
</files>
|
</files>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
REGISTRY_URL="hub.dev.d4science.org"
|
||||||
|
#USERNAME="alfredo.oliviero"
|
||||||
|
echo "to obtain Harbor username and CLI secret:"
|
||||||
|
echo "https://hub.dev.d4science.org/ -> user profile -> CLI secret"
|
||||||
|
|
||||||
|
read -p "username:" USERNAME
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
read -s -p "CLI secret:" ACCESS_TOKEN
|
||||||
|
echo "$ACCESS_TOKEN" | docker login $REGISTRY_URL -u $USERNAME --password-stdin
|
||||||
|
unset ACCESS_TOKEN
|
72
pom.xml
72
pom.xml
|
@ -1,53 +1,47 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>maven-parent</artifactId>
|
<artifactId>maven-parent</artifactId>
|
||||||
<groupId>org.gcube.tools</groupId>
|
<groupId>org.gcube.tools</groupId>
|
||||||
<version>1.1.0</version>
|
<version>1.2.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>smartgears-distribution</artifactId>
|
<artifactId>smartgears-distribution</artifactId>
|
||||||
<version>3.4.3</version>
|
<version>4.0.1-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>A distribution for the SmartGears Framework</name>
|
<name>A distribution for the SmartGears Framework</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<distroDirectory>distro</distroDirectory>
|
<distroDirectory>distro</distroDirectory>
|
||||||
<wiki>https://wiki.gcube-system.org/gcube/SmartGears</wiki>
|
<wiki>https://wiki.gcube-system.org/gcube/SmartGears</wiki>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
<connection>
|
||||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
|
scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
||||||
|
<developerConnection>
|
||||||
|
scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
|
||||||
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
|
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>gcube-smartgears-bom</artifactId>
|
<artifactId>gcube-smartgears-bom</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>3.0.1-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-smartgears</artifactId>
|
<artifactId>common-smartgears</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.gcube.core</groupId>
|
|
||||||
<artifactId>common-smartgears-utils</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>gxHTTP</artifactId>
|
<artifactId>gxHTTP</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
|
@ -64,15 +58,31 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.information-system</groupId>
|
<groupId>org.gcube.information-system</groupId>
|
||||||
<artifactId>resource-registry-client</artifactId>
|
<artifactId>resource-registry-client</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>common-utility-sg3</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.information-system</groupId>
|
<groupId>org.gcube.information-system</groupId>
|
||||||
<artifactId>resource-registry-publisher</artifactId>
|
<artifactId>resource-registry-publisher</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>common-utility-sg3</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>common-utility-sg4</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.data.publishing</groupId>
|
<groupId>org.gcube.data.publishing</groupId>
|
||||||
<artifactId>document-store-lib-accounting-service</artifactId>
|
<artifactId>document-store-lib-accounting-service</artifactId>
|
||||||
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
|
<version>[2.0.0,3.0.0-SNAPSHOT)</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -83,20 +93,30 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-smartgears</artifactId>
|
<artifactId>common-smartgears</artifactId>
|
||||||
<version>[3.0.0,4.0.0-SNAPSHOT)</version>
|
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
||||||
<classifier>probe</classifier>
|
<classifier>probe</classifier>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- publisher connectors -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.information-system</groupId>
|
||||||
|
<artifactId>resource-registry-publisher-connector</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.common.core</groupId>
|
||||||
|
<artifactId>legacy-is-publisher-connector</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.resourcemanagement</groupId>
|
<groupId>org.gcube.resourcemanagement</groupId>
|
||||||
<artifactId>whn-manager</artifactId>
|
<artifactId>whn-manager</artifactId>
|
||||||
<version>[2.0.0,3.0.0-SNAPSHOT)</version>
|
<version>[3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)</version>
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.gcube.data.transfer</groupId>
|
|
||||||
<artifactId>data-transfer-service</artifactId>
|
|
||||||
<version>[2.0.0,3.0.0-SNAPSHOT)</version>
|
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -137,8 +157,6 @@
|
||||||
<stripVersion>true</stripVersion>
|
<stripVersion>true</stripVersion>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
|
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
logs=/etc/logback.xml
|
||||||
|
container=/etc/container.ini
|
||||||
|
configfolder=/etc/config
|
||||||
|
|
||||||
|
if [ -f "$logs" ]; then
|
||||||
|
cp $logs /tomcat/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$container" ]; then
|
||||||
|
cp $container /smartgears-distribution
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$configfolder" ] && ! [ -z "$(ls -A $configfolder)" ]; then
|
||||||
|
echo "config folder exists and is not empty"
|
||||||
|
cp -R $configfolder/* /smartgears-distribution/config/apps/
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue