From bb1dbc2e67a464a1fb26d3f1a9472b8060db899b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roni=20V=C3=A4yrynen?= Date: Thu, 18 Dec 2025 09:22:18 +0200 Subject: [PATCH] feat: change v6 interface as default --- sample.xo-install.cfg | 5 ----- xo-install.sh | 14 ++++++-------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sample.xo-install.cfg b/sample.xo-install.cfg index a9f16c8..627b865 100644 --- a/sample.xo-install.cfg +++ b/sample.xo-install.cfg @@ -138,8 +138,3 @@ PRESERVE="3" # Configurable network-timeout setting for yarn, in ms. # default: 300000 = 300sec #YARN_NETWORK_TIMEOUT="300000" - -# Enable/Disable XO 6 UI build, accessible at /v6 -# This is actively developed and enabling it might break install/update -# default: false -#INCLUDE_V6="false" diff --git a/xo-install.sh b/xo-install.sh index cf53096..c93d625 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -27,7 +27,6 @@ LISTEN_ADDRESS=${LISTEN_ADDRESS:-""} PROXY_PORT=${PROXY_PORT:-443} INSTALLDIR=${INSTALLDIR:-"/opt/xo"} BRANCH=${BRANCH:-"master"} -INCLUDE_V6=${INCLUDE_V6:-"false"} LOGPATH=${LOGPATH:-$(dirname "$(realpath "$0")")/logs} AUTOUPDATE=${AUTOUPDATE:-"true"} PRESERVE=${PRESERVE:-"3"} @@ -717,7 +716,6 @@ function InstallXO { echo printprog "Running installation" runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn --network-timeout ${YARN_NETWORK_TIMEOUT} && yarn --network-timeout ${YARN_NETWORK_TIMEOUT} build" - [ "$INCLUDE_V6" == "true" ] && runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn --network-timeout ${YARN_NETWORK_TIMEOUT} run turbo run build --filter @xen-orchestra/web" printok "Running installation" # Install plugins (takes care of 3rd party plugins as well) @@ -790,9 +788,6 @@ function InstallXO { if [[ ! -f "$CONFIGPATH/.config/xo-server/config.toml" ]] || [[ "$CONFIGUPDATE" == "true" ]]; then echo - printinfo "Fixing relative path to xo-web installation in xo-server configuration file" - # shellcheck disable=SC1117 - runcmd "sed -i \"s%#'/any/url' = '/path/to/directory'%'/' = '$INSTALLDIR/xo-web/dist/'%\" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/sample.config.toml" printinfo "Changing redis connection address in xo-server configuration file" runcmd "sed -i \"s%#uri = 'redis://redis.company.lan/42'%uri = 'redis://127.0.0.1:6379/0'%\" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/sample.config.toml" @@ -860,10 +855,10 @@ function InstallXO { # install/update is the same procedure so always symlink to most recent installation printinfo "Symlinking fresh xo-server install/update to $INSTALLDIR/xo-server" runcmd "ln -sfn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server $INSTALLDIR/xo-server" - sleep 2 printinfo "Symlinking fresh xo-web install/update to $INSTALLDIR/xo-web" runcmd "ln -sfn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-web $INSTALLDIR/xo-web" - sleep 2 + printinfo "Symlinking fresh xo-web-v6 install/update to $INSTALLDIR/xo-web-v6" + runcmd "ln -sfn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/@xen-orchestra/web $INSTALLDIR/xo-web-v6" printinfo "Symlinking fresh xo-cli install/update to $INSTALLDIR/xo-cli" runcmd "ln -sfn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-cli $INSTALLDIR/xo-cli" printinfo "Symlinking xo-cli script to /usr/local/bin/xo-cli" @@ -981,10 +976,11 @@ function UpdateXO { local INSTALLATIONS="$(runcmd_stdout "find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name \"xen-orchestra*\" -printf \"%T@ %p\\n\" | sort -n | cut -d' ' -f2- | head -n -$PRESERVE")" local XO_SERVER_ACTIVE="$(runcmd_stdout "readlink -e $INSTALLDIR/xo-server")" local XO_WEB_ACTIVE="$(runcmd_stdout "readlink -e $INSTALLDIR/xo-web")" + local XO_WEB_V6_ACTIVE="$(runcmd_stdout "readlink -e $INSTALLDIR/xo-web-v6")" local XO_PROXY_ACTIVE="$(runcmd_stdout "readlink -e $INSTALLDIR/xo-proxy")" for DELETABLE in $INSTALLATIONS; do - if [[ "$XO_SERVER_ACTIVE" != "${DELETABLE}"* ]] && [[ "$XO_WEB_ACTIVE" != "${DELETABLE}"* ]] && [[ "$XO_PROXY_ACTIVE" != "${DELETABLE}"* ]]; then + if [[ "$XO_SERVER_ACTIVE" != "${DELETABLE}"* ]] && [[ "$XO_WEB_ACTIVE" != "${DELETABLE}"* ]] && [[ "$XO_WEB_V6_ACTIVE" != "${DELETABLE}"* ]] && [[ "$XO_PROXY_ACTIVE" != "${DELETABLE}"* ]]; then runcmd "rm -rf $DELETABLE" fi done @@ -1256,6 +1252,8 @@ function RollBackInstallation { runcmd "ln -sfn $INSTALLATION/packages/xo-server $INSTALLDIR/xo-server" printinfo "Setting $INSTALLDIR/xo-web symlink to $INSTALLATION/packages/xo-web" runcmd "ln -sfn $INSTALLATION/packages/xo-web $INSTALLDIR/xo-web" + printinfo "Setting $INSTALLDIR/xo-web-v6 symlink to $INSTALLATION/@xen-orchestra/web" + runcmd "ln -sfn $INSTALLATION/@xen-orchestra/web $INSTALLDIR/xo-web-v6" printinfo "Setting $INSTALLDIR/xo-cli symlink to $INSTALLATION/packages/xo-cli" runcmd "ln -sfn $INSTALLATION/packages/xo-cli $INSTALLDIR/xo-cli" echo