Merge "Remove config-internal for neutron"

This commit is contained in:
Jenkins 2015-08-09 17:13:18 +00:00 committed by Gerrit Code Review
commit bb03d5f6bf
57 changed files with 72 additions and 875 deletions

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-dhcp-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-dhcp-agent/config-internal.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-l3-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-l3-agent/config-internal.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-metadata-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-metadata-agent/config-internal.sh

View File

@ -1,46 +0,0 @@
[unix_http_server]
file = /var/run/supervisor.sock
[inet_http_server]
port = 127.0.0.1:9001
[supervisord]
nodaemon=true
logfile = /var/log/supervisor/supervisord.log
logfile_maxbytes = 200KB
logfile_backups = 1
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock
[program:neutron-dhcp-agent]
command=/opt/kolla/neutron-dhcp-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-metadata-agent]
command=/opt/kolla/neutron-metadata-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-l3-agent]
command=/opt/kolla/neutron-l3-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-agents/supervisord.conf

View File

@ -7,4 +7,4 @@ RUN yum -y install openstack-neutron \
openvswitch \
&& yum clean all
COPY config-neutron.sh config-sudoers.sh /opt/kolla/
COPY config-sudoers.sh /opt/kolla/

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-base/config-neutron.sh

View File

@ -7,6 +7,6 @@ RUN yum install -y ebtables openstack-neutron-linuxbridge && \
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-linuxbridge-agent/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-linuxbridge-agent/config-internal.sh

View File

@ -6,8 +6,7 @@ RUN yum install -y openstack-neutron-openvswitch \
openvswitch \
&& yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-openvswitch-agent/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-openvswitch-agent/config-internal.sh

View File

@ -5,7 +5,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum install -y which && \
yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-server/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-server/config-internal.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-dhcp-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-dhcp-agent/config-internal.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-l3-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-l3-agent/config-internal.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-metadata-agent/check.sh

View File

@ -1 +0,0 @@
../../../../../common/neutron/neutron-metadata-agent/config-internal.sh

View File

@ -1,46 +0,0 @@
[unix_http_server]
file = /var/run/supervisor.sock
[inet_http_server]
port = 127.0.0.1:9001
[supervisord]
nodaemon=true
logfile = /var/log/supervisor/supervisord.log
logfile_maxbytes = 200KB
logfile_backups = 1
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock
[program:neutron-dhcp-agent]
command=/opt/kolla/neutron-dhcp-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-metadata-agent]
command=/opt/kolla/neutron-metadata-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-l3-agent]
command=/opt/kolla/neutron-l3-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-agents/supervisord.conf

View File

@ -16,4 +16,4 @@ RUN cd /neutron \
&& chown -R neutron: /etc/neutron /var/log/neutron \
&& rm -rf /root/.cache
COPY config-neutron.sh config-sudoers.sh /opt/kolla/
COPY config-sudoers.sh /opt/kolla/

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-base/config-neutron.sh

View File

@ -4,8 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Install required packages
RUN yum install -y ebtables && yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-linuxbridge-agent/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-linuxbridge-agent/config-internal.sh

View File

@ -7,8 +7,7 @@ RUN yum install -y \
openvswitch \
&& yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-openvswitch-agent/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-openvswitch-agent/config-internal.sh

View File

@ -5,7 +5,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum install -y which && \
yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-server/check.sh

View File

@ -1 +0,0 @@
../../../../common/neutron/neutron-server/config-internal.sh

View File

@ -0,0 +1,46 @@
[unix_http_server]
file = /var/run/supervisor.sock
[inet_http_server]
port = 127.0.0.1:9001
[supervisord]
nodaemon=true
logfile = /var/log/supervisor/supervisord.log
logfile_maxbytes = 200KB
logfile_backups = 1
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock
[program:neutron-dhcp-agent]
command=/opt/kolla/neutron-dhcp-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-metadata-agent]
command=/opt/kolla/neutron-metadata-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-l3-agent]
command=/opt/kolla/neutron-l3-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler

View File

@ -1,186 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/kolla-common.sh
check_required_vars KEYSTONE_PUBLIC_SERVICE_HOST \
NEUTRON_API_PASTE_CONFIG \
NEUTRON_KEYSTONE_PASSWORD \
RABBITMQ_SERVICE_HOST
core_cfg=/etc/neutron/neutron.conf
ml2_cfg=/etc/neutron/plugins/ml2/ml2_conf.ini
# Logging
crudini --set $core_cfg \
DEFAULT \
log_dir \
"${NEUTRON_LOG_DIR}"
crudini --set $core_cfg \
DEFAULT \
verbose \
"${VERBOSE_LOGGING}"
crudini --set $core_cfg \
DEFAULT \
debug \
"${DEBUG_LOGGING}"
# Paste config
crudini --set $core_cfg \
DEFAULT \
api_paste_config \
"${NEUTRON_API_PASTE_CONFIG}"
# Rabbit
crudini --set $core_cfg \
DEFAULT \
rabbit_host \
"${RABBIT_HOST}"
crudini --set $core_cfg \
DEFAULT \
rabbit_userid \
"${RABBIT_USER}"
crudini --set $core_cfg \
DEFAULT \
rabbit_password \
"${RABBIT_PASSWORD}"
# Locking
crudini --set $core_cfg \
DEFAULT \
lock_path \
"/var/lock/neutron"
# Keystone
crudini --set $core_cfg \
DEFAULT \
auth_strategy \
"keystone"
crudini --set $core_cfg \
keystone_authtoken \
auth_uri \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0"
crudini --set $core_cfg \
keystone_authtoken \
identity_uri \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}"
crudini --set $core_cfg \
keystone_authtoken \
admin_tenant_name \
"${ADMIN_TENANT_NAME}"
crudini --set $core_cfg \
keystone_authtoken \
admin_user \
"${NEUTRON_KEYSTONE_USER}"
crudini --set $core_cfg \
keystone_authtoken \
admin_password \
"${NEUTRON_KEYSTONE_PASSWORD}"
# Rootwrap
crudini --set $core_cfg \
agent \
root_helper \
"sudo neutron-rootwrap /etc/neutron/rootwrap.conf"
# neutron.conf ml2 configuration
crudini --set $core_cfg \
DEFAULT \
core_plugin \
"neutron.plugins.ml2.plugin.Ml2Plugin"
crudini --set $core_cfg \
DEFAULT \
service_plugins \
"neutron.services.l3_router.l3_router_plugin.L3RouterPlugin"
crudini --set $core_cfg \
DEFAULT \
allow_overlapping_ips \
"True"
# Configure ml2_conf.ini
crudini --set $ml2_cfg \
ml2 \
type_drivers \
"${TYPE_DRIVERS}"
crudini --set $ml2_cfg \
ml2 \
tenant_network_types \
"${TENANT_NETWORK_TYPES}"
crudini --set $ml2_cfg \
ml2 \
mechanism_drivers \
"${MECHANISM_DRIVERS}"
if [[ ${TYPE_DRIVERS} =~ .*flat.* ]]; then
crudini --set $ml2_cfg \
ml2_type_flat \
flat_networks \
${NEUTRON_FLAT_NETWORK_NAME}
fi
if [[ ${TYPE_DRIVERS} =~ .*vxlan.* ]]; then
crudini --set $ml2_cfg \
ml2_type_vxlan \
vxlan_group \
""
crudini --set $ml2_cfg \
ml2_type_vxlan \
vni_ranges \
"1:1000"
crudini --set $ml2_cfg \
vxlan \
enable_vxlan \
"True"
crudini --set $ml2_cfg \
vxlan \
vxlan_group \
""
crudini --set $ml2_cfg \
vxlan \
l2_population \
"True"
crudini --set $ml2_cfg \
agent \
tunnel_types \
"vxlan"
crudini --set $ml2_cfg \
agent \
vxlan_udp_port \
"4789"
crudini --set $core_cfg \
DEFAULT \
network_device_mtu \
"1450"
fi
crudini --set $ml2_cfg \
l2pop \
agent_boot_time \
"180"
crudini --set $ml2_cfg \
securitygroup \
enable_security_group \
"True"
crudini --set $ml2_cfg \
securitygroup \
enable_ipset \
"True"
if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then
firewall_driver="neutron.agent.linux.iptables_firewall.IptablesFirewallDriver"
elif [[ ${MECHANISM_DRIVERS} == "openvswitch" ]]; then
firewall_driver="neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver"
fi
crudini --set $ml2_cfg \
securitygroup \
firewall_driver \
"$firewall_driver"
cat > /openrc <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0"
export OS_USERNAME="${NEUTRON_KEYSTONE_USER}"
export OS_PASSWORD="${NEUTRON_KEYSTONE_PASSWORD}"
export OS_TENANT_NAME="${ADMIN_TENANT_NAME}"
EOF

View File

@ -1,13 +0,0 @@
#!/bin/bash
RES=0
check=$(/usr/bin/neutron agent-list | awk '/ DHCP / {print $9}')
error="ERROR: Neutron DHCP Agent is not alive."
if [[ $check != ":-)" ]]; then
echo $error >&2
RES=1
fi
exit $RES

View File

@ -1,92 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
mkdir -p $(dirname $DNSMASQ_CONFIG_FILE)
check_required_vars DEBUG_LOGGING \
DELETE_NAMESPACES \
DHCP_DRIVER \
DNSMASQ_CONFIG_FILE \
MECHANISM_DRIVERS \
NEUTRON_LOG_DIR \
USE_NAMESPACES \
VERBOSE_LOGGING
cfg=/etc/neutron/dhcp_agent.ini
neutron_conf=/etc/neutron/neutron.conf
# Workaround bug in dhclient in cirros images which does not correctly
# handle setting checksums of packets when using hardware with checksum
# offloading. See:
# https://www.rdoproject.org/forum/discussion/567/packstack-allinone-grizzly-cirros-image-cannot-get-a-dhcp-address-when-a-centos-image-can/p1
/usr/sbin/iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
-j CHECKSUM --checksum-fill
if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then
interface_driver="neutron.agent.linux.interface.BridgeInterfaceDriver"
elif [[ ${MECHANISM_DRIVERS} == "openvswitch" ]]; then
interface_driver="neutron.agent.linux.interface.OVSInterfaceDriver"
fi
# Logging
crudini --set $neutron_conf \
DEFAULT \
log_file \
"${NEUTRON_DHCP_AGENT_LOG_FILE}"
# Configure dhcp_agent.ini
crudini --set $cfg \
DEFAULT \
verbose \
"${VERBOSE_LOGGING}"
crudini --set $cfg \
DEFAULT \
debug \
"${DEBUG_LOGGING}"
crudini --set $cfg \
DEFAULT \
interface_driver \
"$interface_driver"
crudini --set $cfg \
DEFAULT \
dhcp_driver \
"${DHCP_DRIVER}"
crudini --set $cfg \
DEFAULT \
use_namespaces \
"${USE_NAMESPACES}"
crudini --set $cfg \
DEFAULT \
delete_namespaces \
"${DELETE_NAMESPACES}"
crudini --set $cfg \
DEFAULT \
dnsmasq_config_file \
"${DNSMASQ_CONFIG_FILE}"
crudini --set $cfg \
DEFAULT \
root_helper \
"${ROOT_HELPER}"
cat > ${DNSMASQ_CONFIG_FILE} <<EOF
dhcp-option-force=26,1450
log-facility=${NEUTRON_LOG_DIR}/neutron-dnsmasq.log
EOF
# TODO: SamYaple remove this section for thin neutron containers
# The reason we remove existing namespaces is because network namespaces don't
# persist between container restarts because the network proc mountpoint dies
# when the container mount namespace dies. The mountpoint in /run/netns does
# persist however, and that is all we are cleaning up here.
# Remove any existing qdhcp namespaces
ip netns list | grep qdhcp | while read -r line ; do
ip netns delete $line
done
# Start DHCP Agent
exec /usr/bin/neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron

View File

@ -35,7 +35,7 @@ set_configs() {
esac
}
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +0,0 @@
#!/bin/bash
RES=0
check=$(/usr/bin/neutron agent-list | awk '/ L3 / {print $9}')
error="ERROR: Neutron L3 Agent is not alive."
if [[ $check != ":-)" ]]; then
echo $error >&2
RES=1
fi
exit $RES

View File

@ -1,90 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
check_required_vars DEBUG_LOGGING \
VERBOSE_LOGGING
cfg=/etc/neutron/l3_agent.ini
neutron_conf=/etc/neutron/neutron.conf
# Logging
crudini --set $neutron_conf \
DEFAULT \
log_file \
"${NEUTRON_L3_AGENT_LOG_FILE}"
# Configure l3_agent.ini
crudini --set $cfg \
DEFAULT \
verbose \
"${VERBOSE_LOGGING}"
crudini --set $cfg \
DEFAULT \
debug \
"${DEBUG_LOGGING}"
if [[ "${MECHANISM_DRIVERS}" =~ linuxbridge ]] ; then
crudini --set $cfg \
DEFAULT \
interface_driver \
"neutron.agent.linux.interface.BridgeInterfaceDriver"
crudini --set $cfg \
DEFAULT \
gateway_external_network_id \
""
crudini --set $cfg \
DEFAULT \
external_network_bridge \
""
elif [[ "${MECHANISM_DRIVERS}" =~ .*openvswitch* ]] ; then
crudini --set $cfg \
DEFAULT \
interface_driver \
"neutron.agent.linux.interface.OVSInterfaceDriver"
crudini --set $cfg \
DEFAULT \
gateway_external_network_id \
"${NEUTRON_FLAT_NETWORK_BRIDGE}"
crudini --set $cfg \
DEFAULT \
external_network_bridge \
"${NEUTRON_FLAT_NETWORK_BRIDGE}"
fi
crudini --set $cfg \
DEFAULT \
use_namespaces \
"${USE_NAMESPACES}"
if [ "${USE_NAMESPACES}" == "false" ] ; then
source /openrc
# Create router if it does not exist
/usr/bin/neutron router-list | grep admin-router || /usr/bin/neutron router-create admin-router
# Set router-id
crudini --set $cfg \
DEFAULT \
router_id \
"$(/usr/bin/neutron router-list | awk '/ admin-router / {print $2}')"
elif [ "${USE_NAMESPACES}" == "true" ] ; then
crudini --set $cfg \
DEFAULT \
router_delete_namespaces \
"true"
fi
# TODO: SamYaple remove this section for thin neutron containers
# The reason we remove existing namespaces is because network namespaces don't
# persist between container restarts because the network proc mountpoint dies
# when the container mount namespace dies. The mountpoint in /run/netns does
# persist however, and that is all we are cleaning up here.
# Remove any existing qrouter namespaces
ip netns list | grep qrouter | while read -r line ; do
ip netns delete $line
done
# Start L3 Agent
exec /usr/bin/neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini --config-dir /etc/neutron

View File

@ -35,7 +35,7 @@ set_configs() {
esac
}
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +0,0 @@
#!/bin/bash
RES=0
check=$(/usr/bin/neutron agent-list | awk '/ Linux / {print $10}')
error="ERROR: Neutron Linux Bridge agent is not alive."
if [[ $check != ":-)" ]]; then
echo $error >&2
RES=1
fi
exit $RES

View File

@ -1,26 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
check_required_vars NEUTRON_FLAT_NETWORK_INTERFACE \
NEUTRON_FLAT_NETWORK_NAME \
PUBLIC_IP
cfg=/etc/neutron/plugins/ml2/ml2_conf.ini
# Configure ml2_conf.ini
if [[ ${TYPE_DRIVERS} =~ vxlan ]]; then
crudini --set $cfg \
vxlan \
local_ip \
"${PUBLIC_IP}"
fi
crudini --set $cfg \
linux_bridge \
physical_interface_mappings \
"${NEUTRON_FLAT_NETWORK_NAME}:${NEUTRON_FLAT_NETWORK_INTERFACE}"
exec /usr/bin/neutron-linuxbridge-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neutron

View File

@ -8,7 +8,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +0,0 @@
#!/bin/bash
RES=0
check=$(/usr/bin/neutron agent-list | awk '/ Metadata / {print $9}')
error="ERROR: Neutron Metadata Agent is not alive."
if [[ $check != ":-)" ]]; then
echo $error >&2
RES=1
fi
exit $RES

View File

@ -1,74 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
check_required_vars ADMIN_TENANT_NAME \
DEBUG_LOGGING \
KEYSTONE_AUTH_PROTOCOL \
KEYSTONE_PUBLIC_SERVICE_HOST \
NEUTRON_KEYSTONE_PASSWORD \
NEUTRON_KEYSTONE_USER \
NEUTRON_SHARED_SECRET \
NOVA_METADATA_API_SERVICE_HOST \
NOVA_METADATA_API_SERVICE_PORT \
VERBOSE_LOGGING
cfg=/etc/neutron/metadata_agent.ini
neutron_conf=/etc/neutron/neutron.conf
# Logging
crudini --set $neutron_conf \
DEFAULT \
log_file \
"${NEUTRON_METADATA_AGENT_LOG_FILE}"
# Configure metadata_agent.ini
crudini --set $cfg \
DEFAULT \
verbose \
"${VERBOSE_LOGGING}"
crudini --set $cfg \
DEFAULT \
debug \
"${DEBUG_LOGGING}"
crudini --set $cfg \
DEFAULT \
auth_region \
"${KEYSTONE_REGION}"
crudini --set $cfg \
DEFAULT \
endpoint_type \
"${ENDPOINT_TYPE}"
crudini --set $cfg \
DEFAULT \
auth_url \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0"
crudini --set $cfg \
DEFAULT \
admin_tenant_name \
"${ADMIN_TENANT_NAME}"
crudini --set $cfg \
DEFAULT \
admin_user \
"${NEUTRON_KEYSTONE_USER}"
crudini --set $cfg \
DEFAULT \
admin_password \
"${NEUTRON_KEYSTONE_PASSWORD}"
crudini --set $cfg \
DEFAULT \
nova_metadata_ip \
"${NOVA_METADATA_API_SERVICE_HOST}"
crudini --set $cfg \
DEFAULT \
nova_metadata_port \
"${NOVA_METADATA_API_SERVICE_PORT}"
crudini --set $cfg \
DEFAULT \
metadata_proxy_shared_secret \
"${NEUTRON_SHARED_SECRET}"
# Start Metadata Agent
exec /usr/bin/neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini --config-dir /etc/neutron

View File

@ -35,7 +35,7 @@ set_configs() {
esac
}
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +0,0 @@
#!/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

View File

@ -1,42 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
check_required_vars NEUTRON_FLAT_NETWORK_INTERFACE \
NEUTRON_FLAT_NETWORK_NAME \
PUBLIC_IP
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

View File

@ -8,7 +8,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,17 +0,0 @@
#!/bin/bash
RES=0
. /openrc
if ! keystone token-get > /dev/null; then
echo "ERROR: keystone token-get failed" >&2
RES=1
else
if ! neutron ext-list > /dev/null; then
echo "ERROR: neutron ext-list failed" >&2
RES=1
fi
fi
exit $RES

View File

@ -1,103 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
check_required_vars ADMIN_TENANT_NAME \
KEYSTONE_ADMIN_SERVICE_HOST \
KEYSTONE_ADMIN_TOKEN \
KEYSTONE_AUTH_PROTOCOL \
NEUTRON_DB_NAME \
NEUTRON_DB_PASSWORD \
NEUTRON_DB_PASSWORD \
NEUTRON_DB_USER \
NEUTRON_KEYSTONE_PASSWORD \
NEUTRON_KEYSTONE_USER \
NEUTRON_SERVER_SERVICE_HOST \
NOVA_API_SERVICE_HOST \
NOVA_KEYSTONE_PASSWORD \
NOVA_KEYSTONE_USER \
PUBLIC_IP
fail_unless_os_service_running keystone
fail_unless_db
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${NEUTRON_DB_NAME} DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON ${NEUTRON_DB_NAME}.* TO
'${NEUTRON_DB_USER}'@'%' IDENTIFIED BY '${NEUTRON_DB_PASSWORD}'
EOF
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
# Configure Keystone Service Catalog
crux user-create -n "${NEUTRON_KEYSTONE_USER}" \
-p "${NEUTRON_KEYSTONE_PASSWORD}" \
-t "${ADMIN_TENANT_NAME}" \
-r admin
crux endpoint-create -n neutron -t network \
-I "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}" \
-P "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}" \
-A "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}"
core_cfg=/etc/neutron/neutron.conf
ml2_cfg=/etc/neutron/plugins/ml2/ml2_conf.ini
# Logging
crudini --set /etc/neutron/neutron.conf \
DEFAULT \
log_file \
"${NEUTRON_SERVER_LOG_FILE}"
# Database
crudini --set $core_cfg \
database \
connection \
"mysql://${NEUTRON_DB_USER}:${NEUTRON_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${NEUTRON_DB_NAME}"
# Nova
crudini --set $core_cfg \
DEFAULT \
notify_nova_on_port_status_changes \
"True"
crudini --set $core_cfg \
DEFAULT \
notify_nova_on_port_data_changes \
"True"
crudini --set $core_cfg \
DEFAULT \
nova_url \
"http://${NOVA_API_SERVICE_HOST}:${NOVA_API_SERVICE_PORT}/v2"
crudini --set $core_cfg \
DEFAULT \
nova_admin_auth_url \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
crudini --set $core_cfg \
DEFAULT \
nova_region_name \
"${KEYSTONE_REGION}"
crudini --set $core_cfg \
DEFAULT \
nova_admin_username \
"${NOVA_KEYSTONE_USER}"
crudini --set $core_cfg \
DEFAULT \
nova_admin_tenant_id \
"$(keystone tenant-list | grep $ADMIN_TENANT_NAME | awk '{print $2;}')"
crudini --set $core_cfg \
DEFAULT \
nova_admin_password \
"${NOVA_KEYSTONE_PASSWORD}"
if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then
crudini --set $ml2_cfg \
linux_bridge \
physical_interface_mappings \
"${NEUTRON_FLAT_NETWORK_NAME}:${NEUTRON_FLAT_NETWORK_INTERFACE}"
fi
su -s /bin/bash -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
exec /usr/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini

View File

@ -7,7 +7,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here.
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases

View File

@ -380,58 +380,23 @@ In order for each service to function, there is a minimum set of required variab
# Neutron-agents
ADMIN_TENANT_NAME
DEBUG_LOGGING
DELETE_NAMESPACES
DHCP_DRIVER
DNSMASQ_CONFIG_FILE
KEYSTONE_AUTH_PROTOCOL
KEYSTONE_PUBLIC_SERVICE_HOST
MECHANISM_DRIVERS
NEUTRON_KEYSTONE_PASSWORD
NEUTRON_KEYSTONE_USER
NEUTRON_LOG_DIR
NEUTRON_SHARED_SECRET
NOVA_METADATA_API_SERVICE_HOST
NOVA_METADATA_API_SERVICE_PORT
USE_NAMESPACES
VERBOSE_LOGGING
None
# Neutron-base
KEYSTONE_PUBLIC_SERVICE_HOST
NEUTRON_API_PASTE_CONFIG
NEUTRON_KEYSTONE_PASSWORD
RABBITMQ_SERVICE_HOST
None
# Neutron-linuxbridge-agent
NEUTRON_FLAT_NETWORK_INTERFACE
NEUTRON_FLAT_NETWORK_NAME
PUBLIC_IP
None
# Neutron-openvswitch-agent
NEUTRON_FLAT_NETWORK_INTERFACE
NEUTRON_FLAT_NETWORK_NAME
PUBLIC_IP
None
# Neutron-server
ADMIN_TENANT_NAME
KEYSTONE_ADMIN_SERVICE_HOST
KEYSTONE_ADMIN_TOKEN
KEYSTONE_AUTH_PROTOCOL
NEUTRON_DB_NAME
NEUTRON_DB_PASSWORD
NEUTRON_DB_USER
NEUTRON_KEYSTONE_PASSWORD
NEUTRON_KEYSTONE_USER
NEUTRON_SERVER_SERVICE_HOST
NOVA_API_SERVICE_HOST
NOVA_KEYSTONE_PASSWORD
NOVA_KEYSTONE_USER
PUBLIC_IP
None
# Nova-api