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

Moved some frontend setup logic

parent 27c57443
No related branches found
No related tags found
1 merge request!7Issue16 7102
...@@ -35,6 +35,7 @@ show_usage() { ...@@ -35,6 +35,7 @@ show_usage() {
echo -n " echo -n "
$0 [OPTIONS] $0 [OPTIONS]
--singlenode Creates basic balancers for a singlenode setup (App Suite api only)
" "
} }
...@@ -56,8 +57,10 @@ case $key in ...@@ -56,8 +57,10 @@ case $key in
set -x set -x
shift shift
;; ;;
--singlenode)
INSTALL_TYPE=singlenode
shift
;;
# -g|--middleware) # -g|--middleware)
# INSTALL_MIDDLEWARE=true # INSTALL_MIDDLEWARE=true
# shift # shift
...@@ -85,8 +88,20 @@ esac ...@@ -85,8 +88,20 @@ esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
echo "Copying default config ..." if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
cp -f ${SCRIPT_DIR}/frontend/conf/*.conf ${HTTPD_CONF_PATH} echo "Configuring frontend for singlenode use with localhost balancers"
${SCRIPT_DIR}/frontend/add-balancer.sh \
--name "oxcluster" \
--balancer "http://localhost:8009" \
--route "$(hostname -s)" \
--priority 20
${SCRIPT_DIR}/frontend/add-balancer.sh \
--name "oxcluster_ws" \
--balancer "ws://localhost:8009" \
--route "$(hostname -s)" \
--priority 20
fi
restartService ${HTTPD} restartService ${HTTPD}
#!/bin/bash
#
# Copyright (C) 2019 OX Software GmbH
#
# This file is part of OX Automation.
#
# OX Automation is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OX Automation 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OX Automation. If not, see <http://www.gnu.org/licenses/>.
#
#
# Authors:
# Benedikt Kroening <benedikt.kroening@open-xchange.com>
#
set -e
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
source ${SCRIPT_DIR}/../../lib/common.bash
detectDistribution
if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
echo "Configuring everything for singlenode use with frontend balancers"
echo "========="
printenv | grep "^INSTALL_"
echo "========="
sleep 5
# one last singlenode restart before qa init will start
restartService open-xchange
${SCRIPT_DIR}/../frontend/add-balancer.sh \
--name "oxcluster" \
--balancer "http://localhost:8009" \
--route "$(hostname -s)" \
--priority 20
${SCRIPT_DIR}/../frontend/add-balancer.sh \
--name "oxcluster_ws" \
--balancer "ws://localhost:8009" \
--route "$(hostname -s)" \
--priority 20
restartService ${HTTPD}
fi
...@@ -33,6 +33,8 @@ checkRootPrivileges ...@@ -33,6 +33,8 @@ checkRootPrivileges
show_usage() { show_usage() {
echo -n " echo -n "
$0 [OPTIONS] $0 [OPTIONS]
--init-singlenode forces init process after frontend installation for singlenode/localhost nodes only
" "
...@@ -55,14 +57,6 @@ case $key in ...@@ -55,14 +57,6 @@ case $key in
set -x set -x
shift shift
;; ;;
--guard)
INSTALL_GUARD=true
shift
;;
--documents)
INSTALL_DOCUMENTS=true
shift
;;
*) # unknown option *) # unknown option
POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
shift shift
......
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