Commit 90c1c8dc authored by benedikt.kroening's avatar benedikt.kroening
Browse files

Some more cleanups

Moved documents init
parent 5a15a597
# Open-Xchange App Suite Installer script collection
This collection contains several scripts for letting you install a fully fledged Open-Xchange environment.
By default this will install a singlenode environment consititing of:
By default this will install a singlenode environment consisting of:
- Database (mysql or mariadb)
- Open-Xchange middleware
- Apache2 Frontend
......@@ -9,7 +9,7 @@ By default this will install a singlenode environment consititing of:
## Configuration
Basic Configuration is located inside the file `config/config`.
TBD
Most optiony can be overriden by using each shell-scripts parameters (sometimes described in the help text)
## Versions
......@@ -26,17 +26,32 @@ Simple cli examples of how to use this
It is always a good idea to read documentation or help texts!
`./ox-installer --help`
` $ ./ox-installer --help `
## Install singlenode with everything you need
### Install singlenode with everything you need
Right now only frontend (apache), middleware and a database are installed.
It uses dovecot.qa.open-xchange.com as mail backend.
Please note that the '--singlenode' may be ommited as it is already set in 'config/config'
`$ ./ox-installer --singlenode`
` $ ./ox-installer.sh --singlenode `
You can supply each component individually. Read the help text for more information.
### Add additiional features/components
Whenever you feel that you might want to test additional components you can install or enable them.
#### Guard / Documents
Simply provide the parameter (only one or both) and the installer will add missing packages/configs:
` $ ./ox-installer.sh --guard --documents`
#### additional features
Take a look into the 'features' folder. You may enable/disable additional featues by executing those scripts.
This script is just an teamplate for later use, it does nothing, just sits there waiting to be copied to an actual feature...
` $ features/feature-template.sh --enable --restart `
## Docker
This installer supports creation of Open-Xchange docker images. These images will use supervisord as process monitor.
......
......@@ -26,7 +26,7 @@ set -e
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
# sourcing some commonly used functions and executing basic checks
source ${SCRIPT_DIR}/../lib/common.bash
source ${SCRIPT_DIR}/../../lib/common.bash
checkRootPrivileges
detectDistribution
# sourcing the default configuration to use
......@@ -69,21 +69,36 @@ esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
# echo "Using following configuration:"
# set | grep "OX_GUARD"
# echo "==============================="
# sleep 5
if [ "${INSTALL_DOCUMENTS}" = false ]; then
echo "Skipping init script for documents"
exit 0
fi
INIT_STATE_FILE="/opt/open-xchange/etc/21-init-documents-done"
if [ ! -f ${INIT_STATE_FILE} ]; then
setOXProperty permissions "text,spreadsheet,presentation,presenter,document_preview" /opt/open-xchange/etc/permissions.properties
setOXProperty permissions "text,spreadsheet,presentation,presenter,document_preview" /opt/open-xchange/etc/permissions.properties
if [ "${INSTALL_GUARD}" = true ]; then
if [ "${INSTALL_GUARD}" = true ]; then
setOXProperty com.openexchange.capability.guard-docs true /opt/open-xchange/etc/guard-api.properties
fi
fi
restartService open-xchange
sleep 10
waitPort localhost 8009
echo "$(date)" >> ${INIT_STATE_FILE}
else
echo "WARNING: This scripts has already been executed and will be skipped!"
sleep 5
fi
# check if documentconverter is installed
if [[ -d /etc/init.d/open-xchange-documentconverter-server ]]; then
restartService open-xchange-documentconverter-server
sleep 5
# Waiting for port 8008 on localhost for the documentconverter to be up and running ...
waitPort localhost 8008
fi
restartService open-xchange
echo "$(date)" >> /opt/open-xchange/etc/99-init-documents-doneard-done
\ No newline at end of file
echo "Documents init finished at: "
cat ${INIT_STATE_FILE}
\ No newline at end of file
......@@ -63,16 +63,6 @@ if [[ "${INSTALL_TYPE}" == "singlenode" ]]; then
fi
# if [ "$INSTALL_DOCUMENTS" = true ] ; then
# echo ""
# ${SCRIPT_DIR}/../frontend/add-balancer.sh \
# --name "oxguardpks" \
# --balancer "http://localhost:8009/pks" \
# --route "singlenode" \
# --priority 10
# fi
restartService ${HTTPD}
fi
......@@ -47,4 +47,9 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
sleep 5
fi
echo "$(date)" > ${INIT_STATE_FILE}
else
echo "QA init already executed! Skipping"
exit 0
fi
......@@ -206,6 +206,7 @@ if [ "$INSTALL_DOCUMENTCONVERTER" = true ] ; then
fi
if [ "$INSTALL_FRONTEND" = true ] ; then
# Install OX App Suite frontend (optionally with guard and documents)
setup/install-frontend.sh
if [ "$INIT" = true ] ; then
config/init-frontend.sh
......
......@@ -100,23 +100,12 @@ fi
# These packages are for document middleware components (not the documents backend)
if [[ "${INSTALL_DOC_MIDDLEWARE}" = true ]]; then
echo "Adding OX Documents middleware packages ..."
PACKAGES="${PACKAGES} open-xchange-realtime-core open-xchange-realtime-events open-xchange-realtime-json open-xchange-documents-backend open-xchange-documents-templates open-xchange-documents-ui-common open-xchange-documents-ui-editors open-xchange-documentconverter-api"
PACKAGES="${PACKAGES} open-xchange-documentconverter-client open-xchange-realtime-core open-xchange-realtime-events open-xchange-realtime-json open-xchange-documents-backend open-xchange-documents-templates open-xchange-documents-ui-common open-xchange-documents-ui-editors open-xchange-documentconverter-api"
fi
# These packages are for the document backend (e.g. standalone documents backend)
# if [[ "${INSTALL_DOC_BACKEND}" = true ]]; then
# echo "Adding OX Documents backend packages ..."
# PACKAGES="${PACKAGES} open-xchange-documents-backend open-xchange-documents-templates open-xchange-documents-ui-common open-xchange-documents-ui-editors readerengine open-xchange-pdftool open-xchange-documentconverter-client"
# fi
#
if [[ "${INSTALL_DOC_FRONTEND}" = true ]]; then
echo "Adding OX Documents frontend packages ..."
PACKAGES="${PACKAGES} open-xchange-documents-ui-static open-xchange-documents-help-*"
fi
installPackages ${PACKAGES}
if [ "$INIT" = true ] ; then
${SCRIPT_DIR}/../config/init-documents.sh
fi
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment