Update ghn distro to the latest production release and try to fix logging to stdout
This commit is contained in:
parent
caba790a9f
commit
f0b0bb3b1d
31
Dockerfile
31
Dockerfile
|
@ -23,24 +23,43 @@ 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 apt-get update
|
||||
RUN apt-get install -y wget
|
||||
|
||||
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 gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
|
||||
|
||||
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 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/GHNConfig.xml /home/gcube/gCore/config/GHNConfig.xml
|
||||
|
||||
COPY src/container-log4j.properties /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
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
|
||||
# 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
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
# Base logger shows ERRORs only by default and sends them to 2 appenders
|
||||
log4j.rootLogger=ERROR,FULL,LITE,stdout
|
||||
|
||||
log4j.appender.FULL=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.FULL.file=${GLOBUS_LOCATION}/logs/container.fulllog
|
||||
log4j.appender.FULL.MaxFileSize=10000KB
|
||||
log4j.appender.FULL.MaxBackupIndex=100
|
||||
log4j.appender.FULL.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.FULL.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
|
||||
|
||||
#LITE appender has a threashold of INFO
|
||||
#log4j.appender.LITE=org.apache.log4j.RollingFileAppender
|
||||
#log4j.appender.LITE.file=${GLOBUS_LOCATION}/logs/container.log
|
||||
log4j.appender.LITE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.LITE.Target=System.out
|
||||
#log4j.appender.LITE.MaxFileSize=10000KB
|
||||
#log4j.appender.LITE.MaxBackupIndex=100
|
||||
log4j.appender.LITE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.LITE.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
|
||||
log4j.appender.LITE.threshold=DEBUG
|
||||
|
||||
#system-loggers, overwrite default priority of root logger
|
||||
log4j.logger.org.gcube=TRACE
|
||||
log4j.logger.gr.uoa.di.madgik=TRACE
|
||||
|
||||
#globus logger with dedicated appender and no propagation to root logger
|
||||
log4j.logger.org.globus.wsrf=WARN,GLOBUS
|
||||
#set to false to isolate globus logs
|
||||
log4j.additivity.org.globus.wsrf=true
|
||||
log4j.appender.GLOBUS=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.GLOBUS.file=${GLOBUS_LOCATION}/logs/globus.log
|
||||
log4j.appender.GLOBUS.MaxFileSize=10000KB
|
||||
log4j.appender.GLOBUS.MaxBackupIndex=1
|
||||
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=TRACE, DELEGATION
|
||||
log4j.appender.DELEGATION=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.DELEGATION.file=${GLOBUS_LOCATION}/logs/delegation.log
|
||||
log4j.appender.DELEGATION.MaxFileSize=10000KB
|
||||
log4j.appender.DELEGATION.MaxBackupIndex=10
|
||||
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=TRACE
|
||||
|
||||
#service-specific logger with dedicated appender
|
||||
log4j.logger.org.gcube.common.vremanagement.ghnmanager=TRACE, MANAGER
|
||||
log4j.appender.MANAGER=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.MANAGER.file=${GLOBUS_LOCATION}/logs/ghnmanager.log
|
||||
log4j.appender.MANAGER.MaxFileSize=10000KB
|
||||
log4j.appender.MANAGER.MaxBackupIndex=10
|
||||
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=TRACE
|
||||
|
||||
#service-specific logger with dedicated appender
|
||||
log4j.logger.org.gcube.common.vremanagement.deployer=TRACE, DEPLOYER
|
||||
log4j.appender.DEPLOYER=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.DEPLOYER.file=${GLOBUS_LOCATION}/logs/deployer.log
|
||||
log4j.appender.DEPLOYER.MaxFileSize=10000KB
|
||||
log4j.appender.DEPLOYER.MaxBackupIndex=10
|
||||
log4j.appender.DEPLOYER.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.DEPLOYER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
|
||||
log4j.appender.DEPLOYER.threshold=TRACE
|
||||
|
||||
#service-specific logger with dedicated appender
|
||||
log4j.logger.org.gcube.common.searchservice.resultsetservice=TRACE, RS
|
||||
log4j.appender.RS=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.RS.file=${GLOBUS_LOCATION}/logs/rs.log
|
||||
log4j.appender.RS.MaxFileSize=10000KB
|
||||
log4j.appender.RS.MaxBackupIndex=10
|
||||
log4j.appender.RS.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.RS.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
|
||||
log4j.appender.RS.threshold=TRACE
|
||||
|
||||
#GCUBEHandler logger
|
||||
log4j.logger.org.gcube.common.handlers=TRACE,ACCESS
|
||||
log4j.appender.ACCESS=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.ACCESS.file=${GLOBUS_LOCATION}/logs/access.log
|
||||
log4j.appender.ACCESS.DatePattern='.'yyyy-MM-dd
|
||||
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
|
||||
log4j.appender.ACCESS.MaxBackupIndex=30
|
||||
|
||||
|
||||
# Redirect log messages to console
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L – %m%n
|
Loading…
Reference in New Issue