How to update Xibo?

Hello.

A new version of Xibo just arrived, and I’d like to upgrade my current installation. But how?

I’m using Xibo with Docker on Linux, and it’s the first time ever I’m using Docker, so I’d appreciate a little hint on the easiest way to update Xibo.

Please do take a look at our documentation for guidance:

https://xibo.org.uk/docs/setup/upgrading-the-cms
https://xibo.org.uk/docs/setup/upgrading-players

It would be very nice if you could specify which commands to use during the whole process. If you don’t know Linux that well, most of the tutorial is guesswork.

I tried upgrading according to the guide. The version number on Xibo CMS login page still hasn’t changed from Version 2.3.0-alpha. Did I miss anything?

    root@USERNAME:/xibo-cms# wget -c https://github.com/xibosignage/xibo-docker/archive/2.0.6.tar.gz -O - | tar -xz
    --2020-01-27 18:41:10--  https://github.com/xibosignage/xibo-docker/archive/2.0.6.tar.gz
    Resolving github.com (github.com)... 140.82.118.3
    Connecting to github.com (github.com)|140.82.118.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://codeload.github.com/xibosignage/xibo-docker/tar.gz/2.0.6 [following]
    --2020-01-27 18:41:10--  https://codeload.github.com/xibosignage/xibo-docker/tar.gz/2.0.6
    Resolving codeload.github.com (codeload.github.com)... 192.30.253.120
    Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [application/x-gzip]
    Saving to: ‘STDOUT’

    -                                        [ <=>                                                                 ]  14.65K  --.-KB/s    in 0.09s

    2020-01-27 18:41:11 (172 KB/s) - written to stdout [14999]

    root@USERNAME:/xibo-cms# docker-compose down
    Removing xibocms_xmr_1        ... done
    Removing xibocms_swagger_1    ... done
    Removing xibocms_web_1        ... done
    Removing xibocms_quickchart_1 ... done
    Removing xibocms_db_1         ... done
    Removing network xibocms_default
    root@USERNAME:/xibo-cms# docker-compose up -d
    Creating network "xibocms_default" with the default driver
    Creating xibocms_web_1 ...
    Creating xibocms_quickchart_1 ...
    Creating xibocms_swagger_1 ...
    Creating xibocms_xmr_1 ...
    Creating xibocms_db_1 ...
    Creating xibocms_web_1
    Creating xibocms_quickchart_1
    Creating xibocms_swagger_1
    Creating xibocms_xmr_1
    Creating xibocms_xmr_1 ... done
    root@USERNAME:/xibo-cms# docker-compose up -d
    xibocms_web_1 is up-to-date
    xibocms_db_1 is up-to-date
    xibocms_swagger_1 is up-to-date
    Starting xibocms_quickchart_1 ...
    xibocms_xmr_1 is up-to-date
    Starting xibocms_quickchart_1 ... done
    root@USERNAME:/xibo-cms# ls

Essentially it is the same process as the installation guide, you need to change the number in the download to point to the newer version. You will already have the config.env so keep that as it is.

You are done once you have run docker-compose up -d or the equivalent.

Our most recent release is 2.2.2: https://blog.xibo.org.uk/2-2-2-released/

And we have released 2.3.0-alpha which is a developmental preview and should not be used in production: https://blog.xibo.org.uk/2-3-0-alpha-released/

Ok, thanks natasha. I’ll try that. Can I switch to 2.2.2 using the same procedure?

Follow the advice above, changing the number in the download to point to the newer version etc.

I did that, but the version remains 2.3.0-alpha.

I made a script that simplifies the update process a bit.
Could you take a look at the code and see if the commands are correct?
No error messages is recieved during the process, and docker responds to the docker-compose down and docker-compose up -d just fine.

Update script:

#!/bin/bash
clear
echo "Update Xibo:"
read -p 'URL to tar.gz: ' targzurl

echo "Backing up old Xibo files. This could take a few minutes..."

cd
cd ..
rm -r _xibo-cms
cp -R /xibo-cms /_xibo-cms

cd /xibo-cms

echo "Backup complete!"

echo "Downloading and extracting $targzurl"
wget -c $targzurl -O - | tar -xz

echo "Shutting down Xibo"
docker-compose down

echo "Updating Xibo"
docker-compose up -d

echo "Update done!"

The url for tar.gz that I used was:
https://github.com/xibosignage/xibo-cms/releases/download/2.2.2/xibo-docker.tar.gz

You can’t downgrade a CMS - we only support upgrades. If you’ve started out with 2.3.0-alpha then that is the latest available at the moment.

I’d recommend running the down step before you take a backup, otherwise you’re backing up what could be shifting sands.

Other than that, I don’t see what you’re doing wrong there really - the contents of /xibo-cms should be equal to what is inside the release archive.

After you’ve run this procedure you should see in /xibo-cms/docker-compose.yml that the CMS image is xibo-cms:release-2.2.2

    cms-web:
        image: xibosignage/xibo-cms:release-2.2.2

Once you “up” that docker-compose file it shouldn’t be possible to get anything other than the code running in that image, which is 2.2.2. If that isn’t the case then there is something unexpected happening and I’d recommend stepping through the process manually before attempting a script to do it.

You could do docker-compose logs to see what its doing.

Currently docker-compose.yml doesn’t hold any information regarding “cms-web”.
Here’s the contents of that file:

version: "3"

services:
  db:
    image: mysql:5.6
    ports:
    - 3315:3306
    volumes:
    - ./containers/db:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: "SECRET"
      MYSQL_DATABASE: "SECRET"

  xmr:
    image: xibosignage/xibo-xmr:latest
    ports:
    - "9505:9505"
    environment:
      XMR_DEBUG: "true"
      IPV6RESPSUPPORT: "false"
      IPV6PUBSUPPORT: "false"

  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
    - ./:/var/www/cms
    ports:
    - "80:80"
    environment:
      CMS_DEV_MODE: "true"
      MYSQL_DATABASE: "cms"

  swagger:
    image: swaggerapi/swagger-ui:latest
    ports:
    - "8080:8080"
    environment:
    - API_URL=http://localhost/swagger.json

  quickchart:
    image: ianw/quickchart

So if I can’t downgrade the cms, how can I switch to 2.2.2? Do I have to reinstall Xibo CMS?

I’m not sure how you managed to end up with that file :slight_smile:

That file comes from the CMS repository and not the release archives. Unless you are a software developer interested in working on Xibo, you should be using the release archives and the containers we provide.

Compare what you have there with the release of 2.3.0-alpha we published: https://github.com/xibosignage/xibo-docker/blob/1a693334b1dcee79102740e1f049cbb618d6a532/docker-compose.yml

Or even compare that with the archive you’re downloading in your script.

To switch from 2.3.0-alpha to 2.2.2 you’d need to reinstall - but honestly if you’re running directly from the repository, versions don’t really mean anything at that point and you’d be more concerned about which branch the code was checked out from, etc.

Just in case its not clear, running the docker-compose file you’ve printed in anything other than a development environment is not suitable.

Edit: I thought it might be useful to include the developer installation instructions, just in case you are a developer: https://github.com/xibosignage/xibo-cms#developing :hammer_and_wrench:

Thanks, Dan.

I think the it would be best just to reinstall completely, and not use a development enviroment.
Would it be possible to restore all settings, layouts etc. after Xibo is reinstalled?

And, what’s the best way to uninstall / reinstall Xibo?

I think you just need to use one of the release archives and stick with 2.3.0-alpha. There will be a 2.3.0-beta this week and a 2.3.0 following in due course.

The install is all in the shared/ folders inside where you downloaded the files.

If you want to start again, just use a new folder.

Hi Dan,

It doesn’t seem like I have a folder named “shared”:

I’d prefer not to start all over again if possible.

That is an extract of the repository and not the release files, you shouldn’t have all of the code in there. Take a look inside the release archive we ship and you will see that none of those files are there.

I see some folders called xibo-docker-x.x.x and there is a chance you’ve installed into there - but honestly it is hard to say for sure.

Fundamentally you need to find out where your database and library are stored (which will depend on what commands you’ve run and in what order). Its very hard for me to say exactly what your current situation is without knowing what you’ve done - if it were me i’d be tempted to start again in a new folder.

This is the structure i’d expect:

And then inside shared:

image

If you can find the contents of shared, then you can start again in a new folder with an existing database/library.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.