Skip to content
Snippets Groups Projects
Commit 4469a3d4 authored by benedikt.kroening's avatar benedikt.kroening
Browse files

Moved whole documents to install-documents.sh with fe, be, mw options

parent 3cbfb1f5
No related branches found
No related tags found
No related merge requests found
# This file contains default configuration variables
# todo: rename variables with propper prefixes
# Mail configuration
OX_MAIL_HOST=dovecot.qa.open-xchange.com
OX_MAIL_DOMAIN=qa.open-xchange.com
# Noreply specific settings
OX_ENV_NOREPLY_SERVER=${OX_MAIL_HOST}
OX_ENV_NOREPLY_ADDRESS="noreply@"${OX_MAIL_DOMAIN}
OX_ENV_NOREPLY_LOGIN=${OX_ENV_NOREPLY_ADDRESS}
OX_ENV_NOREPLY_PASSWORD=secret
# The "export" parameter is required, do not remove it!!
# Options are: mariadb, mysql
# Database specific configuration
DATABASE_TYPE=mariadb
DATABASE_ROOT_USER=root
DATABASE_ROOT_PASS=secret
DATABASE_HOST_NAME=localhost
DATABASE_HOST_PORT=3306
# OX Backend specific configuration
OX_ADMINMASTER_USER=oxadminmaster
OX_ADMINMASTER_PASS=secret
OX_MAIL_HOST=localhost
OX_MAIL_DOMAIN=singlenode
OX_SERVER_NAME=singlenode
OX_CLUSTER_NAME=singlenode
OX_HAZELCAST_ENABLED=true
OX_CONFIGDB_USER=openexchange
OX_CONFIGDB_PASS=secret
OX_CONFIGDB_NAME=configdb
OX_ENV_QA=true
# Should the
OX_ENV_QA=true
# To get rid of the export parameter change to this:
# To ignore lines that start with #, use this (thanks to Pete's comment):
# export $(grep -v '^#' <file> | xargs)
# And if you want to unset all of the variables defined in the file, use this:
# unset $(grep -v '^#' <file> | sed -E 's/(.*)=.*/\1/' | xargs)
\ No newline at end of file
......@@ -30,7 +30,7 @@ source ${SCRIPT_DIR}/../lib/common.bash
checkRootPrivileges
detectDistribution
# sourcing the default configuration to use
# source ${SCRIPT_DIR}/config
exportProperties ${SCRIPT_DIR}/config
## Help text
show_usage() {
......
......@@ -104,6 +104,11 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
--servermemory 1024 \
--network-listener-host "*" \
# Configure noreply settings
setOXProperty com.openexchange.noreply.address "${OX_ENV_NOREPLY_ADDRESS}" /opt/open-xchange/etc/noreply.properties
setOXProperty com.openexchange.noreply.login "${OX_ENV_NOREPLY_LOGIN}" /opt/open-xchange/etc/noreply.properties
setOXProperty com.openexchange.noreply.password "${OX_ENV_NOREPLY_PASSWORD}" /opt/open-xchange/etc/noreply.properties
setOXProperty com.openexchange.noreply.server "${OX_ENV_NOREPLY_SERVER}" /opt/open-xchange/etc/noreply.properties
echo "$(date)" > ${INIT_STATE_FILE}
......
......@@ -245,9 +245,27 @@ function waitPort {
function exportProperties {
#echo "Trying to export variables from $1 ..."
if [ ! -f "$1" ]; then
echo "ERROR: Given properties file does not exist"
exit 1
# if [ ! -f "$1" ]; then
# echo "ERROR: Given properties file does not exist"
# exit 1
# fi
# val=$(grep -v '^#' "$1" | xargs)
# export $(eval ${val})
if [ -f "$1" ]
then
echo "$1 found."
while IFS='=' read -r key value
do
if [[ $key != \#* ]] && [[ -n $key ]] ; then
export $key=$(eval echo "$value")
fi
done < "$1"
else
echo "$1 not found."
fi
export $(grep -v '^#' "$1" | xargs)
}
\ No newline at end of file
......@@ -28,6 +28,14 @@ SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
source ${SCRIPT_DIR}/../lib/common.bash
source ${SCRIPT_DIR}/../lib/setup.bash
if [[ -z "${AS_DOCUMENTCONVERTER_API_VERSION}" ]] || [[ -z "${AS_DOCUMENTCONVERTER_VERSION}" ]] && [[ "${INSTALL_DOCUMENTCONVERTER}" = true ]]; then
echo ""
echo "WARNING: There is no documentconverter repo specified in setup/versions even though it is set for installation".
echo ""
sleep 5
exit 0
fi
# NOTE:
#
PACKAGES="open-xchange-documentconverter-server open-xchange-documentconverter-api "
......
......@@ -28,22 +28,90 @@ SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
source ${SCRIPT_DIR}/../lib/common.bash
source ${SCRIPT_DIR}/../lib/setup.bash
# NOTE:
#
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"
INSTALL_DOC_BACKEND=false
INSTALL_DOC_MIDDLEWARE=false
INSTALL_DOC_FRONTEND=false
## Help text
show_usage() {
echo -n "
installPackages ${PACKAGES}
# if [[ "${INSTALL_TYPE}" != "docker" ]]; then
# echo ""
# # Post-install actions
# # if [[ "${DIST}" == "DebianJessie" ]]; then
# # echo "Nothing to do here..."
# # #update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 2>/dev/null
# # elif [[ "${DIST}" == "CENTOS7" ]] || [[ "${DIST}" == "RHEL7" ]] || [[ "${DIST}" == "SLES12" ]]; then
# # chkconfig open-xchange on
# # elif [[ "${DIST}" == "CENTOS6" ]] || [[ "${DIST}" == "RHEL6" ]]; then
# # chkconfig --level 345 open-xchange on
# # fi
# fi
"
}
### reading config from command line; overriding defaults
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
show_usage
exit 0
shift
;;
--debug)
echo "WARNING: Debug flag set (--debug)"
set -x
shift
;;
--middleware)
INSTALL_DOC_MIDDLEWARE=true
shift
;;
--backend)
INSTALL_DOC_BACKEND=true
shift
;;
--frontend)
INSTALL_DOC_FRONTEND=true
shift
;;
# --frontend)
# export INSTALL_FRONTEND=true
# shift
# ;;
# --repo-guard)
# OX_REPO_GUARD="$2"
# echo "WARNING: Using $OX_REPO_GUARD as guard repository source"
# shift
# shift
# ;;
*) # unknown option
echo "Unknonwn option: $1"
POSITIONAL+=("$1") # save it in an array for later
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
# move this?
if [[ -z "${AS_OFFICE_VERSION}" ]] || [[ "${INSTALL_DOCUMENTS}" = false ]]; then
echo ""
echo "WARNING: Skipping documents setup"
echo ""
sleep 3
exit 0
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"
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}
......@@ -89,13 +89,11 @@ if [ "$INSTALL_GUARD" = true ]; then
PACKAGES="${PACKAGES} open-xchange-guard-ui-static open-xchange-guard-reader open-xchange-guard-help*"
fi
if [ "$INSTALL_DOCUMENTS" = true ]; then
echo "Adding OX Documents packages ..."
PACKAGES="${PACKAGES} open-xchange-documents-ui-static open-xchange-documents-help-*"
fi
installPackages ${PACKAGES}
# Install frontend realted documents packages
${SCRIPT_DIR}/install-documents.sh --frontend
echo "Enabling Apache httpd modules..."
if [[ true == "${ANY_DEB}" ]] || [[ true == "${ANY_SLES}" ]]; then
......
......@@ -103,15 +103,12 @@ if [ "$INSTALL_GUARD" = true ]; then
PACKAGES="${PACKAGES} open-xchange-guard-ui open-xchange-guard-backend-plugin"
fi
# middleware components for documents
if [ "$INSTALL_DOCUMENTS" = true ]; then
echo "Adding OX Documents 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"
fi
installPackages ${PACKAGES}
# Setup only middleware components for documents
${SCRIPT_DIR}/install-documents.sh --middleware
if [[ "${INSTALL_TYPE}" != "docker" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment