Skip to content

Updating Galaxy Test

Martin Cech edited this page Mar 13, 2023 · 27 revisions

Before you begin

Branch

The branch that Galaxy is running is configured in usegalaxy-playbook/env/test/group_vars/all/all.yml.

Update Procedure

I've been unsuccessful in getting Ansible to properly update the galaxy_commit_id variable in the middle of a playbook run. As a result, the Galaxy clone on Pulsar servers would be updated to the previous version of Galaxy (the version in env/test/files/galaxy/galaxy_version.yml at the time of first running ansible-env test update) and the commit hash in welcome.html was also being set to the previous version. As a temporary solution, you can run these three processes separately, as shown in the instructions below.

Note this does not update configurations, see changing configuration in the sidebar for info on that.

Before running the following commands, make sure to add your SSH keys by running ssh-add on your local machine. Also, after ssh'ing to galaxy04, update the ~/.ssh/config file as follows (credit goes to Dave B.):

Host cvmfs0-psu1.galaxyproject.org
    HostName 127.0.0.1
    Port 2222
Host *
    Compression yes
    ConnectTimeout 10
    ControlMaster auto
    ControlPath /tmp/.ssh_control-%r@%h:%p
    ControlPersist 4h
    ForwardAgent yes
    ServerAliveInterval 120
    StreamLocalBindUnlink yes
    KeepAlive yes
user@galaxy04$ ssh -A galaxy04.tacc.utexas.edu
user@galaxy04$ . ./ansible/bin/activate
user@galaxy04$ cd usegalaxy-playbook
user@galaxy04$ git checkout main
user@galaxy04$ git pull && git submodule update
user@galaxy04$ ansible-galaxy role install -r requirements.yml   # use --force if role versions have changed
user@galaxy04$ make test-update
user@galaxy04$ git diff     # verify that none of the mutable configs pulled to the playbook are mangled
user@galaxy04$ git add -- .
user@galaxy04$ git commit -m 'Update Test'
user@galaxy04$ git push

To abort a transaction (Updating Galaxy, Installing Tools, etc.):

user@galaxy04$ ssh g2test@cvmfs0-psu1.galaxyproject.org (from your laptop)
g2test@galaxy04$ cvmfs_server abort test.galaxyproject.org (or Main or Reference Data repos)

To view Galaxy logs to see if it has re-started:

user@galaxy04$ ssh root@galaxy07
root@galaxy07$ journalctl -fu "galaxy-test-gunicorn*"

Old Stuff

It is unclear if the following is needed or useful.

Client Build

As of 18.09, the client always needs to be built regardless of branch. This is done by Ansible. If you need to update the client without updating Galaxy itself, you can do so with ansible-env test client. Note that client build is done as part of the update procedure, described below.

Bugs

As of 2019-04-09, Test runs from Python 3.6 installed via the tool dependency Conda in the env _galaxy_. However, this has been done without a virtualenv as described in the 19.01 docs. Conda's Python has a few dependencies, one of which is certifi, also one of Galaxy's dependencies. When Galaxy's pinned version of certifi changes, installing the new version with pip (as performed by Ansible) will fail. We need a proper solution for this, but in the meantime, the solution is to update certifi prior to updating Galaxy with e.g.:

$ /cvmfs/test.galaxyproject.org/deps/_conda/bin/conda install -n _galaxy_ certifi=YYYY.MM.DD

If the ansible-galaxy role install -r requirements.yml step does nothing, returns cleanly, but subsequent steps indicate missing playbooks, then you probably have too old a version of ansible-galaxy. Make sure you update to 2.9+