Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isle_islandora_installer.sh and rsync --delete: bad combination #285

Open
DiegoPino opened this issue Jul 21, 2019 · 0 comments
Open

isle_islandora_installer.sh and rsync --delete: bad combination #285

DiegoPino opened this issue Jul 21, 2019 · 0 comments

Comments

@DiegoPino
Copy link

Issue description

When using ISLE as a development deployment or even when trying to keep custom modules mounted separately from main Drupal deployment, using isle_islandora_installer.sh leads to some bad bad, disastrous times.

Disclaimer: i could been doing something wrong based on a miss-understanding of the documentation. Also, it is Sunday and there is some frustration, but no hard feelings.

This issue is something i never experienced before working with Docker, but i can imagine this being a not too uncommon scenario that kinda crashed my day.

1.- You want to use ISLE as your development environment
2.- You are working on a single new Module (what devs normal do) so you decide to make a bind mount of that module so you can develop locally and test live. That is a common practice.

   volumes:
      - isle-apache-data:/var/www/html
      - ./logs/apache/httpd:/var/log/apache2
      - ./logs/apache/fits:/var/log/fits
      -/Users/myself/Desktop/Development/islandora_matomo:/var/www/html/sites/all/modules/contrib/islandora_matomo

(yes.. its islandora matomo)

So you work, you develop, you are safe because you know isle-apache-data has its own volumen and normally updates happen via git pull on each module's folder...

You have to switch projects, clean drives, move on but plan to come back. You come back, you decide its time to document a from scratch deployment that includes of course your module and its dependencies.

You docker-compose up -d and run isle_islandora_installer.sh unware of what will happen there, you assume that ISLE deploys Islandora Modules and copies them over, in fact it does, but wait.. nooo.. it does not do that, it rsyncs the whole /var/www/html folder, with a --delete option!! Means it does not really update your Islandora modules, or deploys them fresh, it assumes you have nothing, nothing interesting other than islandora there, no custom needs, no nothing.
You see this...
echo "Copying Islandora Installation..."
And it lies.. it tells you its all about Islandora
rsync -r --delete --chown=islandora:www-data /tmp/drupal_install/ /var/www/html

echo "Installing all Islandora modules"
cd /var/www/html/sites/all/modules || exit

Well, what that did in a minute is to whipe out my mounted module too, since its a bind mount, deleting its original content completely from my local drive.

Now my question is: why? Why would i want to have my /var/www/html wiped out? Why not just rsync the modules that are going to be updated/installed. Why assume people could not have other files/folders/libraries/a whole life there??

Is ISLE meant for testing and developing too? And finally, a less frustrated question: what is the documented workflow for updating an ISLE Islandora deployment and keeping your custom development pieces intact?

For an issue, describe steps to reproduce the issue

Not OS/Hardware/Software related

Steps:

  1. Deploy ISLE - Install from scratch
  2. Mount a local folder inside /var/www/html/sites/all/modules to work on a custom module (see my yaml snippet)
  3. Destroy ISLE (you need the ports, you need disk space, you are doing 6 things at the same time)
  4. Come back to working on Islandora 7.x
  5. Deploy ISLE - Install from scratch, because you want to document a clean install, or check if your module deploys well from scratch. But you still have your local mount. You are actually watching your custom code..
  6. You see the code disappear from your editor, you see how your local mounted folder is empty, your work is gone.
  7. Cry.
  8. Open an issue.
What's the expected result?
  • That ISLE rsyncs only the things it knows of and wants to deploy. Never ever touch people's data. Never.
  • or that ISLE asks before overwriting if /var/www/html contains data...
  • or that ISLE aborts if there is something there it knows nothing of?
  • or that documentation says: we will wipe clean your /var/www/html, alert safe your data
What's the actual result?
  • It touches people's data, in fact, it wipes them out.

Additional details / screenshots

No screenshots, but i could post a picture of myself very disappointed trying to recover days of work using Time machine...except the last 5 hours where time machine failed.

Could maintainers please update documentation here https://github.com/Islandora-Collaboration-Group/ISLE and state that the installer script will clean/delete/ everything you have in /var/www/html? add a warning, some blinking css, something like that could help people like myself a lot. Thanks a lot. Future work would suggest that rsync --delete is a bad idea on a whole drupal folder. Since the deployer has a list of what it is going to deploy maybe just rsyncing each individual module or only newer things would be wonderful. Or even better. go into each folder and do a git pull, but on its destination not before copying. That is what git/version control is for. Please. Please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant