NETWORK_MODE switch added.
Additional parameter was introduced to allow quick switch between two possible networking modes. Change-Id: I9ef2b8b3feed6e647bd384727dc0f1a16b2000e4
This commit is contained in:
parent
de15615fdb
commit
5c5fd0436d
|
@ -11,6 +11,7 @@ NOVA_CACHE_TMPFS_SIZE=24G
|
|||
|
||||
GLANCE_IMAGE_LIST=""
|
||||
COMPUTE_NODE_LIST=""
|
||||
NETWORK_MODE="nova"
|
||||
|
||||
LAB_FLAT_RANGE=172.18.124.192/26
|
||||
LAB_ALLOCATION_START=172.18.124.210
|
||||
|
|
|
@ -39,16 +39,18 @@ function glance_image_create {
|
|||
# Executing post-stack actions
|
||||
#===============================================================================
|
||||
|
||||
#if [[ ',standalone,compute,' =~ ,$INSTALL_MODE, ]] ; then
|
||||
# echo "Adding iptables rule to allow Internet access from instances..."
|
||||
# __iptables_rule="POSTROUTING -t nat -s '$FIXED_RANGE' ! -d '$FIXED_RANGE' -j MASQUERADE"
|
||||
# sudo iptables -C $__iptables_rule
|
||||
# if [[ $? == 0 ]] ; then
|
||||
# echo "Iptables rule already exists."
|
||||
# else
|
||||
# sudo iptables -A $__iptables_rule
|
||||
# fi
|
||||
#fi
|
||||
if [[ $NETWORK_MODE == "nova" ]] ; then
|
||||
if [[ ',standalone,compute,' =~ ,$INSTALL_MODE, ]] ; then
|
||||
echo "Adding iptables rule to allow Internet access from instances..."
|
||||
__iptables_rule="POSTROUTING -t nat -s '$FIXED_RANGE' ! -d '$FIXED_RANGE' -j MASQUERADE"
|
||||
sudo iptables -C $__iptables_rule
|
||||
if [[ $? == 0 ]] ; then
|
||||
echo "Iptables rule already exists."
|
||||
else
|
||||
sudo iptables -A $__iptables_rule
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ ',standalone,compute,' =~ ,$INSTALL_MODE, ]] ; then
|
||||
|
@ -108,6 +110,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if [[ $NETWORK_MODE == "quantum" ]] ; then
|
||||
quantum net-create Public \
|
||||
--tenant-id admin \
|
||||
--shared \
|
||||
|
@ -127,6 +130,7 @@ quantum port-create \
|
|||
--device-id network:dhcp \
|
||||
--fixed-ip subnet=Public,ip_address=$LAB_ALLOCATION_START \
|
||||
Public
|
||||
fi
|
||||
|
||||
#===============================================================================
|
||||
|
||||
|
|
|
@ -18,10 +18,13 @@ SERVICE_TOKEN=tokentoken
|
|||
|
||||
# Enable HEAT
|
||||
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
|
||||
|
||||
if [[ $NETWORK_MODE == "quantum" ]] ; then
|
||||
# Enable QUANTUM
|
||||
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,quantum
|
||||
# Disable NOVA-NETWORK
|
||||
DISABLED_SERVICES=n-net
|
||||
fi
|
||||
|
||||
SCREEN_LOGDIR=/opt/stack/log/
|
||||
LOGFILE=$SCREEN_LOGDIR/stack.sh.log
|
||||
|
|
Loading…
Reference in New Issue