[openstack-dev] [kolla] Build the docker images in a graceful way
rhallise at redhat.com
Wed Jun 29 13:03:09 UTC 2016
Can you write up a spec with the details? That way the community can see the full layout
of the proposal.
----- Original Message -----
From: "Jeffrey Zhang" <zhang.lei.fly at gmail.com>
To: "OpenStack Development Mailing List" <openstack-dev at lists.openstack.org>
Sent: Wednesday, June 29, 2016 8:50:28 AM
Subject: [openstack-dev] [kolla] Build the docker images in a graceful way
Recently, Ansible release 2.1 version with lots of new feature. One of the interesting feature
is the management for docker.
Redhat also announced the Ansible Container project, which can build docker images by using
Ansible Playbooks. No more write the ugly Dockerfile script. I think this will be more graceful.
Here the explanation that why not use Dockerfile from ansible-container readme file.
A Dockerfile is not much more than a script with hand-crafted shell commands. We're well past the
point where we should be managing build processes with manually maintained series of shell scripts.
That's why we wrote Ansible in the first place, and this is just as applicable to containers.
Ansible Container permits orchestration even during the build process, whereas docker build does
not. For example, in a Django project, your VCS may contain a bunch of sources for static assets
that need to be compiled and then collected. With Ansible Container, you can compile the static
assets in your Django container and then collect them into your static file serving container.
Many people use Docker for development environments only but then use Ansible playbooks to push
out to staging or production. This allows you to use the same playbooks and roles in your Docker
dev environment as in your production environments.
Ansible Container does all of this without installing SSH, leaving Ansible artifacts on your
built images, or having excess layers to the union filesystem.
I also pushed a PS to implement almost the same thing for Kolla. There many benefit for this.
1. more easy to understand. The original base/Dockerfile is too long, mixed with different base image logical
and different install type. Whereas in the new implement, it is more clearly. it is split into multi
2. easy to extend. We can reuse the role concept for the Ansible. For example, when you want to extend
the neutron-server container. You can write your own roles, like neutron-server-lbaas role, and just
add this to the neutron-server playbooks. In this way, we can implement the customize issue. ( this will
3. It is also possible to change the exist data. For example, i want to change the repo url to a internal
The user can provide a ansible variables file, which hold the new repo url and overwrite the
This PS is in POC stage. Post this mail to gather any advise and better ideas.
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
More information about the OpenStack-dev