|
| 1 | +=================== |
| 2 | +Neutron Openvswitch |
| 3 | +=================== |
| 4 | + |
| 5 | +This Dockerfile creates a Docker image based on Fedora 23 that runs |
| 6 | +Openvswitch and the Neutron L2 agent for Openvswitch. This container |
| 7 | +image is used by Magnum when a Swarm cluster is deployed with the |
| 8 | +attribute:: |
| 9 | + |
| 10 | + --network-driver=kuryr |
| 11 | + |
| 12 | +Magnum deploys this container on each Swarm node along with the |
| 13 | +Kuryr container to support Docker advanced networking based on |
| 14 | +the `Container Networking Model |
| 15 | +<https://github.com/docker/libnetwork/blob/master/docs/design.md>`_. |
| 16 | + |
| 17 | +To build the image, run this command in the same directory as the |
| 18 | +Dockerfile:: |
| 19 | + |
| 20 | + docker build -t openstackmagnum/fedora23-neutron-ovs:testing . |
| 21 | + |
| 22 | +This image is available on Docker Hub as:: |
| 23 | + |
| 24 | + openstackmagnum/fedora23-neutron-ovs:testing |
| 25 | + |
| 26 | +To update the image with a new build:: |
| 27 | + |
| 28 | + docker push openstackmagnum/fedora23-neutron-ovs:testing |
| 29 | + |
| 30 | +The 'testing' tag may be replaced with 'latest' or other tag as |
| 31 | +needed. |
| 32 | + |
| 33 | +This image is intended to run on the Fedora Atomic public image which |
| 34 | +by default does not have these packages installed. The common |
| 35 | +practice for Atomic OS is to run new packages in containers rather |
| 36 | +than installing them in the OS. |
| 37 | + |
| 38 | +For the Neutron agent, you will need to provide 3 files at these |
| 39 | +locations: |
| 40 | + |
| 41 | +- /etc/neutron/neutron.conf |
| 42 | +- /etc/neutron/policy.json |
| 43 | +- /etc/neutron/plugins/ml2/ml2_conf.ini |
| 44 | + |
| 45 | +These files are typically installed in the same locations on the |
| 46 | +Neutron controller node. The policy.json file is copied into the |
| 47 | +Docker image because it is fairly static and does not require |
| 48 | +customization for the bay. If it is changed in the Neutron master |
| 49 | +repo, you just need to rebuild the Docker image to update the file. |
| 50 | +Magnum will create the other 2 files on each bay node in the |
| 51 | +directory /etc/kuryr and map them to the proper directories in |
| 52 | +the container using the Docker -v option. |
| 53 | + |
| 54 | +Since Openvswitch needs to operate on the host network name space, |
| 55 | +the Docker container will need the -net=host option. |
| 56 | +The /var/run/openvswitch directory is also mapped to the bay node |
| 57 | +so that the Kuryr container can talk to openvswitch. |
| 58 | +To run the image from Fedora Atomic:: |
| 59 | + |
| 60 | + docker run --net=host \ |
| 61 | + --cap-add=NET_ADMIN \ |
| 62 | + --privileged=true \ |
| 63 | + -v /var/run/openvswitch:/var/run/openvswitch \ |
| 64 | + -v /lib/modules:/lib/modules:ro \ |
| 65 | + -v /etc/kuryr/neutron.conf:/etc/neutron/neutron.conf \ |
| 66 | + -v /etc/kuryr/ml2_conf.ini:/etc/neutron/plugins/ml2/ml2_conf.ini \ |
| 67 | + --name openvswitch-agent \ |
| 68 | + openstackmagnum/fedora23-neutron-ovs:testing |
0 commit comments