Open bgruening opened 8 years ago
What about putting a empty file into /export during build-time.
this is what we're doing in https://github.com/ARTbio/GalaxyKickStart/blob/master/roles/galaxy.movedata/tasks/main.yml. As an added bonus you will be able to commit your docker images :).
So you ended up with the same idea and named this file .original
? :)
exactly ... seemed like the easiest way to control the persistence, and works with containers and VMs.
What are you plans for this sub-role? Why is this not upstream ;)
Sure, let's do that. I'll make this a separate repo, and make it configurable if you want hard-links or soft links, and you'll use that for docker-galaxy?
Hmm, though it would be a bit more work for the custom locations you're using. What we do is just take the location in the container (say /var/lib/postgresql-9.3/ and move that to /export/var/lib/postgresql-9.3/). Not a crazy amount of work, but that will need some testing.
I guess soft-links are enough? If you have already ported the export_user_files.py.j2
to ansible than lets use this. I'm not entirely convinced that ansible is more readable than a python script but I'm willing to learn :)
I don't see a problem with the custom locations as these can be migrated if needed like here: https://github.com/galaxyproject/ansible-galaxy-extras/blob/master/templates/startup.sh.j2#L3
Wenn wir es uns richtig dreckig geben wollen könnten wir in dem Rutsch auch dem Umstieg auf Ubuntu 16.04 machen. With this change people need to upgrade there DB not matter what and we can introduce this the new location as well.
I guess soft-links are enough?
For containers definitely, but for the VM use case you may want to upgrade the instance by replaying the playbook. Unfortunately ansible doesn't play nice with softlinks. Though in reality, you would probably just point a new VM against old exported data, just as in docker. I'll make it configurable, maybe we can even remove the hardlink option. The downside with hardlinks is that with GalaxyKickStart containers we need to run privileged containers to be able to do bindmounts, so here soft-links would definitely be better.
Container startup time is largely dependent on the size of data that will be copied to the
/export
. This gets more and more important with containers with many tools. Considering the use-once-remove-later use-case this copy step is not needed and just slows down the startup time. Also during travis testing this can take up to 10 min and is useless.I'm searching for the most elegant and stable way to detect if something is mounted in
/export
. If nothing is mounted I would like to symlink everything into/export
and not copy it. We could check the UID, GID of/export
but this is probably not stable enough. What about putting a empty file into/export
during build-time. If the file exists nothing is mounted, if it does not exist something is mounted.Any comment or implementation ;) is appreciated. Thanks, Bjoern