Making external network configuration in local.conf optional

It will check if all external network configuration there.
If it's there installation will create external network,
nat-pool, nsp. Otherwise, installation will skip creation of
external network, nat-pool, nsp.

Change-Id: I821aa7e33cd973ef1390212b17000f77cb17943b
Closes-Bug: 1638854
This commit is contained in:
YogeshRajmane 2016-11-03 17:51:27 +05:30 committed by Subrahmanyam Ongole
parent 3306efd31d
commit f1448c5b13
4 changed files with 26 additions and 8 deletions

View File

@ -12,25 +12,38 @@ Fresh Installation Steps:
(3) Configure local.conf
# Modify NFP_DEVSTACK_MODE to 'advanced'
# Configure following external network details,
# Configure the following external network details.
# If configured, install step creates resources required for external access.
# If not configured, user needs to create these resources as described in step 5 below.
EXT_NET_GATEWAY=
EXT_NET_ALLOCATION_POOL_START=
EXT_NET_ALLOCATION_POOL_END=
EXT_NET_CIDR=
# Configure the Configurator VM image path(optional),
# Configure the Configurator (NFP Controller) VM image path(optional),
# If configured, install step uploads the specified image
# If not configured, install step will build a new one and upload it
ConfiguratorQcow2Image=
# Configure the Service VM image paths(optional),
# Configure Service VM image paths(optional),
# If configured, install step uploads the specified images
# If not configured, install step ignores uploading these service images
VyosQcow2Image=
HaproxyQcow2Image=
# Configure PUBLIC_INTERFACE with the public interface name
(4) Install devstack.
# ./stack.sh
(5) Create required basic GBP resources
# In step 3 above, if you have chosen not to create resources for external access, you may need
# to create them explicitly as described below.
# Note: This step is not required to excercise east west traffic
# Create external-network, external-subnet, external-segment, nat-pool, network-service-policy
# Configure "default_external_segment_name" option from "group_policy_implicit_policy" group
# with external-segment name created above from neutron.conf
# Restart neutron-server service
Re-installation Steps:
======================

View File

@ -125,7 +125,7 @@ function create_ep_and_nsp {
default
gbp nsp-create\
--network-service-params type=ip_pool,name=vip_ip,value=nat_pool\
--network-service-params type=ip_pool,name=fip,value=nat_pool\
svc_mgmt_fip_policy
}
@ -191,9 +191,10 @@ function create_nfp_gbp_resources {
--service-flavor service_vendor=vyos,device_type=nova\
--vendor NFP\
vpn_profile
create_ext_net
create_ep_and_nsp
if [[ $EXT_NET_GATEWAY && $EXT_NET_ALLOCATION_POOL_START && $EXT_NET_ALLOCATION_POOL_END && $EXT_NET_CIDR ]]; then
create_ext_net
create_ep_and_nsp
fi
fi

View File

@ -24,6 +24,8 @@ if [[ $ENABLE_NFP = True ]]; then
if [[ $NFP_DEVSTACK_MODE = advanced ]]; then
# External Network
# If configured, install step creates external network, external policy and network service policy
# If not configured, user has to create external network, external policy and network service policy
EXT_NET_GATEWAY=
EXT_NET_ALLOCATION_POOL_START=
EXT_NET_ALLOCATION_POOL_END=

View File

@ -35,7 +35,9 @@ function nfp_configure_neutron {
iniset $NEUTRON_CONF admin_owned_resources_apic_tscp plumbing_resource_owner_user "neutron"
iniset $NEUTRON_CONF admin_owned_resources_apic_tscp plumbing_resource_owner_password $ADMIN_PASSWORD
iniset $NEUTRON_CONF admin_owned_resources_apic_tscp plumbing_resource_owner_tenant_name "service"
iniset $NEUTRON_CONF group_policy_implicit_policy default_external_segment_name "default"
if [[ $EXT_NET_GATEWAY && $EXT_NET_ALLOCATION_POOL_START && $EXT_NET_ALLOCATION_POOL_END && $EXT_NET_CIDR ]]; then
iniset $NEUTRON_CONF group_policy_implicit_policy default_external_segment_name "default"
fi
iniset $NEUTRON_CONF nfp_node_driver is_service_admin_owned "True"
iniset $NEUTRON_CONF nfp_node_driver svc_management_ptg_name "svc_management_ptg"
}