kolla-ansible/docker/neutron/neutron-agents/config-scripts/config-metadata-agent.sh
Daneyon Hansen ed107a5e26 Adds Neutron Agents Support
Previously, the agents ran in seperate containers. Since some of
the agents create and use network namespaces, runnning them in
seperate containers has become a challenge. This patch adds
neutron agent support in a single container.

Partially Implements: blueprint compute-operation-neutron

Change-Id: If4f893abd50d90b58e8435ec2659870dce36951c
2015-04-13 07:34:12 +00:00

75 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
set -e
. /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${KEYSTONE_REGION:=RegionOne}
: ${ENDPOINT_TYPE:=adminURL}
: ${NEUTRON_SHARED_SECRET:=sharedsecret}
check_required_vars VERBOSE_LOGGING DEBUG_LOGGING KEYSTONE_AUTH_PROTOCOL \
KEYSTONE_PUBLIC_SERVICE_HOST ADMIN_TENANT_NAME \
NEUTRON_KEYSTONE_USER NEUTRON_KEYSTONE_PASSWORD \
NEUTRON_SHARED_SECRET NOVA_METADATA_API_SERVICE_HOST \
NOVA_METADATA_API_SERVICE_PORT
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