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

Moved frontend init

parent 86ae819c
No related branches found
No related tags found
1 merge request!7Issue16 7102
......@@ -24,84 +24,29 @@
#
set -e
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
# sourcing some commonly used functions and executing basic checks
source ${SCRIPT_DIR}/../lib/common.bash
checkRootPrivileges
source ${SCRIPT_DIR}/../../lib/common.bash
detectDistribution
## Help text
show_usage() {
echo -n "
$0 [OPTIONS]
--singlenode Creates basic balancers for a singlenode setup (App Suite api only)
"
}
### reading config from command line; overriding defaults
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
echo "Configuring everything for singlenode use with frontend balancers"
echo "========="
sleep 3
case $key in
-h|--help)
show_usage
exit 0
shift
;;
--debug)
echo "WARNING: Debug flag set (--debug)"
set -x
shift
;;
--singlenode)
INSTALL_TYPE=singlenode
shift
;;
# -g|--middleware)
# INSTALL_MIDDLEWARE=true
# shift
# ;;
# --guard)
# INSTALL_GUARD=true
# shift
# ;;
# --documents)
# INSTALL_DOCUMENTS=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
# one last singlenode restart before qa init will start
restartService open-xchange
if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
echo "Configuring frontend for singlenode use with localhost balancers"
${SCRIPT_DIR}/frontend/add-balancer.sh \
${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
${SCRIPT_DIR}/../frontend/add-balancer.sh \
--name "oxcluster_ws" \
--balancer "ws://localhost:8009" \
--route "$(hostname -s)" \
--priority 20
restartService ${HTTPD}
restartService ${HTTPD}
fi
\ No newline at end of file
......@@ -237,7 +237,10 @@ if [ "${OX_INIT}" = true ]; then
fi
if [ "$INSTALL_FRONTEND" = true ] ; then
config/init-frontend.sh
echo ""
# Nothing todo for frontend init right now
# It is done while middleware init scripts are running: config/middleware/30 ...
fi
if [ "$INSTALL_MIDDLEWARE" = true ] ; 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