Skip to content

Instantly share code, notes, and snippets.

@dannon
Forked from natefoo/installers.md
Created March 3, 2017 12:56
Show Gist options
  • Save dannon/7aa799ed0a79365cdac54ec6ef419bad to your computer and use it in GitHub Desktop.
Save dannon/7aa799ed0a79365cdac54ec6ef419bad to your computer and use it in GitHub Desktop.
How to install tools on Test and Main

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 -

## 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.

```sh-session
^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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment