Skip to content

Instantly share code, notes, and snippets.

@natefoo
Last active March 17, 2017 17:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save natefoo/411c54420689bd861872f845d7ece5b1 to your computer and use it in GitHub Desktop.
Save natefoo/411c54420689bd861872f845d7ece5b1 to your computer and use it in GitHub Desktop.
How to install tools on Test and Main

This gist has been superceded by https://github.com/galaxyproject/usegalaxy-playbook/wiki

Test

Run the installer

Make sure nobody is running a docker container before restarting the service...

$ ssh g2test@cvmfs0-tacc0.galaxyproject.org
$ cvmfs_server transaction test.galaxyproject.org
$ systemctl restart docker.service
$ docker run --rm -v /cvmfs:/cvmfs -p 127.0.0.1:8808:8888 galaxy/test_installer

Install Tools

Go to https://test-installer.galaxyproject.org/ and install tools as normal.

Fix permissions

Conda can install things with less-than-world-readable permissions, which will cause the Galaxy user to be unable to read them, since the CVMFS client mounts everything as the cvmfs user. You can fix this with:

$ find /cvmfs/test.galaxyproject.org/deps/_conda/pkgs /cvmfs/test.galaxyproject.org/deps/_conda/envs -perm -u+r -not -perm -o+r -not -type l -print0 | xargs -0 chmod o+r
$ find /cvmfs/test.galaxyproject.org/deps/_conda/pkgs /cvmfs/test.galaxyproject.org/deps/_conda/envs -perm -u+rx -not -perm -o+rx -not -type l -print0 | xargs -0 chmod o+rx

Finalize CVMFS transaction

Get the latest tag and append .N to the tag name, e.g. if latest tag is galaxy_16.04.04863c8, the new tag should be galaxy_16.04.04863c8.1, followed by galaxy_16.04.04863c8.2, etc.

^C (to stop Galaxy)
$ cvmfs_server tag test.galaxyproject.org
$ cvmfs_server publish -a galaxy_16.04.04863c8.1 -m 'Installed/Updated Foo Tool' test.galaxyproject.org
$ logout

Update CVMFS stratum 1 servers, local caches, and restart Galaxy

$ pass ansible/vault/usegalaxy | ansible-playbook -i stage/inventory galaxy.yml --vault-password-file=/bin/cat --tags=no-update

Main

Run the installer

Make sure nobody is running a docker container before restarting the service...

$ ssh g2main@cvmfs0-tacc0.galaxyproject.org
$ cvmfs_server transaction main.galaxyproject.org
$ systemctl restart docker.service
$ docker run --rm -v /cvmfs:/cvmfs -p 127.0.0.1:8818:8888 galaxy/main_installer

Install Tools

Go to https://main-installer.galaxyproject.org/ and install tools as normal.

Fix permissions

Conda can install things with less-than-world-readable permissions, which will cause the Galaxy user to be unable to read them, since the CVMFS client mounts everything as the cvmfs user. You can fix this with:

$ find /cvmfs/main.galaxyproject.org/deps/_conda/pkgs /cvmfs/main.galaxyproject.org/deps/_conda/envs -perm -u+r -not -perm -o+r -not -type l -print0 | xargs -0 chmod o+r
$ find /cvmfs/main.galaxyproject.org/deps/_conda/pkgs /cvmfs/main.galaxyproject.org/deps/_conda/envs -perm -u+rx -not -perm -o+rx -not -type l -print0 | xargs -0 chmod o+rx

Finalize CVMFS transaction

Get the latest tag and append .N to the tag name, e.g. if latest tag is galaxy_16.04.04863c8, the new tag should be galaxy_16.04.04863c8.1, followed by galaxy_16.04.04863c8.2, etc.

^C (to stop Galaxy)
$ cvmfs_server tag main.galaxyproject.org
$ cvmfs_server publish -a galaxy_16.04.04863c8.1 -m 'Installed/Updated Foo Tool' main.galaxyproject.org
$ logout

Update CVMFS stratum 1 servers, local caches, and restart Galaxy

$ pass ansible/vault/usegalaxy | ansible-playbook -i production/inventory galaxy.yml --vault-password-file=/bin/cat --tags=no-update
@martenson
Copy link

martenson commented Dec 2, 2016

docker exec <installer container> yum install -y zlib-devel

@martenson
Copy link

How to run the ansible

Log in with your TACC account to galaxy04.tacc.utexas.edu. Create virtualenv. Install Ansible. Clone usegalaxy-playbook. Run with ansible-playbook -i production/inventory galaxy.yml --ask-vault-pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment