Comments (7)
@br2490 I'm confused by this statement
"Having data on volume may make it easier to get at those DB files"
Within the Docker-compose service entry for mysql, exist these volumes:
volumes:
- ./mysql/initscripts:/docker-entrypoint-initdb.d
(this is how one can add a database using a sql file, there is an example)
- ./customize/mysql/my.cnf:/etc/alternatives/my.cnf
(mysql cnf file peristed for changes)
- ./data/mysql:/var/lib/mysql
(databases live and persist here)
- ./data/mysql/log:/var/log/mysql
(logs logs logs)
What is missing exactly? I believe these volumes are doing what you've explained above? Right?
Or are you suggesting simply streamlining down to one volume?
from isle.
@g7morris, sorryI was not clear! docker volume
is what I'm describing as per https://docs.docker.com/engine/admin/volumes/volumes/. This is a fslayer that lets dockerd handle persisted data
from isle.
@br2490 Except I'm still not following.
How is the "volume" reference in the current Docker Compose file not a docker
volume?
Could you elaborate on what is missing from the current method please?
from isle.
@g7morris: in a nutshell I think docker volumes are filesystems managed by docker and relatively 'independent' from the host. Docker handling the FS means docker controls the data and can do important stuff with it (e.g., migration). The bind/mount is dependent on the host system having files at a certain location on start - docker doesn't know about it, and will create an empty folder if it doesn't find something there.
An example can be found in #67: in that docker-compose you will see a section for docker-managed volumes and calls for a default isle-mysql
volume for data. docker volume
and mount points are slightly different. I think that article covers volumes versus binds/mounts well and volume advantages. Just a thought!
from isle.
@br2490 Okay! I think I get it now. Thanks for being patient and explaining on this one.
There isn't any apparent distinction in the documentation thus my confusion on what was happening. Perhaps they could use more code eh?
This helped.
https://stackoverflow.com/questions/34357252/docker-data-volume-vs-mounted-host-directory
Specifically several quotes:
Quote 1:
The host directory is, by its nature, host-dependent. For this reason, you can’t mount a host directory from Dockerfile because built images should be portable. A host directory wouldn’t be available on all potential hosts.
Quote 2:
Here we’ve launched a new container and mounted the volume from the dbdata container.
We’ve then mounted a local host directory as /backup. Finally, we’ve passed a command that uses tar to backup the contents of the dbdata volume to a backup.tar file inside our /backup directory. When the command completes and the container stops we’ll be left with a backup of our dbdata volume.
Okay with that bold part it finally clicked. Yes, agreed now that I'm on the same page. We'll need to revisit this entirely.
It might actually make things easier as permissions on Docker hosts vs containers is a tricky thing already. I'd like to avoid it all together.
I think more reading is in my future clearly however as I'm not clear on how to set permissions within this new structure.
from isle.
@br2490 Echoing from the Slack post:
New Example Volume structure:
version: '2'
services:
mysql:
image: islandoracollabgroup/isle-mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=islemysqlrootpw2017
- MYSQL_DATABASE=fedora3
- MYSQL_USER=fedora_admin
- MYSQL_PASSWORD=dockerfeddb2017
ports:
- "3306:3306"
volumes:
- mycnf:/etc/alternatives/my.cnf
- mysql_data:/var/lib/mysql
- mysql_logs:/var/log/mysql
container_name: isle-mysql
fedora:
image: islandoracollabgroup/isle-fedora:latest
ports:
- "8080:8080"
- "8777:80"
tty: true
depends_on:
- mysql
volumes:
- fed_tc_conf:/usr/local/tomcat/conf
- fed_tc_logs:/usr/local/tomcat/logs
- fed_data:/usr/local/fedora/data
- fed_conf:/usr/local/fedora/server/config
- fed_logs:/usr/local/fedora/server/logs
- fed_dja_conf:/usr/local/tomcat/webapps/adore-djatoka/index.html
- fed_apache_conf:/etc/apache2/sites-available
- fed_apache_logs:/var/log/apache2
container_name: isle-fedora
solr:
image: islandoracollabgroup/isle-solr:latest
ports:
- "8091:8080"
- "8983:8983"
tty: true
volumes:
- sol_tc_conf::/usr/local/tomcat/conf
- sol_tc_logs:/usr/local/tomcat/logs
- sol_data/usr/local/solr/collection1
container_name: isle-solr
apache:
build: ./apache
image: islandoracollabgroup/isle-apache:latest
ports:
- "80:80"
tty: true
depends_on:
- mysql
- fedora
volumes:
- apache_conf:/etc/apache2/sites-available/site.conf
- apache_data:/var/www/html
- apache_logs/apache:/var/log/apache2
- php_conf:/etc/php5/apache2/php.ini
container_name: isle-apache
This is what it “feels” like we should be moving to. Granted I’ll need to test and work out if this is feasible. Also will need to update each respective Dockerfile to add / remove each structure. This would be most likely the death knell of the customization folder (as intended? and which we’ll handle with proper documentation for copying of files to the data volume e.g. install_site.sh)
Your thoughts?
from isle.
Voting to close this issue as it is now 'legacy'.
Volumes and mounts are understood and we will implement them to persist data when and where possible (and logical!).
from isle.
Related Issues (20)
- Staging install instructions: clarify or improve "commit locally to git" HOT 2
- Documentation: How to build a Multisite in ISLE HOT 3
- Drush crashes due to IMI use of Composer in install-local-migrate process at Step 10 HOT 5
- Development needed for Cantaloupe upgrade from 4.0.3 to 4.1.5 HOT 2
- Restore production `/var/www/html/sites/default/files` in `install-local-migrate.md` HOT 1
- Run standalone fedora image with AWS RDS configuration.
- Documentation: small fixes to install-environments.md HOT 1
- Documentation: update the final terminal output of install_solution_packs.sh HOT 1
- Error Message needs attention HOT 1
- Insufficient TemporaryStore disk space halting FEDORA HOT 4
- WARC tools missing from ISLE-apache Dockerfile HOT 4
- No documentation about configuring to send mail HOT 13
- Documentation update: docs/update/update.md needs "master" changed to "main" HOT 3
- Traefik should get an upgrade to 2.0
- Removing forced permissions check on ISLE apache image every time container restarts HOT 1
- Migration instructions have an odd step. HOT 5
- cache.server.source.ttl_seconds set twice in cantaloupe.properties HOT 1
- Tailing fedoragsearch logs: path needs correction HOT 4
- Staging Migration: Software Dependencies for both Ubuntu and CentOS are missing two steps HOT 1
- Should there be a warning that the docs are for ISLE7 / Islandora 7 and not for ISLE2 / Islandora 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isle.