New repository
This commit is contained in:
parent
ffc489bd11
commit
54a18a7117
69
README.md
69
README.md
|
@ -1,31 +1,64 @@
|
|||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
A role that installs the eXist-db service, <http://exist-db.org/exist/apps/homepage/index.html>
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
The most important variables are listed below:
|
||||
|
||||
``` yaml
|
||||
exist_db_major: 5
|
||||
exist_db_minor: 2
|
||||
exist_db_patch: 0
|
||||
exist_db_http_port: 8080
|
||||
|
||||
exist_db_home: '/srv/existdb'
|
||||
exist_db_data_dir: '{{ exist_db_home }}/data'
|
||||
exist_db_journal_dir: '{{ exist_db_home }}/data-journal'
|
||||
exist_db_backup_dir: '{{ exist_db_home }}/data-backups'
|
||||
exist_db_bin_backup_dir: '{{ exist_db_home }}/data/backup'
|
||||
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 * * ?"
|
||||
|
||||
# Only works with deb based distributions and when our basic-system-setup role is used by the playbook
|
||||
exist_db_tmpreaper_install: True
|
||||
exist_db_tmpreaper_dirs: '{{ exist_db_bin_backup_dir }}/. {{ exist_db_backup_dir }}/.'
|
||||
exist_db_tmpreaper_time: '10d'
|
||||
|
||||
# Setup nginx in front of the service
|
||||
exist_db_nginx_setup: True
|
||||
exist_db_nginx_use_common_virthost: True
|
||||
exist_db_nginx_define_x_real_ip: True
|
||||
exist_db_nginx_set_original_uri: True
|
||||
exist_db_nginx_virtualhost_name: '{{ ansible_fqdn }}'
|
||||
exist_db_nginx_server_name: '{{ exist_db_nginx_virtualhost_name }}'
|
||||
exist_db_nginx_server_aliases: ''
|
||||
nginx_virthosts: '{{ exist_db_nginx_virthosts }}'
|
||||
```
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
None
|
||||
|
||||
License
|
||||
-------
|
||||
|
@ -35,4 +68,4 @@ EUPL-1.2
|
|||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
Andrea Dell'Amico, <andrea.dellamico@isti.cnr.it>
|
||||
|
|
|
@ -1,2 +1,45 @@
|
|||
---
|
||||
# defaults file for ansible-role-template
|
||||
exist_db_major: 5
|
||||
exist_db_minor: 2
|
||||
exist_db_patch: 0
|
||||
exist_db_http_port: 8080
|
||||
|
||||
exist_db_home: '/srv/existdb'
|
||||
exist_db_data_dir: '{{ exist_db_home }}/data'
|
||||
exist_db_journal_dir: '{{ exist_db_home }}/data-journal'
|
||||
exist_db_backup_dir: '{{ exist_db_home }}/data-backups'
|
||||
exist_db_bin_backup_dir: '{{ exist_db_home }}/data/backup'
|
||||
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 * * ?"
|
||||
|
||||
# Only works with deb based distributions and when our basic-system-setup role is used by the playbook
|
||||
exist_db_tmpreaper_install: True
|
||||
exist_db_tmpreaper_dirs: '{{ exist_db_bin_backup_dir }}/. {{ exist_db_backup_dir }}/.'
|
||||
exist_db_tmpreaper_time: '10d'
|
||||
|
||||
# Setup nginx in front of the service
|
||||
exist_db_nginx_setup: True
|
||||
exist_db_nginx_use_common_virthost: True
|
||||
exist_db_nginx_define_x_real_ip: True
|
||||
exist_db_nginx_set_original_uri: True
|
||||
exist_db_nginx_virtualhost_name: '{{ ansible_fqdn }}'
|
||||
exist_db_nginx_server_name: '{{ exist_db_nginx_virtualhost_name }}'
|
||||
exist_db_nginx_server_aliases: ''
|
||||
nginx_virthosts: '{{ exist_db_nginx_virthosts }}'
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
# handlers file for ansible-role-template
|
||||
- name: Restart existdb
|
||||
service: name=exist-db state=started enabled=yes
|
||||
|
|
|
@ -1,46 +1,35 @@
|
|||
galaxy_info:
|
||||
author: your name
|
||||
description: your description
|
||||
company: your company (optional)
|
||||
author: Andrea Dell'Amico
|
||||
description: Systems Architect
|
||||
company: ISTI-CNR
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
issue_tracker_url: https://support.d4science.org/projects/automatic-provisioning/issues
|
||||
issue_tracker_url: https://redmine-s2i2s.isti.cnr.it/projects/provisioning
|
||||
|
||||
license: EUPL-1.2
|
||||
license: EUPL 1.2+
|
||||
|
||||
min_ansible_version: 2.8
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
# Optionally specify the branch Galaxy will use when accessing the GitHub
|
||||
# repo for this role. During role install, if no tags are available,
|
||||
# Galaxy will use this branch. During import Galaxy will access files on
|
||||
# this branch. If Travis integration is configured, only notifications for this
|
||||
# branch will be accepted. Otherwise, in all cases, the repo's default branch
|
||||
# (usually master) will be used.
|
||||
#github_branch:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- bionic
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- bionic
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
galaxy_tags:
|
||||
- exist-db
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
dependencies:
|
||||
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-openjdk.git
|
||||
version: master
|
||||
name: openjdk
|
||||
state: latest
|
||||
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-nginx.git
|
||||
version: master
|
||||
name: nginx
|
||||
state: latest
|
||||
when: nginx_setup
|
||||
|
|
|
@ -1,2 +1,77 @@
|
|||
---
|
||||
# tasks file for ansible-role-template
|
||||
- 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 \
|
||||
"$@"
|
|
@ -1,2 +1,31 @@
|
|||
---
|
||||
# vars file for ansible-role-template
|
||||
exist_db_user: existdb
|
||||
exist_db_group: '{{ exist_db_user }}'
|
||||
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'
|
||||
|
||||
tmpreaper_install: '{{ exist_db_tmpreaper_install }}'
|
||||
tmpreaper_extra_dirs: '{{ exist_db_tmpreaper_dirs }}'
|
||||
tmpreaper_time: '{{ exist_db_tmpreaper_time }}'
|
||||
|
||||
nginx_setup: '{{ exist_db_nginx_setup }}'
|
||||
nginx_use_common_virthost: '{{ exist_db_nginx_use_common_virthost }}'
|
||||
nginx_define_x_real_ip: '{{ exist_db_nginx_define_x_real_ip }}'
|
||||
nginx_set_original_uri: '{{ exist_db_nginx_set_original_uri }}'
|
||||
|
||||
exist_db_nginx_virthosts:
|
||||
- virthost_name: '{{ exist_db_nginx_virtualhost_name }}'
|
||||
listen: "{{ http_port | default('80') }}"
|
||||
server_name: '{{ exist_db_nginx_server_name }}'
|
||||
server_aliases: '{{ exist_db_nginx_server_aliases }}'
|
||||
ssl_enabled: True
|
||||
ssl_only: True
|
||||
ssl_letsencrypt_certs: '{{ nginx_letsencrypt_managed }}'
|
||||
root: /usr/share/nginx/html/
|
||||
server_tokens: 'off'
|
||||
websockets: False
|
||||
proxy_standard_setup: True
|
||||
locations:
|
||||
- location: /
|
||||
target: http://localhost:{{ exist_db_http_port }}/
|
||||
|
|
Loading…
Reference in New Issue