Skip to content

Commit

Permalink
Test OCI
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Jan 23, 2025
1 parent 57bf602 commit 7ae96bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 43 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-oci-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- 'install/OneClickInstall/install-RedHat/**'
- 'install/OneClickInstall/install-Debian.sh'
- 'install/OneClickInstall/install-RedHat.sh'
# push:
# branches:
# - 'feature/test-oci'
push:
branches:
- 'feature/test-oci'

schedule:
- cron: '00 20 * * 6' # At 23:00 on Saturday.
Expand Down
62 changes: 22 additions & 40 deletions install/OneClickInstall/install-RedHat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
set -e

package_manager="yum"
package_sysname="onlyoffice"
package_sysname="onlyoffice";
product_name="DocSpace"
product=$(tr '[:upper:]' '[:lower:]' <<< ${product_name})
INSTALLATION_TYPE="ENTERPRISE"
MAKESWAP="true"
RES_APP_INSTALLED="is already installed"
RES_APP_INSTALLED="is already installed";
RES_APP_CHECK_PORTS="uses ports"
RES_CHECK_PORTS="please, make sure that the ports are free."
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product_name}."
RES_CHECK_PORTS="please, make sure that the ports are free.";
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product_name}.";
RES_QUESTIONS="In case you have any questions contact us via http://support.onlyoffice.com or visit our forum at http://forum.onlyoffice.com"
RES_MARIADB="To continue the installation, you need to remove MariaDB"
INSTALL_FLUENT_BIT="true"
Expand All @@ -26,13 +26,6 @@ while [ "$1" != "" ]; do
fi
;;

-uni | --uninstall )
if [ "$2" != "" ]; then
UNINSTALL=$2
shift
fi
;;

-je | --jwtenabled )
if [ "$2" != "" ]; then
JWT_ENABLED=$2
Expand All @@ -56,7 +49,7 @@ while [ "$1" != "" ]; do

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}"
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
Expand All @@ -69,14 +62,14 @@ while [ "$1" != "" ]; do
fi
;;

-du | --dashboardsusername )
-du | --dashboadrsusername )
if [ "$2" != "" ]; then
DASHBOARDS_USERNAME=$2
shift
fi
;;

-dp | --dashboardspassword )
-dp | --dashboadrspassword )
if [ "$2" != "" ]; then
DASHBOARDS_PASSWORD=$2
shift
Expand All @@ -99,7 +92,7 @@ while [ "$1" != "" ]; do

-it | --installation_type )
if [ "$2" != "" ]; then
INSTALLATION_TYPE="${2^^}"
INSTALLATION_TYPE=$(echo "$2" | awk '{print toupper($0)}');
shift
fi
;;
Expand All @@ -111,18 +104,17 @@ while [ "$1" != "" ]; do
fi
;;

-h | -? | --help )
-? | -h | --help )
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
echo " -it, --installation_type installation type (community|developer|enterprise)"
echo " -u, --update use to update existing components (true|false)"
echo " -uni, --uninstall uninstall existing installation (true|false)"
echo " -je, --jwtenabled specifies the enabling the JWT validation (true|false)"
echo " -jh, --jwtheader defines the http header that will be used to send the JWT"
echo " -js, --jwtsecret defines the secret key to validate the JWT in the request"
echo " -ifb, --installfluentbit install or update fluent-bit (true|false)"
echo " -du, --dashboardsusername login for authorization in /dashboards/"
echo " -dp, --dashboardspassword password for authorization in /dashboards/"
echo " -du, --dashboadrsusername login for authorization in /dashboards/"
echo " -dp, --dashboadrspassword password for authorization in /dashboards/"
echo " -ls, --local_scripts use 'true' to run local scripts (true|false)"
echo " -skiphc, --skiphardwarecheck use to skip hardware check (true|false)"
echo " -ms, --makeswap make swap file (true|false)"
Expand All @@ -147,22 +139,6 @@ if [ -z "${SKIP_HARDWARE_CHECK}" ]; then
SKIP_HARDWARE_CHECK="false";
fi

if [ -z "$GIT_BRANCH" ]; then
DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-RedHat"
else
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-RedHat"
fi

# Run uninstall if requested
if [ "${UNINSTALL}" == "true" ]; then
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
source install-RedHat/uninstall.sh
else
source <(curl -fsSL "${DOWNLOAD_URL_PREFIX}"/uninstall.sh)
fi
exit 0
fi

cat > /etc/yum.repos.d/onlyoffice.repo <<END
[onlyoffice]
name=onlyoffice repo
Expand All @@ -172,16 +148,22 @@ enabled=1
gpgkey=https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE
END

if [ -z $GIT_BRANCH ]; then
DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-RedHat"
else
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-RedHat"
fi

if [ "$LOCAL_SCRIPTS" = "true" ]; then
source install-RedHat/tools.sh
source install-RedHat/bootstrap.sh
source install-RedHat/check-ports.sh
source install-RedHat/install-preq.sh
source install-RedHat/install-app.sh
else
source <(curl "${DOWNLOAD_URL_PREFIX}"/tools.sh)
source <(curl "${DOWNLOAD_URL_PREFIX}"/bootstrap.sh)
source <(curl "${DOWNLOAD_URL_PREFIX}"/check-ports.sh)
source <(curl "${DOWNLOAD_URL_PREFIX}"/install-preq.sh)
source <(curl "${DOWNLOAD_URL_PREFIX}"/install-app.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/tools.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/check-ports.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/install-preq.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/install-app.sh)
fi

0 comments on commit 7ae96bb

Please sign in to comment.