Merge pull request 'Role that installs and configures a eXistDB service.' (#172) from adellam/ansible-roles:master into master
This commit is contained in:
commit
b2b4a28eb2
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
exist_db_major: 5
|
||||
exist_db_minor: 2
|
||||
exist_db_patch: 0
|
||||
exist_db_version: '{{ exist_db_major }}.{{ exist_db_minor }}.{{ exist_db_patch }}'
|
||||
exist_db_distribution_dir: 'exist-distribution-{{ exist_db_version }}'
|
||||
exist_db_distribution: 'https://bintray.com/existdb/releases/download_file?file_path={{ exist_db_distribution_dir }}-unix.tar.bz2'
|
||||
exist_db_http_port: 8080
|
||||
|
||||
exist_db_home: '/srv/existdb'
|
||||
exist_db_data_dir: '/srv/existdb/data'
|
||||
exist_db_journal_dir: '/srv/existdb/data-journal'
|
||||
exist_db_backup_dir: '/srv/existdb/data-backups'
|
||||
exist_db_base_dir: '{{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}'
|
||||
exist_db_logdir: '/var/log/exist-db'
|
||||
#exist_db_conf_dir: '/srv/existdb/etc'
|
||||
exist_db_conf_dir: '{{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/etc'
|
||||
|
||||
# Always express it in 'm' (MegaBytes)
|
||||
exist_db_min_java_heap: '512'
|
||||
exist_db_max_java_heap: '{{ exist_db_min_java_heap }}'
|
||||
# exist_db_max_java_heap / 3
|
||||
exist_db_cache_size: '170'
|
||||
exist_db_file_encoding: 'UTF-8'
|
||||
exist_db_java_opts: "-Xms{{ exist_db_min_java_heap }}m -Xmx{{ exist_db_max_java_heap }}m -server -Djava.awt.headless=true -Dfile.encoding={{ exist_db_file_encoding }}"
|
||||
|
||||
exist_db_consistency_enabled: True
|
||||
exist_db_check_cron: "0 0 0/3 * * ?"
|
||||
exist_db_max_backups_enabled: 6
|
||||
exist_db_backups_enabled: True
|
||||
exist_db_incremental_backups_enabled: "yes"
|
||||
exist_db_backup_cron: "0 0 0/12 * * ?"
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Restart existdb
|
||||
service: name=exist-db state=started enabled=yes
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: '../../library/roles/nginx', when: nginx_enabled is defined and nginx_enabled }
|
||||
- { role: '../../library/roles/openjdk' }
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
- name: Create the exist-db user and the directory tree
|
||||
block:
|
||||
- name: Create the exist-db user
|
||||
user: name={{ exist_db_user }} home={{ exist_db_home }} comment="eXist-db Service Account" createhome=no shell=/usr/sbin/nologin system=yes
|
||||
|
||||
- name: Create the exist-db base path
|
||||
file: dest={{ item }} state=directory mode=0750 owner=root group={{ exist_db_group }}
|
||||
with_items:
|
||||
- '{{ exist_db_home }}'
|
||||
- '{{ exist_db_home }}/distribution'
|
||||
- '{{ exist_db_conf_dir }}'
|
||||
|
||||
- name: Create the exist-db directory tree
|
||||
file: dest={{ item }} state=directory mode=0750 owner={{ exist_db_user }} group={{ exist_db_group }}
|
||||
with_items:
|
||||
- '{{ exist_db_data_dir }}'
|
||||
- '{{ exist_db_journal_dir }}'
|
||||
- '{{ exist_db_backup_dir }}'
|
||||
- '{{ exist_db_logdir }}'
|
||||
|
||||
- name: Link the log and data directories from the exist distribution directory
|
||||
file: dest={{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/{{ item }} state=absent
|
||||
with_items:
|
||||
- 'data'
|
||||
- 'logs'
|
||||
|
||||
- name: Link the log directory into the exist distribution directory
|
||||
file: src={{ exist_db_logdir }} dest={{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/logs state=link
|
||||
|
||||
- name: Link the data directory into the exist distribution directory
|
||||
file: src={{ exist_db_data_dir }} dest={{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/data state=link
|
||||
|
||||
tags: [ 'exist-db', 'exist_db' ]
|
||||
|
||||
- name: Download and unpack the eXist DB distribution
|
||||
block:
|
||||
- name: Download the eXist DB archive
|
||||
get_url: url={{ exist_db_distribution }} dest=/srv/exist-distribution-{{ exist_db_version }}-unix.tar.bz2
|
||||
|
||||
- name: Unarchive the eXist DB distribution
|
||||
unarchive: src=/srv/exist-distribution-{{ exist_db_version }}-unix.tar.bz2 dest={{ exist_db_home }}/distribution remote_src=yes owner=root group=root
|
||||
args:
|
||||
creates: '{{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/lib'
|
||||
|
||||
tags: [ 'exist-db', 'exist_db' ]
|
||||
|
||||
- name: Configure the eXistDB service
|
||||
block:
|
||||
- name: Install the changes to the configuration files in the custom etc/ directory
|
||||
template: src={{ item }}.j2 dest={{ exist_db_conf_dir }}/{{ item }}
|
||||
with_items:
|
||||
- 'conf.xml'
|
||||
- 'log4j2.xml'
|
||||
notify: Restart existdb
|
||||
|
||||
- name: Install the startup scripts
|
||||
template: src={{ item }}.j2 dest={{ exist_db_home }}/distribution/{{ exist_db_distribution_dir }}/bin/{{ item }} owner=root group=root mode=0755
|
||||
with_items:
|
||||
- 'startup.sh'
|
||||
- 'shutdown.sh'
|
||||
- 'backup.sh'
|
||||
- 'client.sh'
|
||||
- 'export.sh'
|
||||
|
||||
- name: Install the exist-db systemd unit
|
||||
template: src=exist-db.service.j2 dest=/lib/systemd/system/exist-db.service owner=root group=root mode=0644
|
||||
register: existdb_unit_install
|
||||
|
||||
- name: Reload the systemd configuration
|
||||
systemd: daemon_reload=yes
|
||||
when: existdb_unit_install is changed
|
||||
|
||||
- name: Ensure that the eXistDB service is running and enabled
|
||||
service: name=exist-db state=started enabled=yes
|
||||
|
||||
tags: [ 'exist-db', 'exist_db', 'exist_db_conf' ]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env sh
|
||||
# eXist Open Source Native XML Database
|
||||
# Copyright (C) 2019 The eXist-db Project
|
||||
# info@exist-db.org
|
||||
# http://www.exist-db.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
#BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
BASEDIR="{{ exist_db_base_dir }}"
|
||||
|
||||
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||
REPO=
|
||||
|
||||
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD=`which java`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||
echo " We cannot execute $JAVACMD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
REPO="$BASEDIR"/lib
|
||||
fi
|
||||
|
||||
CLASSPATH="$BASEDIR"/etc:"$REPO"/appassembler-booter-2.1.0.jar:"$REPO"/appassembler-model-2.1.0.jar:"$REPO"/plexus-utils-3.2.0.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/stax-1.1.1-dev.jar
|
||||
|
||||
ENDORSED_DIR=
|
||||
if [ -n "$ENDORSED_DIR" ] ; then
|
||||
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||
fi
|
||||
|
||||
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS -Xms128m -Dfile.encoding=UTF-8 -Dlog4j.configurationFile={{ exist_db_conf_dir }}/log4j2.xml -Dexist.home="$BASEDIR" -Dexist.configurationFile={{ exist_db_conf_dir }}/conf.xml -Djetty.home="$BASEDIR" -Dexist.jetty.config="$BASEDIR"/etc/jetty/standard.enabled-jetty-configs \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dapp.name="backup" \
|
||||
-Dapp.pid="$$" \
|
||||
-Dapp.repo="$REPO" \
|
||||
-Dapp.home="$BASEDIR" \
|
||||
-Dbasedir="$BASEDIR" \
|
||||
org.codehaus.mojo.appassembler.booter.AppassemblerBooter \
|
||||
"$@"
|
|
@ -0,0 +1,85 @@
|
|||
#!/usr/bin/env sh
|
||||
# eXist Open Source Native XML Database
|
||||
# Copyright (C) 2019 The eXist-db Project
|
||||
# info@exist-db.org
|
||||
# http://www.exist-db.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
BASEDIR="{{ exist_db_base_dir }}"
|
||||
|
||||
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||
REPO=
|
||||
|
||||
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD=`which java`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||
echo " We cannot execute $JAVACMD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
REPO="$BASEDIR"/lib
|
||||
fi
|
||||
|
||||
CLASSPATH="$BASEDIR"/etc:"$REPO"/appassembler-booter-2.1.0.jar:"$REPO"/appassembler-model-2.1.0.jar:"$REPO"/plexus-utils-3.2.0.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/stax-1.1.1-dev.jar
|
||||
|
||||
ENDORSED_DIR=
|
||||
if [ -n "$ENDORSED_DIR" ] ; then
|
||||
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||
fi
|
||||
|
||||
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS -Xms128m -Dfile.encoding=UTF-8 -Dlog4j.configurationFile={{ exist_db_conf_dir }}/log4j2.xml -Dexist.home="$BASEDIR" -Dexist.configurationFile={{ exist_db_conf_dir }}/conf.xml -Djetty.home="$BASEDIR" -Dexist.jetty.config="$BASEDIR"/etc/jetty/standard.enabled-jetty-configs \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dapp.name="client" \
|
||||
-Dapp.pid="$$" \
|
||||
-Dapp.repo="$REPO" \
|
||||
-Dapp.home="$BASEDIR" \
|
||||
-Dbasedir="$BASEDIR" \
|
||||
org.codehaus.mojo.appassembler.booter.AppassemblerBooter \
|
||||
"$@"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description=eXist-db {{ exist_db_version }} Server
|
||||
Documentation=http://www.exist-db.org/exist/apps/doc/documentation
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
#Type=forking
|
||||
Type=simple
|
||||
SyslogIdentifier=existdb
|
||||
User={{ exist_db_user }}
|
||||
Group={{ exist_db_group }}
|
||||
ExecStart={{ exist_db_base_dir }}/bin/startup.sh
|
||||
ExecStop={{ exist_db_base_dir }}/bin/shutdown.sh
|
||||
Restart=on-failure
|
||||
RestartSec=30s
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
#!/usr/bin/env sh
|
||||
# eXist Open Source Native XML Database
|
||||
# Copyright (C) 2019 The eXist-db Project
|
||||
# info@exist-db.org
|
||||
# http://www.exist-db.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
BASEDIR="{{ exist_db_base_dir }}"
|
||||
|
||||
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||
REPO=
|
||||
|
||||
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD=`which java`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||
echo " We cannot execute $JAVACMD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
REPO="$BASEDIR"/lib
|
||||
fi
|
||||
|
||||
CLASSPATH="$BASEDIR"/etc:"$REPO"/appassembler-booter-2.1.0.jar:"$REPO"/appassembler-model-2.1.0.jar:"$REPO"/plexus-utils-3.2.0.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/stax-1.1.1-dev.jar
|
||||
|
||||
ENDORSED_DIR=
|
||||
if [ -n "$ENDORSED_DIR" ] ; then
|
||||
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||
fi
|
||||
|
||||
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS -Xms128m -Dfile.encoding=UTF-8 -Dlog4j.configurationFile={{ exist_db_conf_dir }}/log4j2.xml -Dexist.home="$BASEDIR" -Dexist.configurationFile={{ exist_db_conf_dir }}/conf.xml -Djetty.home="$BASEDIR" -Dexist.jetty.config="$BASEDIR"/etc/jetty/standard.enabled-jetty-configs \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dapp.name="export" \
|
||||
-Dapp.pid="$$" \
|
||||
-Dapp.repo="$REPO" \
|
||||
-Dapp.home="$BASEDIR" \
|
||||
-Dbasedir="$BASEDIR" \
|
||||
org.codehaus.mojo.appassembler.booter.AppassemblerBooter \
|
||||
"$@"
|
|
@ -0,0 +1,252 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Properties>
|
||||
<Property name="logs">{{ exist_db_logdir }}</Property>
|
||||
{% raw %}
|
||||
<Property name="rollover.max.size">10MB</Property>
|
||||
<Property name="rollover.max">14</Property>
|
||||
<Property name="rollover.file.pattern">%d{yyyyMMddHHmmss}</Property>
|
||||
<Property name="exist.file.pattern">%d [%t] %-5p (%F [%M]:%L) - %m %n</Property>
|
||||
</Properties>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<Console name="STDOUT">
|
||||
<PatternLayout pattern="%d{DATE} [%t] %-5p (%F [%M]:%L) - %m %n"/>
|
||||
</Console>
|
||||
|
||||
<RollingRandomAccessFile name="exist.core" filePattern="${logs}/exist.${rollover.file.pattern}.log.gz" fileName="${logs}/exist.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.locks" filePattern="${logs}/locks.${rollover.file.pattern}.log.gz" fileName="${logs}/locks.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="%d %-5p - %m %n"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.ensurelocking" filePattern="${logs}/locks.${rollover.file.pattern}.log.gz" fileName="${logs}/ensure-locking.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="%d %-5p - %m %n"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.xmldb" filePattern="${logs}/xmldb.${rollover.file.pattern}.log.gz" fileName="${logs}/xmldb.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.xmlrpc" filePattern="${logs}/xmlrpc.${rollover.file.pattern}.log.gz" fileName="${logs}/xmlrpc.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.urlrewrite" filePattern="${logs}/urlrewrite.${rollover.file.pattern}.log.gz" fileName="${logs}/urlrewrite.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.profiling" filePattern="${logs}/profile.${rollover.file.pattern}.log.gz" fileName="${logs}/profile.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.scheduler" filePattern="${logs}/scheduler.${rollover.file.pattern}.log.gz" fileName="${logs}/scheduler.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.ehcache" filePattern="${logs}/ehcache.${rollover.file.pattern}.log.gz" fileName="${logs}/ehcache.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.betterform" filePattern="${logs}/betterform.${rollover.file.pattern}.log.gz" fileName="${logs}/betterform.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.restxq" filePattern="${logs}/restxq.${rollover.file.pattern}.log.gz" fileName="${logs}/restxq.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.backup" filePattern="${logs}/backup.${rollover.file.pattern}.log.gz" fileName="${logs}/backup.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.statistics" filePattern="${logs}/statistics.${rollover.file.pattern}.log.gz" fileName="${logs}/statistics.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="expath.repo" filePattern="${logs}/expath-repo.${rollover.file.pattern}.log.gz" fileName="${logs}/expath-repo.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<RollingRandomAccessFile name="exist.launcher" filePattern="${logs}/launcher.${rollover.file.pattern}.log.gz" fileName="${logs}/launcher.log">
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="${rollover.max.size}"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${rollover.max}"/>
|
||||
<PatternLayout pattern="${exist.file.pattern}"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
|
||||
<Logger name="org.exist.storage.lock.LockTable" additivity="false" level="info"> <!-- set to level="trace" to see lock activity -->
|
||||
<AppenderRef ref="exist.locks"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.storage.lock.EnsureLockingAspect" additivity="false" level="trace">
|
||||
<AppenderRef ref="exist.ensurelocking"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.util.sanity.SanityCheck" additivity="false" level="info"> <!-- set to level="trace" to enable all sanity check logging -->
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.jetty.JettyStart" additivity="false" level="trace">
|
||||
<AppenderRef ref="STDOUT"/>
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.jetty.StandaloneServer" additivity="false" level="trace">
|
||||
<AppenderRef ref="STDOUT"/>
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="xquery.profiling" additivity="false" level="trace">
|
||||
<AppenderRef ref="exist.profiling"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.statistics" additivity="false" level="debug">
|
||||
<AppenderRef ref="exist.core"/>
|
||||
<AppenderRef ref="exist.statistics"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.backup.SystemExport" additivity="false" level="trace">
|
||||
<AppenderRef ref="exist.backup"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.xmldb" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.xmldb"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.xmlrpc" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.xmlrpc"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.apache.xmlrpc" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.xmlrpc"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.http.urlrewrite" additivity="false" level="info">
|
||||
<!-- set to "trace" to get detailed info on URL rewriting -->
|
||||
<AppenderRef ref="exist.urlrewrite"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.extensions.exquery.restxq" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.restxq"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.eclipse.jetty" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="httpclient" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="net.sf.ehcache" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.ehcache"/>
|
||||
</Logger>
|
||||
|
||||
<!-- Milton WebDAV framework -->
|
||||
<Logger name="com.bradmcevoy" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<!-- Apache Axis: 'debug' produces a large amount of debugging output -->
|
||||
<Logger name="org.apache" additivity="false" level="off">
|
||||
<AppenderRef ref="exist.core"/>
|
||||
</Logger>
|
||||
|
||||
<!-- Quartz scheduler -->
|
||||
<Logger name="org.quartz" additivity="false" level="info">
|
||||
<AppenderRef ref="exist.scheduler"/>
|
||||
</Logger>
|
||||
|
||||
<Logger name="org.exist.storage.SystemTask" additivity="false" level="debug">
|
||||
<AppenderRef ref="exist.scheduler"/>
|
||||
</Logger>
|
||||
|
||||
<!-- betterFORM extension -->
|
||||
<Logger name="de.betterform" additivity="false" level="warn">
|
||||
<AppenderRef ref="exist.betterform"/>
|
||||
</Logger>
|
||||
|
||||
<!-- expath pkg repo -->
|
||||
<Logger name="org.expath.pkg" additivity="false" level="info">
|
||||
<AppenderRef ref="expath.repo"/>
|
||||
</Logger>
|
||||
<Logger name="org.exist.repo" additivity="false" level="info">
|
||||
<AppenderRef ref="expath.repo"/>
|
||||
</Logger>
|
||||
<Logger name="org.exist.launcher" additivity="false" level="warn">
|
||||
<AppenderRef ref="exist.launcher"/>
|
||||
</Logger>
|
||||
|
||||
<Root level="info">
|
||||
<AppenderRef ref="exist.core"></AppenderRef>
|
||||
</Root>
|
||||
|
||||
</Loggers>
|
||||
|
||||
</Configuration>
|
||||
{% endraw %}
|
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env sh
|
||||
# eXist Open Source Native XML Database
|
||||
# Copyright (C) 2019 The eXist-db Project
|
||||
# info@exist-db.org
|
||||
# http://www.exist-db.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
#BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
BASEDIR="{{ exist_db_base_dir }}"
|
||||
|
||||
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||
REPO=
|
||||
|
||||
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD=`which java`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||
echo " We cannot execute $JAVACMD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
REPO="$BASEDIR"/lib
|
||||
fi
|
||||
|
||||
CLASSPATH="$BASEDIR"/etc:"$REPO"/appassembler-booter-2.1.0.jar:"$REPO"/appassembler-model-2.1.0.jar:"$REPO"/plexus-utils-3.2.0.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/stax-1.1.1-dev.jar
|
||||
|
||||
ENDORSED_DIR=
|
||||
if [ -n "$ENDORSED_DIR" ] ; then
|
||||
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||
fi
|
||||
|
||||
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS {{ exist_db_java_opts }} -Dlog4j.configurationFile={{ exist_db_conf_dir }}/log4j2.xml -Dexist.home="$BASEDIR" -Dexist.configurationFile={{ exist_db_conf_dir }}/conf.xml -Djetty.home="$BASEDIR" -Dexist.jetty.config="$BASEDIR"/etc/jetty/standard.enabled-jetty-configs \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dapp.name="shutdown" \
|
||||
-Dapp.pid="$$" \
|
||||
-Dapp.repo="$REPO" \
|
||||
-Dapp.home="$BASEDIR" \
|
||||
-Dbasedir="$BASEDIR" \
|
||||
org.codehaus.mojo.appassembler.booter.AppassemblerBooter \
|
||||
"$@"
|
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env sh
|
||||
# eXist Open Source Native XML Database
|
||||
# Copyright (C) 2019 The eXist-db Project
|
||||
# info@exist-db.org
|
||||
# http://www.exist-db.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
#BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||
BASEDIR="{{ exist_db_base_dir }}"
|
||||
|
||||
# Reset the REPO variable. If you need to influence this use the environment setup file.
|
||||
REPO=
|
||||
|
||||
# If a specific java binary isn't specified search for the standard 'java' binary
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD=`which java`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." 1>&2
|
||||
echo " We cannot execute $JAVACMD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
REPO="$BASEDIR"/lib
|
||||
fi
|
||||
|
||||
CLASSPATH="$BASEDIR"/etc:"$REPO"/appassembler-booter-2.1.0.jar:"$REPO"/appassembler-model-2.1.0.jar:"$REPO"/plexus-utils-3.2.0.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/stax-1.1.1-dev.jar
|
||||
|
||||
ENDORSED_DIR=
|
||||
if [ -n "$ENDORSED_DIR" ] ; then
|
||||
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
|
||||
fi
|
||||
|
||||
if [ -n "$CLASSPATH_PREFIX" ] ; then
|
||||
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS {{ exist_db_java_opts }} -Dlog4j.configurationFile={{ exist_db_conf_dir }}/log4j2.xml -Dexist.home="$BASEDIR" -Dexist.configurationFile={{ exist_db_conf_dir }}/conf.xml -Djetty.home="$BASEDIR" -Dexist.jetty.config="$BASEDIR"/etc/jetty/standard.enabled-jetty-configs \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dapp.name="startup" \
|
||||
-Dapp.pid="$$" \
|
||||
-Dapp.repo="$REPO" \
|
||||
-Dapp.home="$BASEDIR" \
|
||||
-Dbasedir="$BASEDIR" \
|
||||
org.codehaus.mojo.appassembler.booter.AppassemblerBooter \
|
||||
"$@"
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
exist_db_user: existdb
|
||||
exist_db_group: '{{ exist_db_user }}'
|
Loading…
Reference in New Issue