Add neutron-openvswitch-agent contianer
Implements the neutron-openvswitch-agent plugin container. Co-Authored-By: Sam Yaple <sam@yaple.net> Partially Implements blueprint: openvswitch-container Change-Id: Ie0fa318541e16d730b7007d3620c7873e898ed4a
This commit is contained in:
parent
e8535fc361
commit
74010ff986
@ -0,0 +1,11 @@
|
|||||||
|
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base
|
||||||
|
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
RUN yum install -y openstack-neutron-openvswitch \
|
||||||
|
openvswitch \
|
||||||
|
&& yum clean all
|
||||||
|
|
||||||
|
COPY check.sh start.sh /
|
||||||
|
|
||||||
|
CMD ["/start.sh"]
|
1
docker/centos/binary/neutron/neutron-openvswitch-agent/build
Symbolic link
1
docker/centos/binary/neutron/neutron-openvswitch-agent/build
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../tools/build-docker-image
|
1
docker/centos/binary/neutron/neutron-openvswitch-agent/check.sh
Symbolic link
1
docker/centos/binary/neutron/neutron-openvswitch-agent/check.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../common/neutron/neutron-openvswitch-agent/check.sh
|
1
docker/centos/binary/neutron/neutron-openvswitch-agent/start.sh
Symbolic link
1
docker/centos/binary/neutron/neutron-openvswitch-agent/start.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../common/neutron/neutron-openvswitch-agent/start.sh
|
13
docker/common/neutron/neutron-openvswitch-agent/check.sh
Executable file
13
docker/common/neutron/neutron-openvswitch-agent/check.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
RES=0
|
||||||
|
|
||||||
|
check=$(/usr/bin/neutron agent-list | awk '/ vSwitch / {print $10}')
|
||||||
|
error="ERROR: Neutron OpenvSwitch agent is not alive."
|
||||||
|
|
||||||
|
if [[ $check != ":-)" ]]; then
|
||||||
|
echo $error >&2
|
||||||
|
RES=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $RES
|
45
docker/common/neutron/neutron-openvswitch-agent/start.sh
Executable file
45
docker/common/neutron/neutron-openvswitch-agent/start.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /opt/kolla/config-neutron.sh
|
||||||
|
. /opt/kolla/config-sudoers.sh
|
||||||
|
|
||||||
|
: ${NEUTRON_FLAT_NETWORK_NAME:=physnet1}
|
||||||
|
: ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1}
|
||||||
|
|
||||||
|
check_required_vars PUBLIC_IP NEUTRON_FLAT_NETWORK_NAME \
|
||||||
|
NEUTRON_FLAT_NETWORK_INTERFACE
|
||||||
|
|
||||||
|
if ! ovs-vsctl show |grep ${NEUTRON_FLAT_NETWORK_INTERFACE} > /dev/null; then
|
||||||
|
ovs-vsctl add-br ${NEUTRON_FLAT_NETWORK_INTERFACE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
cfg=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
|
||||||
|
|
||||||
|
# Configure ml2_conf.ini
|
||||||
|
if [[ ${TYPE_DRIVERS} =~ vxlan ]]; then
|
||||||
|
crudini --set $cfg \
|
||||||
|
vxlan \
|
||||||
|
local_ip \
|
||||||
|
"${PUBLIC_IP}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
crudini --set $cfg \
|
||||||
|
ovs \
|
||||||
|
bridge_mappings \
|
||||||
|
"${NEUTRON_FLAT_NETWORK_NAME}:${NEUTRON_FLAT_NETWORK_INTERFACE}"
|
||||||
|
|
||||||
|
crudini --set $cfg \
|
||||||
|
ovs \
|
||||||
|
tenant_network_type \
|
||||||
|
"${TENANT_NETWORK_TYPES}"
|
||||||
|
|
||||||
|
if [[ ${TENANT_NETWORK_TYPES} =~ "vlan" ]];then
|
||||||
|
crudini --set $cfg \
|
||||||
|
ovs \
|
||||||
|
network_vlan_ranges \
|
||||||
|
"${NEUTRON_VLAN_NETWORK_NAME}:${NEUTRON_NETWORK_VLAN_RANGES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /usr/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file $cfg
|
@ -102,6 +102,8 @@ all containers. This allows a simple method of ensuring every type of node
|
|||||||
NEUTRON_SERVER_SERVICE_HOST=<$HOST_IP> - The IP address/hostname used to commuicate with the Neutron API
|
NEUTRON_SERVER_SERVICE_HOST=<$HOST_IP> - The IP address/hostname used to commuicate with the Neutron API
|
||||||
NEUTRON_SHARED_SECRET=<sharedsecret> - The shared secret used between Neutron/Nova to secure metadata communication
|
NEUTRON_SHARED_SECRET=<sharedsecret> - The shared secret used between Neutron/Nova to secure metadata communication
|
||||||
NEUTRON_API_PASTE_CONFIG=</usr/share/neutron/api-paste.ini> - Location of Neutron's API paste config file
|
NEUTRON_API_PASTE_CONFIG=</usr/share/neutron/api-paste.ini> - Location of Neutron's API paste config file
|
||||||
|
NEUTRON_VLAN_NETWORK_NAME=<physnet1> - List of physical_network names with which vlan networks can be created
|
||||||
|
NEUTRON_NETWORK_VLAN_RANGES=<1:1> - Colon seperated range of addresses
|
||||||
TYPE_DRIVERS=<flat,vxlan> - List of network type driver entrypoints to be loaded
|
TYPE_DRIVERS=<flat,vxlan> - List of network type driver entrypoints to be loaded
|
||||||
TENANT_NETWORK_TYPES=<flat,vxlan> - List of network_types to allocate as tenant networks
|
TENANT_NETWORK_TYPES=<flat,vxlan> - List of network_types to allocate as tenant networks
|
||||||
MECHANISM_DRIVERS=<linuxbridge,l2population> - List of networking mechanism driver entrypoints to be loaded
|
MECHANISM_DRIVERS=<linuxbridge,l2population> - List of networking mechanism driver entrypoints to be loaded
|
||||||
|
Loading…
x
Reference in New Issue
Block a user