Create one data container and use across Ansible

Registered by Steven Dake

Remove the slew of data container images we have and instead create just one data container without a VOLUME operation (essentially just CMD /bin/sleep infinity). Further use that data container throughout the ansible scripts but with a unique name so it can be backed up.

The reason for not using API container is it includes the service, which we don't necessarily want to backup. The reason for using one container is to not cause image bloat in the docker service.

Idea proposed here:
https://review.openstack.org/#/c/210417/

Blueprint information

Status:
Complete
Approver:
Steven Dake
Priority:
Medium
Drafter:
Steven Dake
Direction:
Approved
Assignee:
Steven Dake
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon liberty-3
Started by
Steven Dake
Completed by
Steven Dake

Related branches

Sprints

Whiteboard

Question here. Isn't there a difference in specifying volumes with '-v' as a command and using VOLUME in the Dockerfile? I thought they were different as specified by the Docker docs https://docs.docker.com/reference/builder/ for VOLUME. When using VOLUME inside the Dockerfile it is considered a 'mount point', which I believe is like a symlink. Using '-v' outside the container would be bind mounting the volume.

If that's true, then that can play a factor in how we should deploy our data containers since it might not be best to just bind mount everything. --rhallisey

This seemed like mostly Sam's idea and I agree it soudns great. Agree if there is some technical difference it may have a bearing on our decision. The documentation is unclear.

The relevant question is what is the difference between VOLUME ['/var/lib/mysql'] and -v /var/lib/mysql:/var/lib/mysql as it relates to the below requirements:
1. have each running container storage be able to be backed up
2. Not bring in a bunch of extra cruft for the data container as we do now by mounting api.
3. Not have data containers all over the system with different images if there is no good reason to do so

--sdake

Data container IRC discussion:
http://eavesdrop.openstack.org/irclogs/%23kolla/%23kolla.2015-08-13.log.html#t2015-08-13T14:56:35

 --sdake

Key point from the log:
<rhallisey> <agoldste> rhallisey: the dockerfile instruction is the same as running -v /some/path but it's not a bind mount. it just instructs docker not to record diffs to that path when generating layers

https://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes --sdake

Gerrit topic: https://review.openstack.org/#q,topic:bp/one-data-container,n,z

Addressed by: https://review.openstack.org/212804
    WIP - Use one data container distro-type-data for all data containers

Addressed by: https://review.openstack.org/212830
    Remove data containers and adjust compose files

Addressed by: https://review.openstack.org/212457
    Remove bootstrap.yml abstraction for rabbitmq

Addressed by: https://review.openstack.org/213374
    Register neutron as the network service

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.