diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-13 14:26:55 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-18 20:52:27 -0700 |
| commit | bd5e5bbb64b20eb4c77c2a941973845d847e9d78 (patch) | |
| tree | 7099996ec8aec66ce16d78f97e79c8ca76df5b44 /docker_templates | |
| parent | ac61653343536017b20182e75bc66228bc4da79f (diff) | |
| download | kolla-bd5e5bbb64b20eb4c77c2a941973845d847e9d78.tar.gz kolla-bd5e5bbb64b20eb4c77c2a941973845d847e9d78.zip | |
Use one data container for all data volumes
The previous method of using the API image for a data container
worked, but resulted in more data being bindmounted and copied
into the system. This patch resolves that by essentially using
a distro-type as a FROM in a Dockerfile to generate
distro-type-data. Further all of the data containers used
throughout ansible are modified to use this new data container.
Change-Id: I8846573d4f2d4b98d4f46c770bfefc6d4c5cd0b5
Partially-Implements: blueprint one-data-container
Diffstat (limited to 'docker_templates')
| -rw-r--r-- | docker_templates/data/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker_templates/galera/Dockerfile.j2 | 6 | ||||
| -rw-r--r-- | docker_templates/rabbitmq/Dockerfile.j2 | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/docker_templates/data/Dockerfile.j2 b/docker_templates/data/Dockerfile.j2 new file mode 100644 index 000000000..18933ef55 --- /dev/null +++ b/docker_templates/data/Dockerfile.j2 @@ -0,0 +1,4 @@ +FROM {{ base_distro }}:{{ base_distro_tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +CMD /bin/sleep infinity diff --git a/docker_templates/galera/Dockerfile.j2 b/docker_templates/galera/Dockerfile.j2 index 90975ddab..2d656053a 100644 --- a/docker_templates/galera/Dockerfile.j2 +++ b/docker_templates/galera/Dockerfile.j2 @@ -21,12 +21,16 @@ RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat percona-xtrabackup \ pv \ tar \ - expect + expect \ + && rm -rf /var/lib/mysql/* {% elif base_distro in ['ubuntu', 'debian'] %} RUN ["/bin/false"] +# TODO(sdake) when ubuntu support is implemented we will need a line +# && rm -rf /var/lib/mysql/ + {% endif %} COPY config-galera.sh /opt/kolla/config/ diff --git a/docker_templates/rabbitmq/Dockerfile.j2 b/docker_templates/rabbitmq/Dockerfile.j2 index 63dc1ff3c..119a30317 100644 --- a/docker_templates/rabbitmq/Dockerfile.j2 +++ b/docker_templates/rabbitmq/Dockerfile.j2 @@ -6,14 +6,16 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ hostname \ rabbitmq-server \ - && yum clean all + && yum clean all \ + && rm -rf /var/lib/rabbitmq/* {% elif base_distro in ['ubuntu', 'debian'] %} RUN apt-get install -y --no-install-recommends \ hostname \ rabbitmq-server \ - && apt-get clean + && apt-get clean \ + && rm -rf /var/lib/rabbitmq/* {% endif %} |
