Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
QA
ox-installer
Commits
90c1c8dc
Commit
90c1c8dc
authored
Sep 06, 2019
by
benedikt.kroening
Browse files
Some more cleanups
Moved documents init
parent
5a15a597
Changes
6
Show whitespace changes
Inline
Side-by-side
README.md
View file @
90c1c8dc
# Open-Xchange App Suite Installer script collection
# Open-Xchange App Suite Installer script collection
This collection contains several scripts for letting you install a fully fledged Open-Xchange environment.
This collection contains several scripts for letting you install a fully fledged Open-Xchange environment.
By default this will install a singlenode environment consi
ti
ting of:
By default this will install a singlenode environment consi
s
ting of:
-
Database (mysql or mariadb)
-
Database (mysql or mariadb)
-
Open-Xchange middleware
-
Open-Xchange middleware
-
Apache2 Frontend
-
Apache2 Frontend
...
@@ -9,7 +9,7 @@ By default this will install a singlenode environment consititing of:
...
@@ -9,7 +9,7 @@ By default this will install a singlenode environment consititing of:
## Configuration
## Configuration
Basic Configuration is located inside the file
`config/config`
.
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
## Versions
...
@@ -26,17 +26,32 @@ Simple cli examples of how to use this
...
@@ -26,17 +26,32 @@ Simple cli examples of how to use this
It is always a good idea to read documentation or help texts!
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.
Right now only frontend (apache), middleware and a database are installed.
It uses dovecot.qa.open-xchange.com as mail backend.
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.
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
## Docker
This installer supports creation of Open-Xchange docker images. These images will use supervisord as process monitor.
This installer supports creation of Open-Xchange docker images. These images will use supervisord as process monitor.
...
...
config/init-documents.sh
→
config/
middleware/21_
init-documents.sh
View file @
90c1c8dc
...
@@ -26,7 +26,7 @@ set -e
...
@@ -26,7 +26,7 @@ set -e
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
# sourcing some commonly used functions and executing basic checks
# sourcing some commonly used functions and executing basic checks
source
${
SCRIPT_DIR
}
/../lib/common.bash
source
${
SCRIPT_DIR
}
/../
../
lib/common.bash
checkRootPrivileges
checkRootPrivileges
detectDistribution
detectDistribution
# sourcing the default configuration to use
# sourcing the default configuration to use
...
@@ -69,21 +69,36 @@ esac
...
@@ -69,21 +69,36 @@ esac
done
done
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
# echo "Using following configuration:"
if
[
"
${
INSTALL_DOCUMENTS
}
"
=
false
]
;
then
# set | grep "OX_GUARD"
echo
"Skipping init script for documents"
# echo "==============================="
exit
0
# sleep 5
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
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
echo
"Documents init finished at: "
\ No newline at end of file
cat
${
INIT_STATE_FILE
}
\ No newline at end of file
config/middleware/30_init_singlenode.sh
View file @
90c1c8dc
...
@@ -63,16 +63,6 @@ if [[ "${INSTALL_TYPE}" == "singlenode" ]]; then
...
@@ -63,16 +63,6 @@ if [[ "${INSTALL_TYPE}" == "singlenode" ]]; then
fi
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
}
restartService
${
HTTPD
}
fi
fi
config/middleware/90_init-qa.sh
View file @
90c1c8dc
...
@@ -47,4 +47,9 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
...
@@ -47,4 +47,9 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
sleep
5
sleep
5
fi
fi
echo
"
$(
date
)
"
>
${
INIT_STATE_FILE
}
else
echo
"QA init already executed! Skipping"
exit
0
fi
fi
ox-installer.sh
View file @
90c1c8dc
...
@@ -206,6 +206,7 @@ if [ "$INSTALL_DOCUMENTCONVERTER" = true ] ; then
...
@@ -206,6 +206,7 @@ if [ "$INSTALL_DOCUMENTCONVERTER" = true ] ; then
fi
fi
if
[
"
$INSTALL_FRONTEND
"
=
true
]
;
then
if
[
"
$INSTALL_FRONTEND
"
=
true
]
;
then
# Install OX App Suite frontend (optionally with guard and documents)
setup/install-frontend.sh
setup/install-frontend.sh
if
[
"
$INIT
"
=
true
]
;
then
if
[
"
$INIT
"
=
true
]
;
then
config/init-frontend.sh
config/init-frontend.sh
...
...
setup/install-documents.sh
View file @
90c1c8dc
...
@@ -100,23 +100,12 @@ fi
...
@@ -100,23 +100,12 @@ fi
# These packages are for document middleware components (not the documents backend)
# These packages are for document middleware components (not the documents backend)
if
[[
"
${
INSTALL_DOC_MIDDLEWARE
}
"
=
true
]]
;
then
if
[[
"
${
INSTALL_DOC_MIDDLEWARE
}
"
=
true
]]
;
then
echo
"Adding OX Documents middleware packages ..."
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
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
if
[[
"
${
INSTALL_DOC_FRONTEND
}
"
=
true
]]
;
then
echo
"Adding OX Documents frontend packages ..."
echo
"Adding OX Documents frontend packages ..."
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documents-ui-static open-xchange-documents-help-*"
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documents-ui-static open-xchange-documents-help-*"
fi
fi
installPackages
${
PACKAGES
}
installPackages
${
PACKAGES
}
if
[
"
$INIT
"
=
true
]
;
then
${
SCRIPT_DIR
}
/../config/init-documents.sh
fi
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment