Commit 0548df1a authored by benedikt.kroening's avatar benedikt.kroening
Browse files

Fixed guard setup, refactored docker

Moved guard init, fixed missing update-themes
Moved docker into its own directory, added singlenode and cluster environment (only singlneode works rn, cluster wip)
parent a689385f
......@@ -69,18 +69,21 @@ Right now it creates a simple groupware image (apache2, ox frontend, ox middlewa
Take a look at the docker-compose.yml at the root level of this repo.
### Build docker images
The installer script can be used as it is for docker environments. Take a look into the docker/ directory for an singlenode example.
You can configure this environment by editing the 'docker/config' file.
In order to build an image execute the build script:
The installer script can be used as it is for docker environments. Take a look into the docker/ directory for some examples.
You can configure these environments by editing the 'docker/<env>/config' file (e.g. docker/singlenode/config).
In order to build an singlenode image execute the build script:
`$ docker/build.sh`
`$ docker/build.sh --singlenode`
### Start it
If you have docker-compose available you can use it to start the provided compose-environment
If you have docker-compose available you can use it to start the provided compose-environment, but make sure to be in the correct directory.
`$ cd <repo>/docker/singlenode`
`$ docker-compose up`
Any runtime related files will be stored at `<repo>/docker/<env>/.runtime` (e.g. <repo>/docker/singlenode/.runtime)
### Stop it
`$ docker-compose down -v`
......
......@@ -29,13 +29,14 @@ OX_CONFIGDB_PASS=secret
OX_CONFIGDB_NAME=configdb
# Default setup settings
# This will install a basic singlenode setup
# In order to modify the features to install use the parameters or uncomment the options here
INSTALL_DATABASE=true
INSTALL_MIDDLEWARE=true
INSTALL_FRONTEND=true
INSTALL_GUARD=false
INSTALL_DOCUMENTS=false
INSTALL_DOCUMENTCONVERTER=false
INSTALL_JAVA=true
INSTALL_TYPE=singlenode
INIT=true
OX_ENV_QA=true
......
......@@ -88,7 +88,8 @@ echo "Executing init scripts located at ${SCRIPT_DIR}/middleware/: "
ls -lah ${SCRIPT_DIR}/middleware/
echo "Using following configuration:"
printenv | grep "OX_"
printenv | grep "^OX_"
echo "==============================="
sleep 5
# loop through all sh files in /opt/open-xchange/docker/init.d
......
#!/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)"
# sourcing some commonly used functions and executing basic checks
source ${SCRIPT_DIR}/../../lib/common.bash
checkRootPrivileges
detectDistribution
# sourcing the default configuration to use
# source ${SCRIPT_DIR}/config
## Help text
show_usage() {
echo -n "
$0 [OPTIONS]
"
}
### 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
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
if [ "${INSTALL_GUARD}" = false ]; then
echo "Skipping init script for guard"
exit 0
fi
INIT_STATE_FILE="/opt/open-xchange/etc/22-init-guard-done"
if [ ! -f ${INIT_STATE_FILE} ]; then
${SCRIPT_DIR}/../../features/guard.sh --enable --restart
echo "$(date)" >> ${INIT_STATE_FILE}
else
echo "WARNING: This scripts has already been executed and will be skipped!"
sleep 5
fi
echo "Documents init finished at: "
cat ${INIT_STATE_FILE}
......@@ -30,7 +30,7 @@ detectDistribution
if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
echo "Configuring everything for singlenode use with frontend balancers"
echo "========="
printenv | grep INSTALL_
printenv | grep "^INSTALL_"
echo "========="
sleep 5
......
......@@ -25,7 +25,7 @@
set -e
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
source ${SCRIPT_DIR}/../lib/common.bash
## Help text
show_usage() {
......@@ -34,22 +34,18 @@ echo -n "
Build docker images with the help of the ox-installer scripts
Easiest way to get a working image:
$ ${0} foo bar
$ ${0}
Per component options (can be combined):
--middleware Installs middleware components
Installation types (not combineable):
-s | --singlenode This will install and init an basic OX instance (db, mw, fe)
--singlenode This will install and init an basic OX instance (db, mw, fe)
--cluster This will create several images for deploying some docker-compose cluster
Configuration options:
--init This will start configuration scripts after component installation
Examples:
Singlenode setup with everything you need:
$ ${0} --singlenode --dovecot
"
}
......@@ -137,12 +133,20 @@ fi
STARTED_AT=$(date)
if [[ "${INSTALL_TYPE}" == "singlenode" ]]; then
# ensure that all components will be "force" installed if on singlenode
docker build --no-cache --rm -f ${SCRIPT_DIR}/singlenode/Dockerfile -t singlenode:latest ${SCRIPT_DIR}/../
exportProperties ${SCRIPT_DIR}/singlenode/config
docker build --no-cache --rm \
--build-arg ARG_INSTALL_FRONTEND=true \
--build-arg ARG_INSTALL_MIDDLEWARE=true \
--build-arg ARG_INSTALL_GUARD=true \
--build-arg ARG_INSTALL_DOCUMENTS=false \
--build-arg ARG_INSTALL_DOCUMENTCONVERTER=false \
-f ${SCRIPT_DIR}/singlenode/Dockerfile \
-t singlenode:latest ${SCRIPT_DIR}/../
elif [[ "${INSTALL_TYPE}" == "cluster" ]]; then
#exportProperties ${SCRIPT_DIR}/cluster/config
# TODO: propper image tag versioning
exportProperties ${SCRIPT_DIR}/singlenode/config
echo "Building OX frontend image ..."
docker build --no-cache --rm -f ${SCRIPT_DIR}/cluster/frontend.Dockerfile -t open-xchange-frontend:latest ${SCRIPT_DIR}/../
......@@ -158,11 +162,11 @@ fi
echo ""
pushd ${SCRIPT_DIR}/..
# pushd ${SCRIPT_DIR}/..
popd
# popd
FINISHED_AT=$(date)
echo "====================================================================================="
......
......@@ -55,7 +55,7 @@ ENV INSTALL_GUARD=true
ENV INSTALL_DOCUMENTS=false
ENV INSTALL_DOCUMENTCONVERTER=false
ENV INSTALL_DATABASE=false
ENV INSTALL_TYPE=docker-singlenode
ENV INSTALL_TYPE=docker-cluster
ADD . /ox-installer
......
......@@ -23,19 +23,29 @@
# This docker-container will contain everything required for an OX groupware node
# Database and mailserver need to be deployed seperately
# An ARG declared before the FROM instruction can’t be used after the FROM.
ARG DISTRIBUTION=debian
ARG RELEASE=stretch
FROM ${DISTRIBUTION}:${RELEASE}
# these are the defaults for a full ox groupware image
ARG ARG_INSTALL_FRONTEND=true
ARG ARG_INSTALL_MIDDLEWARE=true
ARG ARG_INSTALL_GUARD=false
ARG ARG_INSTALL_DOCUMENTS=false
ARG ARG_INSTALL_DOCUMENTCONVERTER=false
ARG ARG_INSTALL_TYPE=docker-singlenode
ENV DATABASE_HOST_NAME=database
ENV OX_MAIL_HOST=dovecot.qa.open-xchange.com
ENV OX_MAIL_DOMAIN=qa.open-xchange.com
ENV DATABASE_TYPE=mariadb
ENV DATABASE_ROOT_USER=root
ENV DATABASE_ROOT_PASS=secret
ENV DATABASE_HOST_NAME=database
ENV DATABASE_HOST_PORT=3306
ENV OX_ADMINMASTER_USER=oxadminmaster
ENV OX_ADMINMASTER_PASS=secret
ENV OX_MAIL_HOST=dovecot.qa.open-xchange.com
......@@ -48,17 +58,16 @@ ENV OX_CONFIGDB_PASS=secret
ENV OX_CONFIGDB_NAME=configdb
ENV OX_ENV_QA=true
# these are the defaults for a full ox groupware image
ENV INSTALL_FRONTEND=true
ENV INSTALL_MIDDLEWARE=true
ENV INSTALL_GUARD=true
ENV INSTALL_DOCUMENTS=false
ENV INSTALL_DOCUMENTCONVERTER=false
ENV INSTALL_DATABASE=false
ENV INSTALL_TYPE=docker-singlenode
ENV INSTALL_FRONTEND=${ARG_INSTALL_FRONTEND}
ENV INSTALL_MIDDLEWARE=${ARG_INSTALL_MIDDLEWARE}
ENV INSTALL_GUARD=${ARG_INSTALL_GUARD}
ENV INSTALL_DOCUMENTS=${ARG_INSTALL_DOCUMENTS}
ENV INSTALL_DOCUMENTCONVERTER=${ARG_INSTALL_DOCUMENTCONVERTER}
ENV INSTALL_TYPE=${ARG_INSTALL_TYPE}
ADD . /ox-installer
RUN /ox-installer/ox-installer.sh --docker --config /ox-installer/docker/singlenode/config
RUN /ox-installer/ox-installer.sh --docker --config /ox-installer/docker/singlenode/config
RUN chsh -s /bin/bash open-xchange && \
echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc && \
mkdir /var/run/apache2 && \
......
......@@ -12,10 +12,9 @@ OX_ENV_NOREPLY_LOGIN=${OX_ENV_NOREPLY_ADDRESS}
OX_ENV_NOREPLY_PASSWORD=secret
# Database specific configuration (currently external host with name "database" is used)
DATABASE_TYPE=mariadb
DATABASE_HOST_NAME=database
DATABASE_ROOT_USER=root
DATABASE_ROOT_PASS=secret
DATABASE_HOST_NAME=database
DATABASE_HOST_PORT=3306
# OX Backend specific configuration
......@@ -30,13 +29,7 @@ OX_CONFIGDB_NAME=configdb
# Default setup settings
# This will install a basic singlenode setup
INSTALL_MIDDLEWARE=true
INSTALL_FRONTEND=true
INSTALL_GUARD=false
INSTALL_DOCUMENTS=false
INSTALL_DOCUMENTCONVERTER=false
INSTALL_DATABASE=false
INSTALL_DOVECOT=false
INSTALL_GUARD=true
OX_ENV_QA=true
......
......@@ -37,7 +37,7 @@ services:
- internal-net
singlenode:
image: singlenode:latest
env_file: docker/config
env_file: config
depends_on:
- database
volumes: # for quick testing you may want to export the middleware nodes etc directory
......@@ -50,6 +50,11 @@ services:
- internal-net
# The following services use external images that will be required to be downloaded.
# You will have to docker login to and have a working OX VPN connection for this to work!
# In some cases it makes sense to manually `docker pull` these images as docker-compose has prolems with docker login some times
dovecot:
# Very simple dovecot instance with static-passdb
image: "gitlab.open-xchange.com:4567/docker/infrastructure/dovecot-backend:master"
......@@ -64,10 +69,10 @@ services:
restart: always
test-container:
image: 'gitlab.open-xchange.com:4567/docker/infrastructure/testing-codecept:ox-installer'
env_file: docker/config
env_file: config
volumes:
- "${PWD}/test-results/codeceptjs:/opt/open-xchange/tests/results/codeceptjs"
- "${PWD}/test-results/postman:/opt/open-xchange/tests/results/postman"
- "${PWD}/.runtime/test-results/codeceptjs:/opt/open-xchange/tests/results/codeceptjs"
- "${PWD}/.runtime/test-results/postman:/opt/open-xchange/tests/results/postman"
networks:
- internal-net
entrypoint: /opt/open-xchange/tests/ox_installer.sh
......
......@@ -125,7 +125,7 @@ done
set -- "${POSITIONAL[@]}" # restore positional parameters
if [ "$INSTALL_GUARD" = true ] ; then
#
if [[ "${INSTALL_MIDDLEWARE}" = true ]]; then
if [[ "${INSTALL_BACKEND}" = true ]] || [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
......@@ -153,7 +153,7 @@ if [[ "${GUARD_ENABLE}" = true ]]; then
if [[ "${INSTALL_FRONTEND}" = true ]]; then
echo "Adding Guard proxy rules ..."
cp -f ${SCRIPT_DIR}/../config/frontend/conf/89_guard-proxy.dummy ${HTTPD_CONF_PATH}/89_guard-proxy.conf
/opt/open-xchange/appsuite/share/update-themes.sh
if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
# Creating guard config with higher prios for apache config (load order)
......@@ -168,7 +168,7 @@ if [[ "${GUARD_ENABLE}" = true ]]; then
--balancer "http://localhost:8009/pks" \
--route "singlenode" \
--priority 10
else
echo "Current Install type: "${INSTALL_TYPE}
echo "ERROR: guard init currently only supports singlenode. TODO: implement additional hostname parameter for balancer backend config"
......
......@@ -25,16 +25,18 @@
# This restarts the provided service name with the configured service managers
function restartService {
echo "Restarting service $1"
if [[ "${INSTALL_TYPE}" != "docker" ]]; then
if [[ "${INSTALL_TYPE}" == *"docker"* ]]; then
echo "Restarting service $1 with supervisorctl ..."
supervisorctl restart $1
else
#echo "ERROR: Not possible to determine installation type, could not restart service $1"
echo "Restarting service $1 ..."
if [[ "${DIST}" == "SLES12" ]] || [[ "${DIST}" == "RHEL7" ]]; then
systemctl restart $1.service
else
service $1 restart
fi
else
#echo "ERROR: Not possible to determine installation type, could not restart service $1"
supervisorctl restart $1
fi
......@@ -45,37 +47,37 @@ function detectDistribution {
if [[ -f /etc/debian_version ]]; then
REV=$(cat /etc/debian_version)
if [[ "${REV}" == "9."* ]]; then
DIST="DebianStretch"
ANY_DEB=true
MARIADB=true
ADDITIONAL_PACKAGES="mariadb-server"
HTTPD="apache2"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf-enabled/
HTTPD_SITES_PATH=/etc/${HTTPD}/sites-enabled/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=\$\{APACHE_LOG_DIR\}
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/ssl/certs/ssl-cert-snakeoil.pem
HTTPD_TLS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
DISTRO="DebianStretch"
COMPATIBLE=true
export DIST="DebianStretch"
export ANY_DEB=true
export MARIADB=true
export ADDITIONAL_PACKAGES="mariadb-server"
export HTTPD="apache2"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf-enabled/
export HTTPD_SITES_PATH=/etc/${HTTPD}/sites-enabled/
export HTTPD_WWWROOT_PATH=/var/www/html
export HTTPD_LOG_PATH=\$\{APACHE_LOG_DIR\}
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/ssl/certs/ssl-cert-snakeoil.pem
export HTTPD_TLS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
export DISTRO="DebianStretch"
export COMPATIBLE=true
elif [[ "${REV}" == "10."* ]]; then
DIST="DebianBuster"
ANY_DEB=true
MARIADB=true
ADDITIONAL_PACKAGES="mariadb-server"
HTTPD="apache2"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf-enabled/
HTTPD_SITES_PATH=/etc/${HTTPD}/sites-enabled/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=\$\{APACHE_LOG_DIR\}
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/ssl/certs/ssl-cert-snakeoil.pem
HTTPD_TLS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
DISTRO="DebianBuster"
COMPATIBLE=true
export DIST="DebianBuster"
export ANY_DEB=true
export MARIADB=true
export ADDITIONAL_PACKAGES="mariadb-server"
export HTTPD="apache2"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf-enabled/
export HTTPD_SITES_PATH=/etc/${HTTPD}/sites-enabled/
export HTTPD_WWWROOT_PATH=/var/www/html
export HTTPD_LOG_PATH=\$\{APACHE_LOG_DIR\}
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/ssl/certs/ssl-cert-snakeoil.pem
export HTTPD_TLS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
export DISTRO="DebianBuster"
export COMPATIBLE=true
fi
elif [[ -f /etc/SuSE-release ]]; then
# Installing wget to get buildkeys
......@@ -85,95 +87,95 @@ function detectDistribution {
DIST=$(tr "\n" ' ' < /etc/SuSE-release | sed s/VERSION.*//)
SLES_PATCHLEVEL=$(cat /etc/SuSE-release | grep PATCHLEVEL)
if [[ "${DIST}" == "SUSE Linux Enterprise Server 12"* ]] && [[ "${SLES_PATCHLEVEL}" != "PATCHLEVEL = 0" ]]; then
DIST="SLES12"
ANY_RPM=true
ANY_SLES=true
ADDITIONAL_PACKAGES="mariadb"
HTTPD="apache2"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
HTTPD_WWWROOT_PATH=/srv/www/htdocs
HTTPD_LOG_PATH=/var/log/apache2
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/apache2/ssl.crt/server.crt
HTTPD_TLS_KEY=/etc/apache2/ssl.key/server.key
DISTRO="SLE_12"
COMPATIBLE=true
export DIST="SLES12"
export ANY_RPM=true
export ANY_SLES=true
export ADDITIONAL_PACKAGES="mariadb"
export HTTPD="apache2"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_WWWROOT_PATH=/srv/www/htdocs
export HTTPD_LOG_PATH=/var/log/apache2
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/apache2/ssl.crt/server.crt
export HTTPD_TLS_KEY=/etc/apache2/ssl.key/server.key
export DISTRO="SLE_12"
export COMPATIBLE=true
fi
elif [[ -f /etc/redhat-release ]]; then
REV=$(sed s/.*Red\ Hat\ Enterprise\ Linux\ Server\ release\ // < /etc/redhat-release | sed s/\ .*//)
if [[ "${REV}" == "6."* ]]; then
DIST="RHEL6"
ANY_RPM=true
ANY_RHEL=true
MARIADB=true
ADDITIONAL_PACKAGES="MariaDB-server"
HTTPD="httpd"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=logs
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
DISTRO="RHEL6"
COMPATIBLE=true
export DIST="RHEL6"
export ANY_RPM=true
export ANY_RHEL=true
export MARIADB=true
export ADDITIONAL_PACKAGES="MariaDB-server"
export HTTPD="httpd"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_WWWROOT_PATH=/var/www/html
export HTTPD_LOG_PATH=logs
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
export HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
export DISTRO="RHEL6"
export COMPATIBLE=true
elif [[ "${REV}" == "7."* ]]; then
DIST="RHEL7"
ANY_RPM=true
ANY_RHEL=true
ADDITIONAL_PACKAGES="mariadb-server"
HTTPD="httpd"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=logs
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
DISTRO="RHEL7"
COMPATIBLE=true
export DIST="RHEL7"
export ANY_RPM=true
export ANY_RHEL=true
export ADDITIONAL_PACKAGES="mariadb-server"
export HTTPD="httpd"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_WWWROOT_PATH=/var/www/html
export HTTPD_LOG_PATH=logs
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
export HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
export DISTRO="RHEL7"
export COMPATIBLE=true
fi
REV=$(sed s/.*CentOS\ release\ // < /etc/redhat-release | sed s/\ .*//)
if [[ "${REV}" == "6."* ]]; then
DIST="CENTOS6"
ANY_RPM=true
ANY_CENTOS=true
MARIADB=true
ADDITIONAL_PACKAGES="MariaDB-server"
HTTPD="httpd"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=logs
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
DISTRO="RHEL6"
COMPATIBLE=true
export DIST="CENTOS6"
export ANY_RPM=true
export ANY_CENTOS=true
export MARIADB=true
export ADDITIONAL_PACKAGES="MariaDB-server"
export HTTPD="httpd"
export HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
export HTTPD_WWWROOT_PATH=/var/www/html
export HTTPD_LOG_PATH=logs
export HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
export HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
export HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
export HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
export DISTRO="RHEL6"
export COMPATIBLE=true
fi
REV=$(sed s/.*CentOS\ Linux\ release\ // < /etc/redhat-release | sed s/\ .*//)
if [[ "${REV}" == "7."* ]]; then
DIST="CENTOS7"
ANY_RPM=true
ANY_CENTOS=true
MARIADB=true
ADDITIONAL_PACKAGES="mariadb-server"
HTTPD="httpd"
HTTPD_CONF_PATH=/etc/${HTTPD}/conf.d/
HTTPD_SITES_PATH=/etc/${HTTPD}/conf.d/
HTTPD_WWWROOT_PATH=/var/www/html
HTTPD_LOG_PATH=logs
HTTPD_TLS_CIPHERS='ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!aNULL'
HTTPD_TLS_PROTOCOLS='-all +TLSv1 +TLSv1.1 +TLSv1.2'
HTTPD_TLS_CRT=/etc/pki/tls/certs/localhost.crt
HTTPD_TLS_KEY=/etc/pki/tls/private/localhost.key
DISTRO="RHEL7"
COMPATIBLE=true
export DIST="CENTOS7"
export ANY_RPM=true