Hongbin Lu 17db307e27 Allow skip processing exposed ports
The endpoints 'network_driver_program_external_connectivity'
and 'network_driver_revoke_external_connectivity' will dynamically
create security group and security group rules to open the ports
exposed by the docker container. However, such processing invokes
too much neutron API calls thus significantly slowing down the
container start/stop. However, such processing is not mandatory
because users can manually configure the SGs to achieve the
equivalent.

This patch make the processing of exposed ports configurable.
As a result, it can be disabled if users want a better performance.

Change-Id: I6d6d176512e6b30bb7372408aec1a7bac12335ab
2018-04-22 17:11:24 +00:00

37 lines
1.5 KiB
Plaintext

KURYR_HOME=${KURYR_HOME:-$DEST/kuryr-libnetwork}
KURYR_ACTIVATOR_FILENAME=${KURYR_ACTIVATOR_FILENAME:-kuryr.spec}
KURYR_DEFAULT_ACTIVATOR=${KURYR_HOME}/etc/${KURYR_ACTIVATOR_FILENAME}
# See libnetwork's plugin discovery mechanism:
# https://github.com/docker/docker/blob/c4d45b6a29a91f2fb5d7a51ac36572f2a9b295c6/docs/extend/plugin_api.md#plugin-discovery
KURYR_ACTIVATOR_DIR=${KURYR_ACTIVATOR_DIR:-/usr/lib/docker/plugins/kuryr}
KURYR_ACTIVATOR=${KURYR_ACTIVATOR_DIR}/${KURYR_ACTIVATOR_FILENAME}
KURYR_CONFIG_FILENAME=kuryr.conf
KURYR_DEFAULT_CONFIG=${KURYR_HOME}/etc/${KURYR_CONFIG_FILENAME}
KURYR_CONFIG_DIR=${KURYR_CONFIG_DIR:-/etc/kuryr}
KURYR_CONFIG=${KURYR_CONFIG_DIR}/${KURYR_CONFIG_FILENAME}
KURYR_AUTH_CACHE_DIR=${KURYR_AUTH_CACHE_DIR:-/var/cache/kuryr}
KURYR_LOG_DIR=${KURYR_LOG_DIR:-/var/log/kuryr}
KURYR_BIN_DIR=$(get_python_exec_prefix)
KURYR_POOL_PREFIX=${KURYR_POOL_PREFIX:-10.10.0.0/16}
KURYR_POOL_PREFIX_LEN=${KURYR_POOL_PREFIX_LEN:-24}
KURYR_CAPABILITY_SCOPE=${KURYR_CAPABILITY_SCOPE:-local}
KURYR_PROCESS_EXTERNAL_CONNECTIVITY=${KURYR_PROCESS_EXTERNAL_CONNECTIVITY:-True}
KURYR_DOCKER_ENGINE_PORT=${KURYR_DOCKER_ENGINE_PORT:-2375}
DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-etcd://$SERVICE_HOST:$ETCD_PORT}
GITREPO["kuryr"]=${KURYR_REPO:-${GIT_BASE}/openstack/kuryr.git}
GITBRANCH["kuryr"]=${KURYR_BRANCH:-master}
GITDIR["kuryr"]=$DEST/kuryr
enable_service kuryr-libnetwork docker-engine
if [[ ${HOST_IP} == ${SERVICE_HOST} ]]; then
enable_service etcd3
fi