OBOFoundry / purl.obolibrary.org

A system for managing OBO PURLs
BSD 3-Clause "New" or "Revised" License
75 stars 128 forks source link

consider changing purl infrastructure to use Docker #415

Closed cmungall closed 6 years ago

cmungall commented 6 years ago

I would like to help and to direct others to help with tickets like: #414

However the barrier for entry seems high here, I need to install 3 toolchains I'm not familiar with, and I'm not sure they will even work on a Mac: https://github.com/OBOFoundry/purl.obolibrary.org/blob/master/README.md

Any reason not to use Docker? Either directly, or to run ansible from within Docker (my choice would be to simplify to just do it directly from Docker, e.g. using httpd:alpine image)

cc @jamesaoverton @kltm @dougl1sqrd

jamesaoverton commented 6 years ago

I went to a lot amount of effort to ensure that the system could be developed and tested cross-platform and document how to do it: https://github.com/OBOFoundry/purl.obolibrary.org#development-and-testing. The docs say exactly how to set it up on a Mac.

At the time, Docker was not a cross-platform option. These days Docker on Windows and Mac just starts a Linux VM and runs inside it.

It would now be straightforward to use Docker just like the Vagrantfile or .travis.yml: start a Debian image, attach the directory, pip install ansible inside and run it.

I still haven't forgiven Docker for wasting a month of my time a couple of years ago. If somebody else wants to do this, go for it.

cmungall commented 6 years ago

hah, I had exactly the same experience as you with vagrant when I tried before. I followed your instructions and it all worked perfectly, thanks.

btw Docker is much easier now especially on a mac. But no real need for this ticket now other than my drive for uniformity...

jamesaoverton commented 5 years ago

I'm working with @lmcmicu on refactoring the PURL code, as part of the OBO Technical Services grant. We'll make a PR soon. While working on that today, I tried to make everything work with Docker instead of Vagrant:

$ docker run -it -v $(pwd):/var/www/purl.obolibrary.org ubuntu:latest /bin/bash
# apt-get update
# apt-get install -y ansible
# cd /var/www/purl.obolibrary.org
# echo 'localhost' > hosts
# ansible-playbook -i hosts --connection=local tools/site.yml
# make all test

It involved more manual tweaking that we should be able to fix, but I gave up when all the tests against Apache2 failed. There are probably some Docker networking tricks that would fix it, but I don't have the energy right now.