Merge "devstack: set neutron_defaults"
This commit is contained in:
commit
f357a438d4
@ -83,6 +83,22 @@ function configure_kuryr {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function configure_neutron_defaults {
|
||||||
|
local project_id=$(get_or_create_project \
|
||||||
|
"$KURYR_NEUTRON_DEFAULT_PROJECT" default)
|
||||||
|
local pod_subnet_id=$(neutron subnet-show -c id -f value \
|
||||||
|
"$KURYR_NEUTRON_DEFAULT_POD_SUBNET")
|
||||||
|
local sg_ids=$(echo $(neutron security-group-list \
|
||||||
|
--project-id "$project_id" -c id -f value) | tr ' ' ',')
|
||||||
|
|
||||||
|
iniset "$KURYR_CONFIG" neutron_defaults project "$project_id"
|
||||||
|
iniset "$KURYR_CONFIG" neutron_defaults pod_subnet "$pod_subnet_id"
|
||||||
|
iniset "$KURYR_CONFIG" neutron_defaults pod_security_groups "$sg_ids"
|
||||||
|
if [ -n "$OVS_BRIDGE" ]; then
|
||||||
|
iniset "$KURYR_CONFIG" neutron_defaults ovs_bridge "$OVS_BRIDGE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function check_docker {
|
function check_docker {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
dpkg -s docker-engine > /dev/null 2>&1
|
dpkg -s docker-engine > /dev/null 2>&1
|
||||||
@ -345,6 +361,7 @@ if is_service_enabled kuryr-kubernetes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
if [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||||
|
configure_neutron_defaults
|
||||||
# FIXME(limao): When Kuryr start up, it need to detect if neutron
|
# FIXME(limao): When Kuryr start up, it need to detect if neutron
|
||||||
# support tag plugin.
|
# support tag plugin.
|
||||||
#
|
#
|
||||||
|
@ -12,6 +12,10 @@ KURYR_POOL_PREFIX_LEN=${KURYR_POOL_PREFIX_LEN:-24}
|
|||||||
KURYR_DOCKER_ENGINE_PORT=${KURYR_DOCKER_ENGINE_PORT:-2375}
|
KURYR_DOCKER_ENGINE_PORT=${KURYR_DOCKER_ENGINE_PORT:-2375}
|
||||||
KURYR_DOCKER_ENGINE_SOCKET_FILE=${KURYR_DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
|
KURYR_DOCKER_ENGINE_SOCKET_FILE=${KURYR_DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
|
||||||
|
|
||||||
|
# Neutron defaults
|
||||||
|
KURYR_NEUTRON_DEFAULT_PROJECT=demo
|
||||||
|
KURYR_NEUTRON_DEFAULT_POD_SUBNET=${PRIVATE_SUBNET_NAME}
|
||||||
|
|
||||||
# Etcd
|
# Etcd
|
||||||
KURYR_ETCD_IMAGE=${KURYR_ETCD_IMAGE:-quay.io/coreos/etcd}
|
KURYR_ETCD_IMAGE=${KURYR_ETCD_IMAGE:-quay.io/coreos/etcd}
|
||||||
KURYR_ETCD_VERSION=${KURYR_ETCD_VERSION:-v3.0.8}
|
KURYR_ETCD_VERSION=${KURYR_ETCD_VERSION:-v3.0.8}
|
||||||
|
Loading…
Reference in New Issue
Block a user