Merge branch 'hotfix/v2.0.1' into develop

This commit is contained in:
Evgeniy Antonyuk 2023-12-20 22:31:58 +08:00
commit 848a97f629
8 changed files with 595 additions and 3 deletions

146
.github/workflows/ci-oci-install.yml vendored Normal file
View File

@ -0,0 +1,146 @@
name: Install OneClickInstall DocSpace
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'install/OneClickInstall/**'
schedule:
- cron: '00 20 * * 6' # At 23:00 on Saturday.
workflow_dispatch:
inputs:
centos7:
type: boolean
description: 'CentOS 7'
default: true
centos8s:
type: boolean
description: 'CentOS 8 Stream'
default: true
centos9s:
type: boolean
description: 'CentOS 9 Stream'
default: true
debian10:
type: boolean
description: 'Debian 10'
default: true
debian11:
type: boolean
description: 'Debian 11'
default: true
debian12:
type: boolean
description: 'Debian 12'
default: true
ubuntu1804:
type: boolean
description: 'Ubuntu 18.04'
default: true
ubuntu2004:
type: boolean
description: 'Ubuntu 20.04'
default: true
ubuntu2204:
type: boolean
description: 'Ubuntu 22.04'
default: true
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Set matrix names
id: set-matrix
run: |
matrix=$(echo '{
"include": [
{"execute": '${{ github.event.inputs.centos7 || true }}', "name": "CentOS7", "os": "centos7", "distr": "generic"},
{"execute": '${{ github.event.inputs.centos8s || true }}', "name": "CentOS8S", "os": "centos8s", "distr": "generic"},
{"execute": '${{ github.event.inputs.centos9s || true }}', "name": "CentOS9S", "os": "centos9s", "distr": "generic"},
{"execute": '${{ github.event.inputs.debian10 || true }}', "name": "Debian10", "os": "debian10", "distr": "generic"},
{"execute": '${{ github.event.inputs.debian11 || true }}', "name": "Debian11", "os": "debian11", "distr": "generic"},
{"execute": '${{ github.event.inputs.debian12 || true }}', "name": "Debian12", "os": "debian12", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu1804 || true }}', "name": "Ubuntu18.04", "os": "ubuntu1804", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu2004 || true }}', "name": "Ubuntu20.04", "os": "ubuntu2004", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu2204 || true }}', "name": "Ubuntu22.04", "os": "ubuntu2204", "distr": "generic"}
]
}' | jq -c '{include: [.include[] | select(.execute == true)]}')
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
vagrant-up:
name: "Test DocSpace with ${{ matrix.name}}"
runs-on: ubuntu-22.04
needs: prepare
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.prepare.outputs.matrix)}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Get update and install vagrant
run: |
set -eux
sudo apt update -y
sudo apt install vagrant virtualbox -y
- name: "Test production scripts with ${{matrix.name}}"
if: ${{ github.event_name == 'schedule' }}
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 40
retry_on: error
command: |
set -eux
cd tests/vagrant
TEST_CASE='--production-install' \
DISTR='${{ matrix.distr }}' \
OS='${{ matrix.os }}' \
DOWNLOAD_SCRIPT='-ds true' \
RAM='5100' \
CPU='3' \
ARGUMENTS="-arg '--skiphardwarecheck true --makeswap false'" \
vagrant up
on_retry_command: |
echo "RUN CLEAN UP: Destroy vagrant and one more try"
cd tests/vagrant
sleep 10
vagrant destroy --force
- name: "Test Local scripts with ${{matrix.name}}"
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 40
retry_on: error
command: |
set -eux
cd tests/vagrant
TEST_CASE='--local-install' \
DISTR='${{ matrix.distr }}' \
OS='${{matrix.os}}' \
RAM='5100' \
CPU='3' \
DOWNLOAD_SCRIPT='-ds false' \
TEST_REPO='-tr true' \
ARGUMENTS="-arg '--skiphardwarecheck true --makeswap false --localscripts true'" \
vagrant up
on_retry_command: |
echo "RUN CLEAN UP: Destroy vagrant and one more try"
cd tests/vagrant
sleep 10
vagrant destroy --force

View File

@ -13,10 +13,18 @@ while [ "$1" != "" ]; do
shift
fi
;;
-pm | --packagemanager )
if [ "$2" != "" ]; then
PACKAGE_MANAGER=$2
shift
fi
;;
-? | -h | --help )
echo " Usage: bash build.sh [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
echo " -pm, --packagemanager dependencies for package manager"
echo " -bp, --buildpath output path"
echo " -?, -h, --help this help"
echo " Examples"
@ -64,6 +72,11 @@ SERVICE_NAME=(
)
reassign_values (){
if [[ "${PACKAGE_MANAGER}" = "deb" ]]; then
DEPENDENCY_LIST="mysql.service redis-server.service rabbitmq-server.service"
else
DEPENDENCY_LIST="mysqld.service redis.service rabbitmq-server.service"
fi
case $1 in
api )
SERVICE_PORT="5000"
@ -79,6 +92,7 @@ reassign_values (){
SERVICE_PORT="9899"
WORK_DIR="${BASE_DIR}/services/ASC.Socket.IO/"
EXEC_FILE="server.js"
DEPENDENCY_LIST=""
;;
studio-notify )
SERVICE_PORT="5006"
@ -106,6 +120,7 @@ reassign_values (){
WORK_DIR="${BASE_DIR}/products/ASC.Files/service/"
EXEC_FILE="ASC.Files.Service.dll"
CORE_EVENT_BUS=" --core:eventBus:subscriptionClientName=asc_event_bus_files_service_queue"
DEPENDENCY_LIST="${DEPENDENCY_LIST} elasticsearch.service"
;;
studio )
SERVICE_PORT="5003"
@ -122,6 +137,7 @@ reassign_values (){
SERVICE_PORT="9834"
WORK_DIR="${BASE_DIR}/services/ASC.SsoAuth/"
EXEC_FILE="app.js"
DEPENDENCY_LIST=""
;;
clear-events )
SERVICE_PORT="5027"
@ -138,6 +154,7 @@ reassign_values (){
SERVICE_PORT="5013"
WORK_DIR="${BASE_DIR}/products/ASC.Files/editor/"
EXEC_FILE="server.js"
DEPENDENCY_LIST=""
;;
migration-runner )
WORK_DIR="${BASE_DIR}/services/ASC.Migration.Runner/"
@ -147,11 +164,13 @@ reassign_values (){
SERVICE_PORT="5011"
WORK_DIR="${BASE_DIR}/products/ASC.Login/login/"
EXEC_FILE="server.js"
DEPENDENCY_LIST="openresty.service"
;;
healthchecks )
SERVICE_PORT="5033"
WORK_DIR="${BASE_DIR}/services/ASC.Web.HealthChecks.UI/"
EXEC_FILE="ASC.Web.HealthChecks.UI.dll"
DEPENDENCY_LIST=""
;;
esac
SERVICE_NAME="$1"
@ -173,6 +192,7 @@ reassign_values (){
}
write_to_file () {
[[ -n ${DEPENDENCY_LIST} ]] && sed -e "s_\(After=.*\)_\1 ${DEPENDENCY_LIST}_" -e "/After=/a Wants=${DEPENDENCY_LIST}" -i $BUILD_PATH/${PRODUCT}-${SERVICE_NAME[$i]}.service
sed -i -e 's#${SERVICE_NAME}#'$SERVICE_NAME'#g' -e 's#${WORK_DIR}#'$WORK_DIR'#g' -e "s#\${RESTART}#$RESTART#g" \
-e "s#\${EXEC_START}#$EXEC_START#g" -e "s#\${SERVICE_TYPE}#$SERVICE_TYPE#g" $BUILD_PATH/${PRODUCT}-${SERVICE_NAME[$i]}.service
}

0
install/deb/debian/rules Executable file → Normal file
View File

View File

@ -2,7 +2,7 @@
cd %{_builddir}/buildtools
bash install/common/systemd/build.sh
bash install/common/systemd/build.sh -pm "rpm"
bash install/common/build-frontend.sh --srcpath %{_builddir} -di "false"
bash install/common/build-backend.sh --srcpath %{_builddir}

View File

@ -1012,7 +1012,7 @@
<ROW Action="DetectMySQLService" Type="1" Source="aicustact.dll" Target="DetectProcess" Options="3" AdditionalSeq="AI_DATA_SETTER_9"/>
<ROW Action="ElasticSearchInstallPlugin" Type="1030" Source="utils.vbs" Target="ElasticSearchInstallPlugin"/>
<ROW Action="ElasticSearchSetup" Type="6" Source="utils.vbs" Target="ElasticSearchSetup"/>
<ROW Action="MoveNginxConfigs" Type="6" Source="utils.vbs" Target="MoveNginxConfigs"/>
<ROW Action="MoveNginxConfigs" Type="4102" Source="utils.vbs" Target="MoveNginxConfigs"/>
<ROW Action="MySQLConfigure" Type="262" Source="utils.vbs" Target="MySQLConfigure"/>
<ROW Action="OpenCancelUrl" Type="194" Source="viewer.exe" Target="http://www.onlyoffice.com/install-canceled.aspx" WithoutSeq="true" Options="1"/>
<ROW Action="PostgreSQLConfigure" Type="4102" Source="utils.vbs" Target="PostgreSqlConfigure"/>

View File

@ -478,13 +478,26 @@ End Function
Function MoveNginxConfigs
On Error Resume Next
Dim objFSO, sourceFolder, targetFolder, nginxFolder
Dim objFSO, objShell, sourceFolder, targetFolder, nginxFolder, configFile, configSslFile, sslScriptPath, sslCertPath, sslCertKeyPath, psCommand
' Define source and target paths
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
sourceFolder = Session.Property("APPDIR") & "nginx\conf"
targetFolder = "C:\OpenResty\conf"
nginxFolder = Session.Property("APPDIR") & "nginx"
configSslFile = targetFolder & "\onlyoffice-proxy-ssl.conf.tmpl"
configFile = targetFolder & "\onlyoffice-proxy.conf"
sslScriptPath = Session.Property("APPDIR") & "sbin\docspace-ssl-setup.ps1"
' Read content and extract SSL certificate and key paths if it exists
If objFSO.FileExists(configFile) Then
content = ReadFile(configFile, objFSO)
sslCertPath = ExtractPath(content, "ssl_certificate\s+(.*?);", objFSO)
sslCertKeyPath = ExtractPath(content, "ssl_certificate_key\s+(.*?);", objFSO)
Else
WScript.Echo "Configuration file not found!"
End If
' Check if source folder exists
If objFSO.FolderExists(sourceFolder) Then
@ -504,7 +517,41 @@ Function MoveNginxConfigs
WScript.Echo "Source folder does not exist."
End If
' If SSL path variables are present, set the SSL paths
If objFSO.FileExists(configSslFile) And ((Len(Trim(sslCertPath)) > 0) And (Len(Trim(sslCertKeyPath)) > 0)) Then
psCommand = "powershell -File """ & sslScriptPath & """ -f """ & sslCertPath & """ """ & sslCertKeyPath & """"
objShell.Run psCommand, 0, True
Else
WScript.Echo "Source file not found."
End If
Set objFSO = Nothing
Set objShell = Nothing
End Function
Function ReadFile(filePath, objFSO)
Dim objFile
If objFSO.FileExists(filePath) Then
Set objFile = objFSO.OpenTextFile(filePath, 1)
ReadFile = objFile.ReadAll
objFile.Close
Else
WScript.Echo "File not found: " & filePath
End If
End Function
Function ExtractPath(content, pattern, objFSO)
Dim regex, match
Set regex = New RegExp
regex.Pattern = pattern
Set match = regex.Execute(content)
If match.Count > 0 Then
ExtractPath = match(0).Submatches(0)
Else
WScript.Echo "Path not found in the content."
ExtractPath = Null
End If
End Function
Sub CopyFolderContents(sourceFolder, targetFolder, objFSO)

22
tests/vagrant/Vagrantfile vendored Normal file
View File

@ -0,0 +1,22 @@
Vagrant.configure("2") do |config|
config.vm.box = "#{ENV['DISTR']}/#{ENV['OS']}"
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", "#{ENV['RAM']}"] #<= total RAM.
v.customize ["modifyvm", :id, "--cpus", "#{ENV['CPU']}"] #<= total CPU.
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
config.vm.define 'ubuntu'
config.vm.hostname = "host4test"
if ENV['TEST_CASE'] != '--production-install'
config.vm.provision "file", source: "../../../DocSpace-buildtools/install/OneClickInstall/.", destination: "/tmp/docspace/"
end
config.vm.provision "shell", path: './install.sh', :args => "#{ENV['DOWNLOAD_SCRIPT']} #{ENV['TEST_REPO']} #{ENV['ARGUMENTS']}"
# Prevent SharedFoldersEnableSymlinksCreate errors
config.vm.synced_folder ".", "/vagrant", disabled: true
end

357
tests/vagrant/install.sh Normal file
View File

@ -0,0 +1,357 @@
#!/bin/bash
set -e
while [ "$1" != "" ]; do
case $1 in
-ds | --download-scripts )
if [ "$2" != "" ]; then
DOWNLOAD_SCRIPTS=$2
shift
fi
;;
-arg | --arguments )
if [ "$2" != "" ]; then
ARGUMENTS=$2
shift
fi
;;
-pi | --production-install )
if [ "$2" != "" ]; then
PRODUCTION_INSTALL=$2
shift
fi
;;
-li | --local-install )
if [ "$2" != "" ]; then
LOCAL_INSTALL=$2
shift
fi
;;
-lu | --local-update )
if [ "$2" != "" ]; then
LOCAL_UPDATE=$2
shift
fi
;;
-tr | --test-repo )
if [ "$2" != "" ]; then
TEST_REPO_ENABLE=$2
shift
fi
;;
esac
shift
done
export TERM=xterm-256color^M
SERVICES_SYSTEMD=(
"docspace-api.service"
"docspace-doceditor.service"
"docspace-studio-notify.service"
"docspace-files.service"
"docspace-notify.service"
"docspace-studio.service"
"docspace-backup-background.service"
"docspace-files-services.service"
"docspace-people-server.service"
"docspace-backup.service"
"docspace-healthchecks.service"
"docspace-socket.service"
"docspace-clear-events.service"
"docspace-login.service"
"docspace-ssoauth.service"
"ds-converter.service"
"ds-docservice.service"
"ds-metrics.service")
function common::get_colors() {
COLOR_BLUE=$'\e[34m'
COLOR_GREEN=$'\e[32m'
COLOR_RED=$'\e[31m'
COLOR_RESET=$'\e[0m'
COLOR_YELLOW=$'\e[33m'
export COLOR_BLUE
export COLOR_GREEN
export COLOR_RED
export COLOR_RESET
export COLOR_YELLOW
}
#############################################################################################
# Checking available resources for a virtual machine
# Globals:
# None
# Arguments:
# None
# Outputs:
# None
#############################################################################################
function check_hw() {
local FREE_RAM=$(free -h)
local FREE_CPU=$(nproc)
echo "${COLOR_RED} ${FREE_RAM} ${COLOR_RESET}"
echo "${COLOR_RED} ${FREE_CPU} ${COLOR_RESET}"
}
#############################################################################################
# Prepare vagrant boxes like: set hostname/remove postfix for DEB distributions
# Globals:
# None
# Arguments:
# None
# Outputs:
# ☑ PREPAVE_VM: **<prepare_message>**
#############################################################################################
function prepare_vm() {
if [ -f /etc/lsb-release ] ; then
DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'`
REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
DISTRIB_CODENAME=`cat /etc/lsb-release | grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }'`
DISTRIB_RELEASE=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
elif [ -f /etc/lsb_release ] || [ -f /usr/bin/lsb_release ] ; then
DIST=`lsb_release -a 2>&1 | grep 'Distributor ID:' | awk -F ":" '{print $2 }'`
REV=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }'`
DISTRIB_CODENAME=`lsb_release -a 2>&1 | grep 'Codename:' | awk -F ":" '{print $2 }'`
DISTRIB_RELEASE=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }'`
elif [ -f /etc/os-release ] ; then
DISTRIB_CODENAME=$(grep "VERSION=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g | tr -d '[:space:]')
DISTRIB_RELEASE=$(grep "VERSION_ID=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g | tr -d '[:space:]')
fi
DIST=`echo "$DIST" | tr '[:upper:]' '[:lower:]' | xargs`;
DISTRIB_CODENAME=`echo "$DISTRIB_CODENAME" | tr '[:upper:]' '[:lower:]' | xargs`;
REV=`echo "$REV" | xargs`;
if [ ! -f /etc/centos-release ]; then
if [ "${DIST}" = "debian" ]; then
if [ "${DISTRIB_CODENAME}" == "bookworm" ]; then
apt-get update -y
apt install -y curl gnupg
fi
apt-get remove postfix -y
echo "${COLOR_GREEN}☑ PREPAVE_VM: Postfix was removed${COLOR_RESET}"
fi
if [ "${TEST_REPO_ENABLE}" == 'true' ]; then
mkdir -p -m 700 $HOME/.gnupg
echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://nexus.onlyoffice.com/repository/4testing-debian stable main" | sudo tee /etc/apt/sources.list.d/onlyoffice4testing.list
curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/onlyoffice.gpg --import
chmod 644 /usr/share/keyrings/onlyoffice.gpg
fi
fi
if [ -f /etc/centos-release ]; then
if [ "${TEST_REPO_ENABLE}" == 'true' ]; then
cat > /etc/yum.repos.d/onlyoffice4testing.repo <<END
[onlyoffice4testing]
name=onlyoffice4testing repo
baseurl=https://nexus.onlyoffice.com/repository/centos-testing/4testing/main/noarch
gpgcheck=1
enabled=1
gpgkey=https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE
END
yum -y install centos*-release
fi
local REV=$(cat /etc/redhat-release | sed 's/[^0-9.]*//g')
if [[ "${REV}" =~ ^9 ]]; then
update-crypto-policies --set LEGACY
echo "${COLOR_GREEN}☑ PREPAVE_VM: sha1 gpg key chek enabled${COLOR_RESET}"
fi
fi
# Clean up home folder
rm -rf /home/vagrant/*
if [ -d /tmp/docspace ]; then
mv /tmp/docspace/* /home/vagrant
fi
echo '127.0.0.1 host4test' | sudo tee -a /etc/hosts
echo "${COLOR_GREEN}☑ PREPAVE_VM: Hostname was setting up${COLOR_RESET}"
}
#############################################################################################
# Install docspace and then healthcheck
# Globals:
# None
# Arguments:
# None
# Outputs:
# Script log
#############################################################################################
function install_docspace() {
if [ "${DOWNLOAD_SCRIPTS}" == 'true' ]; then
wget https://download.onlyoffice.com/docspace/docspace-install.sh
else
sed 's/set -e/set -xe/' -i *.sh
fi
printf "N\nY\nY" | bash docspace-install.sh ${ARGUMENTS}
if [[ $? != 0 ]]; then
echo "Exit code non-zero. Exit with 1."
exit 1
else
echo "Exit code 0. Continue..."
fi
}
#############################################################################################
# Healthcheck function for systemd services
# Globals:
# SERVICES_SYSTEMD
# Arguments:
# None
# Outputs:
# Message about service status
#############################################################################################
function healthcheck_systemd_services() {
for service in ${SERVICES_SYSTEMD[@]}
do
if systemctl is-active --quiet ${service}; then
echo "${COLOR_GREEN}☑ OK: Service ${service} is running${COLOR_RESET}"
else
echo "${COLOR_RED}⚠ FAILED: Service ${service} is not running${COLOR_RESET}"
SYSTEMD_SVC_FAILED="true"
fi
done
}
#############################################################################################
# Set output if some services failed
# Globals:
# None
# Arguments:
# None
# Outputs:
# ⚠ ⚠ ATTENTION: Some sevices is not running ⚠ ⚠
# Returns
# 0 if all services is start correctly, non-zero if some failed
#############################################################################################
function healthcheck_general_status() {
if [ ! -z "${SYSTEMD_SVC_FAILED}" ]; then
echo "${COLOR_YELLOW}⚠ ⚠ ATTENTION: Some sevices is not running ⚠ ⚠ ${COLOR_RESET}"
exit 1
fi
}
#############################################################################################
# Get logs for all services
# Globals:
# $SERVICES_SYSTEMD
# Arguments:
# None
# Outputs:
# Logs for systemd services
# Returns:
# none
# Commentaries:
# This function succeeds even if the file for cat was not found. For that use ${SKIP_EXIT} variable
#############################################################################################
function services_logs() {
for service in ${SERVICES_SYSTEMD[@]}; do
echo -----------------------------------------
echo "${COLOR_GREEN}Check logs for systemd service: $service${COLOR_RESET}"
echo ---------------------- -------------------
EXIT_CODE=0
journalctl -u $service || true
done
local MAIN_LOGS_DIR="/var/log/onlyoffice"
local DOCSPACE_LOGS_DIR="${MAIN_LOGS_DIR}/docspace"
local DOCUMENTSERVER_LOGS_DIR="${MAIN_LOGS_DIR}/documentserver"
local DOCSERVICE_LOGS_DIR="${DOCUMENTSERVER_LOGS_DIR}/docservice"
local CONVERTER_LOGS_DIR="${DOCUMENTSERVER_LOGS_DIR}/converter"
local METRICS_LOGS_DIR="${DOCUMENTSERVER_LOGS_DIR}/metrics"
ARRAY_MAIN_SERVICES_LOGS=($(ls ${MAIN_LOGS_DIR} | grep log | sed 's/web.sql.log//;s/web.api.log//;s/nginx.*//' ))
ARRAY_DOCSPACE_LOGS=($(ls ${DOCSPACE_LOGS_DIR}))
ARRAY_DOCSERVICE_LOGS=($(ls ${DOCSERVICE_LOGS_DIR}))
ARRAY_CONVERTER_LOGS=($(ls ${CONVERTER_LOGS_DIR}))
ARRAY_METRICS_LOGS=($(ls ${METRICS_LOGS_DIR}))
echo "-----------------------------------"
echo "${COLOR_YELLOW} Check logs for main services ${COLOR_RESET}"
echo "-----------------------------------"
for file in ${ARRAY_MAIN_SERVICES_LOGS[@]}; do
echo ---------------------------------------
echo "${COLOR_GREEN}logs from file: ${file}${COLOR_RESET}"
echo ---------------------------------------
cat ${MAIN_LOGS_DIR}/${file} || true
done
echo "-----------------------------------"
echo "${COLOR_YELLOW} Check logs for Docservice ${COLOR_RESET}"
echo "-----------------------------------"
for file in ${ARRAY_DOCSERVICE_LOGS[@]}; do
echo ---------------------------------------
echo "${COLOR_GREEN}logs from file: ${file}${COLOR_RESET}"
echo ---------------------------------------
cat ${DOCSERVICE_LOGS_DIR}/${file} || true
done
echo "-----------------------------------"
echo "${COLOR_YELLOW} Check logs for Converter ${COLOR_RESET}"
echo "-----------------------------------"
for file in ${ARRAY_CONVERTER_LOGS[@]}; do
echo ---------------------------------------
echo "${COLOR_GREEN}logs from file ${file}${COLOR_RESET}"
echo ---------------------------------------
cat ${CONVERTER_LOGS_DIR}/${file} || true
done
echo "-----------------------------------"
echo "${COLOR_YELLOW} Start logs for Metrics ${COLOR_RESET}"
echo "-----------------------------------"
for file in ${ARRAY_METRICS_LOGS[@]}; do
echo ---------------------------------------
echo "${COLOR_GREEN}logs from file ${file}${COLOR_RESET}"
echo ---------------------------------------
cat ${METRICS_LOGS_DIR}/${file} || true
done
echo "-----------------------------------"
echo "${COLOR_YELLOW} Start logs for DocSpace ${COLOR_RESET}"
echo "-----------------------------------"
for file in ${ARRAY_DOCSPACE_LOGS[@]}; do
echo ---------------------------------------
echo "${COLOR_GREEN}logs from file ${file}${COLOR_RESET}"
echo ---------------------------------------
cat ${DOCSPACE_LOGS_DIR}/${file} || true
done
}
function healthcheck_docker_installation() {
exit 0
}
main() {
common::get_colors
prepare_vm
check_hw
install_docspace
sleep 120
services_logs
healthcheck_systemd_services
healthcheck_general_status
}
main