galaxy update procedure

Hello,

I have a Galaxy 19.09 installation I need to upgrade to 20.05. It is running on Ubuntu 18.04.2 LTS. I also want to update it to use Python3 (currently running with Python 2.7). I was generally following the procedure from “https://galaxyproject.org/admin/maintenance/” under section " General Update Procedures" but I’m worried this may be outdated. Below I’ve listed my planned steps. I’m hoping someone more knowledgeable can let me know if I’m following the wrong instructions.

Procedure:

  1. clone existing prod instance (version 19.09) using tar/gzip
  2. clone PostgreSQL database using “CREATE DATABASE galaxy_prod2 WITH TEMPLATE galaxy OWNER galaxy;”
  3. update galaxy.yml for cloned installation and change database_connection parameter to use new database called galaxy_prod2.
  4. Next upgrade to 20.01 so I can step my way to latest version: “git fetch origin && git checkout release_20.01 && git pull --ff-only origin release_20.01”
  5. then follow instructions on page “https://galaxyproject.org/admin/maintenance/” under section " General Update Procedures".
  6. I’m especially unclear whether I need to execute steps #3, #4, and #8.
  7. assuming that all works, then use git to get latest version 20.05 and follow same instructions.
  8. upgrade from Python 2.7 to Python 3

I tried upgrading Python first but ran into trouble so I assumed I had to upgrade Galaxy first to latest version. I followed these steps for the Python upgrade before attempting to upgrade Galaxy.
I followed these instructions:
(https://docs.galaxyproject.org/en/master/admin/python.html)

  1. I removed .venv from base galaxy install directory
  2. Followed Step #3: set this in .bash_profile and in the current window: export GALAXY_PYTHON=/usr/bin/python3
  3. created symbolic link to python3 and added at beginning of path
  4. verified new correct version using “python --version” <-- now shows 3.6.8
  5. followed step #4 and issued this: “rm -rf /path/to/galaxy/database/compiled_templates/” <-- updated for my env
  6. started galaxy: now when Galaxy started it rebuilt .venv from Python 2.7 instead of 3.6.8.

Obviously the Python upgrade did not work. Something under Galaxy is holding onto 2.7 and I’m not sure what.

Thanks in advance for any help or advice.

Hello

I’ve just updated from 19.09 to 20.05.
Regarding Python2.7 to Python3? I’ve followed the steps here:
https://docs.galaxyproject.org/en/release_20.01/admin/python.html

I’ve also launched this command:
find . -name '*.pyc' -delete
It will remove all “old” .py compiled under Python2.7
I think it will avoid errors such like:
bad magic number in 'galaxy.web.stack'

Fred

Thank you Fred for the thoughful reply. I compared those Python upgrade instructions with mine and they are the same but I did not try to remove all *.pyc code first. I did execute this which might do the same thing “rm -rf /path/to/galaxy/database/compiled_templates/”.

For the Galaxy upgrade did you first upgrade to 20.01 or did you go directly to 20.05? If you first went to 20.01, after you downloaded the 20.01 release from github did you run “./scripts/common_startup.sh”, then manage_db.sh?

I think those are the correct next steps according to my instructions.

Cheers.

find . -name '*.pyc' -delete : I launched this on the root install dir of galaxy. So it will remove every .pyc file in lib/* . I think it should be launched.

and I’ve upgraded from 19.05 to 20.05 without any other step, directly! :slight_smile:

Hi Fred, Just wanted to say the “find” command with the delete worked like a charm. Thank you.

1 Like