zun/devstack/override-defaults
Hongbin Lu 3438316954 Implement the sandbox proposal - Part 2
This commit extends the existing Docker driver to leverage Nova
to provision sandbox. In other words, there are two drivers:
1. docker.driver.DockerDriver (default)
2. docker.driver.NovaDockerDriver
Users can choose which driver they want to use. The major
difference is the second driver integrate with Neutron, Neutron
is used to provide networking for container.

The files under nova/* were copied from nova-docker with minor
modification (mainly for fixing bugs and removing unused codes).
In particular, nova/virt/docker/driver.py contains a DockerDriver
for Nova. It implements the Nova virt driver interface using docker.
This custom virt driver is used to create/delete/manage sandbox
containers.

At this commit, we hardcoded the flavor to m1.small and nics to
'auto' when creating sandbox instances. We might make them as
parameters and specified by end-users. The flavor will decide the
resource constraints of the container and nics will decide how the
networking of the container being configured. The docker image
kubernetes/pause is chosen to be the image of the sandbox container,
since its size is small and statisfies what we want (an empty
container that keeps running).

When creating the sandbox, we haven't specify the security group yet
so the default security group is used. Users need to open ports in
that security groups to access container from outside. Later, we
could create a custom security group for each container, and
automatically open ports that are exposed by the container.

For more details of the design, please refer:
https://review.openstack.org/#/c/365754/

Implements: blueprint neutron-integration
Depends-On: Ib8f193ea1edf1f148e9ba505205495170ebf6d67
Change-Id: I1543f386b6439d305b308d6c6ebe073225223c25
2016-11-21 20:48:36 -06:00

8 lines
134 B
Plaintext

# Plug-in overrides
ZUN_DRIVER=${ZUN_DRIVER:-docker}
if [[ ${ZUN_DRIVER} == "nova-docker" ]]; then
export VIRT_DRIVER=docker
fi