Created
July 7, 2015 11:14
-
-
Save diasjorge/5b4227a4ed7734324c3a to your computer and use it in GitHub Desktop.
Creating data ready containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to generate the datasets the workflow would be like following: | |
The data is loaded into the mysql|riak|redis container and then changes to the data are made. | |
For bootstrapping we could load the data we have from our current dumps/backups. | |
We must ensure that the data directories for the services are mounted as volumes. | |
After we've made the changes to the data we want to export this. For this we'll do. | |
First we stop the services containers. | |
We create a container that mounts the volumes with data from each service and also a volume that is mapped to a specific path on disk on the host (e.g /backup). | |
Inside this container we'll copy the data folders to the backup path (/backup/mysql, /backup/riak, etc) | |
After we've exported our data, we want to create a new image that has that data. To do so, we will: | |
Create another container that mounts this /backup path as a volume. | |
Inside this container we'll copy those files to the locations expected by each service (e.g /var/lib/mysql) | |
We stop this container and commit it with the image name (e.g standard-dataset) | |
We tag it and push this new image to the registry. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment