Compare commits

...

33 Commits

Author SHA1 Message Date
Antonio Calanducci 94b1ce4709 Stop tracking .DS_Store 2023-12-22 10:23:05 +01:00
Antonio Calanducci 243585fb80 Add .DS_Store to .gitignore 2023-12-22 10:22:34 +01:00
Antonio Calanducci 914a96ec8a Revert the latest commit modification (the publisher is updated by the resource manager image) 2023-12-21 15:20:07 +01:00
Antonio Calanducci af65533d82 Replace registry-publisher with a newer version 2023-12-21 12:25:47 +01:00
Antonio Calanducci 48def2086c Add updated common-scope-maps 2023-12-20 16:01:58 +01:00
Antonio Calanducci 61e44b1af5 Trying to fix resource manager build via jenkins 2023-12-19 17:15:43 +01:00
Antonio Calanducci 3a06e615e3 Add the ServiceMaps for all the VOs 2023-12-19 16:59:34 +01:00
Antonio Calanducci abc64eeb96 Update JenkinsFile to trigger RM and VREModeler image build 2023-12-11 11:21:47 +01:00
Antonio Calanducci 42ca067991 Fix LOGNAME env variable to properly call gcore-stop-container 2023-12-06 10:34:59 +01:00
Antonio Calanducci 3dacb211ad Change Dockerfile entrypoint to do nothing 2023-12-05 16:42:14 +01:00
Antonio Calanducci a239273b13 Remove symlink creation in gcube-start-container 2023-11-23 15:37:36 +01:00
Antonio Calanducci 70ce2d4ecd Add a path on NFS to distinguish between hosts 2023-11-22 10:46:13 +01:00
Antonio Calanducci b526519e72 Remove cleanup code in gcore-start-container 2023-11-21 18:34:33 +01:00
Antonio Calanducci e5543ed528 Create directory on NFS for storing Resource Manager state 2023-11-21 15:23:06 +01:00
Antonio Calanducci 708ff33c83 Restore logs to ERROR level 2023-11-10 11:44:52 +01:00
Antonio Calanducci 7297409e6f Add loggin for DEBUG events and nano for local editing 2023-11-09 11:02:00 +01:00
Antonio Calanducci a09e2c8b0b Update gcube-start-container script to create gcube-data dirs 2023-11-08 12:15:11 +01:00
Antonio Calanducci 9800815d0a fix mv command 2023-11-07 11:06:16 +01:00
Antonio Calanducci 66601c7557 Fix bug in start script 2023-11-06 16:45:05 +01:00
Antonio Calanducci 28dcff38ea Update start-container script to check if data are already on NFS 2023-11-06 16:16:58 +01:00
Antonio Calanducci bcf02f938d Update permissions to files in gcube homedir 2023-11-06 14:00:13 +01:00
Antonio Calanducci cb8b7a5f94 Update owner of gCore distro files to gcube:gcube 2023-11-06 11:48:22 +01:00
Antonio Calanducci e6d90bccb2 Update logging settings and fix ownership to gcube:gcube 2023-11-02 16:57:22 +01:00
Antonio Calanducci 5712b853ed Replace common-authorization lib to fix auth dev endpoint 2023-10-26 15:11:08 +00:00
Antonio Calanducci a93b11ea47 Avoid to use nohup to start the gcore container 2023-10-25 11:49:20 +02:00
Antonio Calanducci f0b0bb3b1d Update ghn distro to the latest production release and try to fix logging to stdout 2023-10-25 10:48:00 +02:00
Antonio Calanducci caba790a9f Merge branch 'master' of code-repo.d4science.org:gCubeSystem/ghn-distribution-image 2023-10-18 11:43:36 +02:00
Antonio Calanducci 130f02afbf Add gcube-data creation and move eXist's DB to NFS if the instance is a collector 2023-10-18 11:42:01 +02:00
Antonio Calanducci 52f76845a2 add fake-accounting-lib 2023-10-18 09:24:11 +02:00
Roberto Cirillo fbbc8184de Update 'JenkinsFile'
add trigger to is-collector too
2023-10-12 16:24:44 +02:00
Antonio Calanducci c175904a43 Merge branch 'master' of code-repo.d4science.org:gCubeSystem/ghn-distribution-image 2023-10-11 16:51:36 +02:00
Antonio Calanducci d607a3f5ab Set timezone to Europe/Rome 2023-10-11 16:49:12 +02:00
Roberto Cirillo 9a1edcdd68 Merge pull request 'feature/25819' (#1) from feature/25819 into master
Reviewed-on: #1
2023-10-06 14:48:11 +02:00
13 changed files with 276 additions and 11 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
# ---> Ansible
*.retry
.DS_Store
src/java-7-oracle.tar.gz
Dockerfile.almalinux8-java7
Dockerfile.ubuntu14-java7

View File

@ -7,6 +7,8 @@ ENV J2REDIR=/usr/lib/jvm/zulu7/jre
ENV JAVA_HOME=/usr/lib/jvm/zulu7
ENV PATH=$JAVA_HOME/bin:$JAVA_HOME/db/bin:$JAVA_HOME/jre/bin:$PATH
ENV TZ="Europe/Rome"
# ENV DERBY_HOME=/docker-java-home/db
ENV USER=gcube
ENV GLOBUS_LOCATION=/home/gcube/gCore
@ -15,23 +17,69 @@ ENV PATH=$GLOBUS_LOCATION/bin:$PATH
#ENV EXIST_HOME=
#ENV GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME"
ENV GLOBUS_OPTIONS=""
ENV USER=$LOGNAME
ENV LOGNAME=$USER
ENV GCORE_START_OPTIONS="-DX509_USER_PROXY=$X509_USER_PROXY -Xms2800M -Xmx4800M"
RUN adduser --system --gecos "Gcube service user" --disabled-password --disabled-login --uid 333 --shell /usr/sbin/nologin gcube
RUN addgroup --system --gid 333 gcube
RUN adduser --system --gecos "Gcube service user" --disabled-password --disabled-login --uid 333 --ingroup gcube --shell /usr/sbin/nologin gcube
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y wget nano less
WORKDIR /home/gcube
RUN cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-staging-gcore/org/gcube/distribution/ghn-distribution/7.0.1-4.16.0-144317/ghn-distribution-7.0.1-4.16.0-144317.tar.gz && tar zxf ghn-distribution-7.0.1-4.16.0-144317.tar.gz && rm -f ghn-distribution-7.0.1-4.16.0-144317.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
RUN cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-releases/org/gcube/distribution/ghn-distribution/7.0.0-4.2.0-132545/ghn-distribution-7.0.0-4.2.0-132545.tar.gz && tar zxf ghn-distribution-7.0.0-4.2.0-132545.tar.gz && rm -f ghn-distribution-7.0.0-4.2.0-132545.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown -R gcube:gcube /home/gcube/gCore
#chown gcube:gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
RUN chmod -R u=rwX,g=rX,o-rwx /home/gcube
RUN rm /home/gcube/gCore/lib/accounting-lib-2.3.0-4.2.0-132276.jar
RUN rm /home/gcube/gCore/lib/document-store-lib-1.4.0-4.2.0-135110.jar
RUN rm /home/gcube/gCore/lib/document-store-lib-couchbase-1.2.0-4.2.0-131889.jar
# RUN cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-staging-gcore/org/gcube/distribution/ghn-distribution/7.0.1-4.16.0-144317/ghn-distribution-7.0.1-4.16.0-144317.tar.gz && tar zxf ghn-distribution-7.0.1-4.16.0-144317.tar.gz && rm -f ghn-distribution-7.0.1-4.16.0-144317.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
# add fake-accounting-lib
# RUN rm /home/gcube/gCore/lib/accounting-lib-3.5.0.jar
# RUN rm /home/gcube/gCore/lib/document-store-lib-2.5.0.jar
# RUN rm /home/gcube/gCore/lib/document-store-lib-couchbase-1.6.0-4.16.0-171307.jar
RUN wget -P /home/gcube/gCore/lib https://nexus.d4science.org/nexus/content/repositories/gcube-snapshots/org/gcube/accounting/fake-accounting-lib/3.2.0-SNAPSHOT/fake-accounting-lib-3.2.0-20190311.105710-2.jar
RUN rm /home/gcube/gCore/lib/is-publisher-2.2.0-4.2.0-126946.jar
RUN wget -P /home/gcube/gCore/lib https://nexus.d4science.org/nexus/content/repositories/gcube-releases-gcore/org/gcube/informationsystem/is-publisher/2.2.1-4.15.0-181697/is-publisher-2.2.1-4.15.0-181697.jar
COPY src/gcube-start-container.sh /home/gcube/gCore/bin/gcore-start-container
COPY src/gcore-start-container-daemon /home/gcube/gCore/bin/gcore-start-container-daemon
COPY src/GHNConfig.xml /home/gcube/gCore/config/GHNConfig.xml
RUN rm /home/gcube/gCore/lib/common-authorization-2.0.1-4.2.0-139995.jar
COPY src/common-authorization-2.0.2-4.3.0.jar /home/gcube/gCore/lib/
RUN rm /home/gcube/gCore/lib/common-scope-maps-1.0.5-4.2.0-134574.jar
COPY src/common-scope-maps-1.1.0-4.15.0-178670.jar /home/gcube/gCore/lib/
COPY src/ServiceMaps.tar.gz /home/gcube/
RUN tar xzvf /home/gcube/ServiceMaps.tar.gz -C /home/gcube/gCore/config/
RUN chmod 750 /home/gcube/gCore/config/ServiceMap_*.xml
# Update loggin settings
# Log with debug
# COPY src/container-log4j.properties.stdout.debug /home/gcube/gCore/container-log4j.properties
COPY src/container-log4j.properties /home/gcube/gCore/
COPY src/logging.jul.properties /home/gcube/gCore/
RUN chown -R gcube:gcube /home/gcube/gCore
# COPY src/log4j-stdout-appender.patch /home/gcube/gCore/
# RUN cat /home/gcube/gCore/log4j-stdout-appender.patch >> /home/gcube/gCore/container-log4j.properties
# RUN sed -i 's/log4j.rootLogger=ERROR,FULL,LITE/log4j.rootLogger=ERROR,stdout/' /home/gcube/gCore/container-log4j.properties
RUN $GLOBUS_LOCATION/bin/gcore-load-env
RUN chmod 755 /home/gcube/gCore/bin/gcore-start-container
# Remove Resultset from distribution
# RUN /home/gcube/gCore/bin/gcore-undeploy-service org.gcube.common.searchservice.resultsetservice
RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.16.0-126939
EXPOSE 8080
# RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.16.0-126939
RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.2.0-126939
RUN mkdir /gcube-data && chown gcube.nogroup /gcube-data
USER gcube
ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
EXPOSE 8080
CMD /home/gcube/gCore/bin/gcore-start-container
# ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
# ENTRYPOINT ["tail", "-f", "/dev/null"]
# For Spring-Boot project, use the entrypoint below to reduce Tomcat startup time.
#ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ansibleplaybookisregistryservice.jar

View File

@ -48,5 +48,26 @@ pipeline {
}
}
}
stage('trigger IS-collector image job') {
steps {
script {
build(job: 'is-collector-service-image', wait: false, propagate: false);
}
}
}
stage('trigger Resource Manager image job') {
steps {
script {
build(job: 'resource-manager-service-image', wait: false, propagate: false);
}
}
}
stage('trigger VRE Modeler image job') {
steps {
script {
build(job: 'vremodeler-image', wait: false, propagate: false);
}
}
}
}
}

View File

@ -5,11 +5,11 @@ The included Docker file will build a default image for the gHN distribution
## Build the image
```shell
$ docker build -t ghn-distribution .
$ docker build -t gcore-distribution .
```
## Run the image
```shell
$ docker container run --name gcore-hosting-node -p 8080:8080 ghn-distribution
$ docker container run --name gcore-hosting-node -p 8080:8080 gcore-distribution
```

BIN
src/.DS_Store vendored Normal file

Binary file not shown.

BIN
src/ServiceMaps.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,47 @@
# Base logger shows ERRORs only by default and sends them to 2 appenders
log4j.rootLogger=INFO,FULL
log4j.appender.FULL=org.apache.log4j.ConsoleAppender
log4j.appender.FULL.layout=org.apache.log4j.PatternLayout
log4j.appender.FULL.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.FULL.threshold=INFO
#system-loggers, overwrite default priority of root logger
log4j.logger.org.gcube=INFO
#globus logger with dedicated appender and no propagation to root logger
log4j.logger.org.globus.wsrf=WARN,GLOBUS
log4j.appender.GLOBUS=org.apache.log4j.ConsoleAppender
log4j.appender.GLOBUS.layout=org.apache.log4j.PatternLayout
log4j.appender.GLOBUS.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.delegation=ERROR, DELEGATION
log4j.appender.DELEGATION=org.apache.log4j.ConsoleAppender
log4j.appender.DELEGATION.layout=org.apache.log4j.PatternLayout
log4j.appender.DELEGATION.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.DELEGATION.threshold=INFO
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.vremanagement.ghnmanager=ERROR, MANAGER
log4j.appender.MANAGER=org.apache.log4j.ConsoleAppender
log4j.appender.MANAGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MANAGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.MANAGER.threshold=INFO
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.vremanagement.deployer=ERROR, DEPLOYER
log4j.appender.DEPLOYER.layout=org.apache.log4j.PatternLayout
log4j.appender.DEPLOYER=org.apache.log4j.ConsoleAppender
log4j.appender.DEPLOYER.threshold=INFO
#GCUBEHandler logger
log4j.logger.org.gcube.common.handlers=TRACE, ACCESS
log4j.appender.ACCESS=org.apache.log4j.ConsoleAppender
log4j.appender.ACCESS.layout=org.apache.log4j.PatternLayout
log4j.appender.ACCESS.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.ACCESS.threshold=INFO

View File

@ -0,0 +1,47 @@
# Base logger shows ERRORs only by default and sends them to 2 appenders
log4j.rootLogger=DEBUG,FULL
log4j.appender.FULL=org.apache.log4j.ConsoleAppender
log4j.appender.FULL.layout=org.apache.log4j.PatternLayout
log4j.appender.FULL.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.FULL.threshold=DEBUG
#system-loggers, overwrite default priority of root logger
log4j.logger.org.gcube=DEBUG
#globus logger with dedicated appender and no propagation to root logger
log4j.logger.org.globus.wsrf=WARN,GLOBUS
log4j.appender.GLOBUS=org.apache.log4j.ConsoleAppender
log4j.appender.GLOBUS.layout=org.apache.log4j.PatternLayout
log4j.appender.GLOBUS.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.delegation=ERROR, DELEGATION
log4j.appender.DELEGATION=org.apache.log4j.ConsoleAppender
log4j.appender.DELEGATION.layout=org.apache.log4j.PatternLayout
log4j.appender.DELEGATION.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.DELEGATION.threshold=INFO
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.vremanagement.ghnmanager=ERROR, MANAGER
log4j.appender.MANAGER=org.apache.log4j.ConsoleAppender
log4j.appender.MANAGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MANAGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.MANAGER.threshold=INFO
#service-specific logger with dedicated appender
log4j.logger.org.gcube.common.vremanagement.deployer=ERROR, DEPLOYER
log4j.appender.DEPLOYER.layout=org.apache.log4j.PatternLayout
log4j.appender.DEPLOYER=org.apache.log4j.ConsoleAppender
log4j.appender.DEPLOYER.threshold=INFO
#GCUBEHandler logger
log4j.logger.org.gcube.common.handlers=TRACE, ACCESS
log4j.appender.ACCESS=org.apache.log4j.ConsoleAppender
log4j.appender.ACCESS.layout=org.apache.log4j.PatternLayout
log4j.appender.ACCESS.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
log4j.appender.ACCESS.threshold=INFO

View File

@ -0,0 +1,49 @@
#! /bin/sh
#
# Portions of this file Copyright 1999-2005 University of Chicago
# Portions of this file Copyright 1999-2005 The University of Southern California.
#
# This file or a portion of this file is licensed under the
# terms of the Globus Toolkit Public License, found at
# http://www.globus.org/toolkit/download/license.html.
# If you redistribute this file, with or without
# modifications, you must include this notice in the file.
#
RESTART_DELAY=20
RESTART_FILE=$GLOBUS_LOCATION/config/.restart
RESTART_AND_CLEAN_FILE=$GLOBUS_LOCATION/config/.restartAndClean
#kill the running daemons (if any)
rm -rf nohup.out 1>/dev/null 2>&1
ps -fwww -u $LOGNAME | grep "org.globus.wsrf.container.ServiceContainer" | grep -v grep | grep -v $$ | awk '{print $2}' | xargs -n1 kill -9 1>/dev/null 2>&1
#give the time to close the socket correctly
sleep 1
$GLOBUS_LOCATION/bin/gcore-start-container-reboot "$@"
while [ 1 ]; do
sleep 10
if [ -e $RESTART_FILE ]; then
rm -rf $RESTART_FILE
sleep $RESTART_DELAY
$GLOBUS_LOCATION/bin/gcore-start-container-reboot "$@"
fi
if [ -e $RESTART_AND_CLEAN_FILE ]; then
rm -rf $RESTART_AND_CLEAN_FILE
sleep $RESTART_DELAY
#clean up the state
rm -f $GLOBUS_LOCATION/config/GHNProfile.xml* 2>&1 1>/dev/null
rm -f $GLOBUS_LOCATION/etc/*/RIProfile.xml* 2>&1 1>/dev/null
rm -rf $HOME/.gcore/ 2>&1 1>/dev/null
#restart
$GLOBUS_LOCATION/bin/gcore-start-container-reboot "$@"
fi
done

View File

@ -1,4 +1,32 @@
#! /bin/sh
#! /bin/bash
# if [ -n "$EXIST_HOME" ]; then
# # our container is running a IS Collector
# if [ -L "$EXIST_HOME/webapp/WEB-INF/data" ] ; then
# # exist data has been already mounted on NFS
# echo "eXist data should be already in place on NFS"
# elif [ -d "$EXIST_HOME/webapp/WEB-INF/data" ] ; then
# echo "First run: set up our directory structure on the NFS mountpoint"
# mkdir -p /gcube-data/{db,backup} && mv $EXIST_HOME/webapp/WEB-INF/{data,logs,attachments} /gcube-data/db/
# if [ $? -eq 0 ]; then
# for dir in {data,logs,attachments}; do
# ln -s /gcube-data/db/${dir} $EXIST_HOME/webapp/WEB-INF/${dir}
# done
# else
# echo "Move failed: data already exists on NFS"
# exit 1
# fi
# else
# echo "Not a link, not a directory: a pony :-)?"
# fi
# fi
# mkdir -p /gcube-data/db/{data,logs,attachments}
# mkdir -p $NFS_GCORE_PATH/persisted
# mkdir $HOME/.gcore && chown gcube:gcube $HOME/.gcore
# ln -s $NFS_GCORE_PATH/persisted $HOME/.gcore/
if [ -z "$GLOBUS_LOCATION" ]
then
@ -45,7 +73,7 @@ newargs="$mode $newargs"
[ -e "$GLOBUS_LOCATION/tmp" ] || mkdir -p $GLOBUS_LOCATION/tmp
#clean up the services' state if needed
[ -f "$GLOBUS_LOCATION/config/GHNProfile.xml" ] || rm -rf ~/.gcore
#[ -f "$GLOBUS_LOCATION/config/GHNProfile.xml" ] || rm -rf ~/.gcore
cd $GLOBUS_LOCATION
echo "gCore is running with ($newargs) and logging into logs/container.log..."

View File

@ -0,0 +1,20 @@
# Log levels in descending order OFF,SEVERE,WARNING,INFO,CONFIG,FINE,FINER,FINEST,ALL
handlers = java.util.logging.FileHandler
# Set the default logging level for the root logger
.level = OFF
# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = OFF
# Set the default formatter for new FileHandler instances
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern = logs/jul.%g.log
java.util.logging.FileHandler.limit = 2000000
java.util.logging.FileHandler.count = 10
# Set the default logging level for the logger named ...
gr.uoa.level = OFF
org.gcube.level = OFF
com.sun = OFF