Removed lbaasv1 installation from devstack
Currently lbaasv1 does not support in newton release, so removing installation changes for lbaasv1. Change-Id: I6b3bf3df2be6634c596c9084f2dcdec518d0e31e Co-Authored-By: Ashutosh Mishra <mca.ashu4@gmail.com> Closes-bug: 1673364
This commit is contained in:
parent
00eda5e6ce
commit
6fc3115e14
|
@ -20,7 +20,7 @@
|
|||
|
||||
# Set up default directories
|
||||
DEVSTACK_DIR=$PWD
|
||||
NFPSERVICE_DIR=$DEST/gbp
|
||||
NFPSERVICE_DIR=$DEST/group-based-policy
|
||||
NEUTRON_CONF_DIR=/etc/neutron
|
||||
NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf
|
||||
NFP_CONF_DIR=/etc/nfp
|
||||
|
@ -128,7 +128,7 @@ function create_nfp_gbp_resources {
|
|||
FLAVOR=m1.nfp-tiny
|
||||
|
||||
gbp service-profile-create\
|
||||
--servicetype LOADBALANCER\
|
||||
--servicetype LOADBALANCERV2\
|
||||
--insertion-mode l3\
|
||||
--shared True\
|
||||
--service-flavor service_vendor=haproxy,device_type=None\
|
||||
|
@ -146,22 +146,12 @@ function create_nfp_gbp_resources {
|
|||
else
|
||||
|
||||
gbp service-profile-create\
|
||||
--servicetype LOADBALANCER\
|
||||
--insertion-mode l3\
|
||||
--shared True\
|
||||
--service-flavor service_vendor=haproxy,device_type=nova\
|
||||
--vendor NFP\
|
||||
lb_profile
|
||||
|
||||
if [[ $ENABLE_LBAASV2 = True ]]; then
|
||||
gbp service-profile-create\
|
||||
--servicetype LOADBALANCERV2\
|
||||
--insertion-mode l3\
|
||||
--shared True\
|
||||
--service-flavor service_vendor=haproxy_lbaasv2,device_type=nova,flavor=m1.small\
|
||||
--service-flavor service_vendor=haproxy,device_type=nova,flavor=m1.small\
|
||||
--vendor NFP\
|
||||
lbv2_profile
|
||||
fi
|
||||
|
||||
gbp service-profile-create\
|
||||
--servicetype FIREWALL\
|
||||
|
@ -178,6 +168,7 @@ function create_nfp_gbp_resources {
|
|||
--service-flavor service_vendor=vyos,device_type=nova\
|
||||
--vendor NFP\
|
||||
vpn_profile
|
||||
|
||||
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
|
||||
|
@ -282,7 +273,7 @@ function create_nfp_image {
|
|||
HaproxyQcow2ImageName=haproxy
|
||||
if ! [[ -z $HaproxyQcow2Image ]]; then
|
||||
echo "Uploading Image: $HaproxyQcow2ImageName"
|
||||
glance image-create --name $HaproxyQcow2ImageName --disk-format qcow2 --container-format bare --visibility public --file $HaproxyQcow2Image
|
||||
glance image-create --name $HaproxyQcow2ImageName --disk-format qcow2 --container-format bare --visibility public --file $HaproxyQcow2Image --property supports_hotplug=False
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -44,16 +44,16 @@ if [[ $ENABLE_NFP = True ]]; then
|
|||
# Make sure that your public interface is not attached to any bridge.
|
||||
PUBLIC_INTERFACE=
|
||||
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/mitaka
|
||||
enable_plugin barbican https://git.openstack.org/openstack/barbican master
|
||||
# By default, LBAASV2 plugin driver is not configured.
|
||||
# To configure LBAASV2 set the below value to True.
|
||||
ENABLE_LBAASV2=False
|
||||
|
||||
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/mitaka
|
||||
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git stable/mitaka
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/newton
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/newton
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/newton
|
||||
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/newton
|
||||
enable_plugin octavia https://git.openstack.org/openstack/octavia
|
||||
#enable_plugin barbican https://git.openstack.org/openstack/barbican master
|
||||
#enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git master
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
enable_plugin group-based-policy $GBPSERVICE_REPO $GBPSERVICE_BRANCH
|
||||
|
||||
|
|
|
@ -41,20 +41,17 @@ function nfp_configure_neutron {
|
|||
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"
|
||||
extn_drivers=$(iniget $NEUTRON_ML2_CONF ml2 extension_drivers)
|
||||
if [[ -n $extn_drivers ]];then
|
||||
iniset $NEUTRON_ML2_CONF ml2 extension_drivers $extn_drivers,port_security
|
||||
else
|
||||
iniset $NEUTRON_ML2_CONF ml2 extension_drivers port_security
|
||||
fi
|
||||
#extn_drivers=$(iniget $NEUTRON_ML2_CONF ml2 extension_drivers)
|
||||
#if [[ -n $extn_drivers ]];then
|
||||
# iniset $NEUTRON_ML2_CONF ml2 extension_drivers $extn_drivers,port_security
|
||||
#else
|
||||
# iniset $NEUTRON_ML2_CONF ml2 extension_drivers port_security
|
||||
#fi
|
||||
}
|
||||
|
||||
function configure_nfp_loadbalancer {
|
||||
echo "Configuring NFP Loadbalancer plugin driver"
|
||||
LBAAS_SERVICE_PROVIDER=LOADBALANCER:loadbalancer:gbpservice.contrib.nfp.service_plugins.loadbalancer.drivers.nfp_lbaas_plugin_driver.HaproxyOnVMPluginDriver:default
|
||||
if [[ $ENABLE_LBAASV2 = True ]]; then
|
||||
LBAAS_SERVICE_PROVIDER=LOADBALANCERV2:loadbalancerv2:gbpservice.contrib.nfp.service_plugins.loadbalancer.drivers.nfp_lbaasv2_plugin_driver.HaproxyOnVMPluginDriver:default
|
||||
fi
|
||||
LBAAS_SERVICE_PROVIDER=LOADBALANCERV2:loadbalancerv2:gbpservice.contrib.nfp.service_plugins.loadbalancer.drivers.nfp_lbaasv2_plugin_driver.HaproxyOnVMPluginDriver:default
|
||||
sudo\
|
||||
sed\
|
||||
-i\
|
||||
|
|
|
@ -24,7 +24,7 @@ source $TOP_DIR/openrc neutron service
|
|||
create_gbp_resources() {
|
||||
# E-W insertion
|
||||
gbp servicechain-node-create --service-profile base_mode_fw --template-file $TOP_DIR/nfp-templates/fw_template.yml FW_LB-FWNODE
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy.template FW_LB-LBNODE
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy_lbaasv2.template FW_LB-LBNODE
|
||||
gbp servicechain-spec-create --nodes "FW_LB-FWNODE FW_LB-LBNODE" fw_lb_chainspec
|
||||
gbp policy-action-create --action-type REDIRECT --action-value fw_lb_chainspec redirect-to-fw_lb
|
||||
gbp policy-classifier-create --protocol tcp --direction bi fw_lb-webredirect
|
||||
|
@ -91,27 +91,17 @@ validate_firewall_resources() {
|
|||
}
|
||||
|
||||
validate_loadbalancer_resources() {
|
||||
LBPoolCount=`neutron lb-pool-list -f value | wc -l`
|
||||
LBPoolCount=`neutron lbaas-pool-list -f value | wc -l`
|
||||
if [ "$LBPoolCount" -eq "1" ]; then
|
||||
echo "LB Pool resource created"
|
||||
LBPoolUUID=`neutron lb-pool-list -f value | awk '{print $1}'`
|
||||
LBPoolStatus=`neutron lb-pool-show $LBPoolUUID -f value -c status`
|
||||
echo "LB Pool resource is in $LBPoolStatus state"
|
||||
LBPoolUUID=`neutron lbaas-pool-list -f value | awk '{print $1}'`
|
||||
#LBPoolStatus=`neutron lbaas-pool-show $LBPoolUUID -f value -c status`
|
||||
#echo "LB Pool resource is in $LBPoolStatus state"
|
||||
else
|
||||
echo "LB Pool resource not created"
|
||||
fi
|
||||
|
||||
LBVIPCount=`neutron lb-vip-list -f value | wc -l`
|
||||
if [ "$LBVIPCount" -eq "1" ]; then
|
||||
echo "LB VIP resource created"
|
||||
LBVIPUUID=`neutron lb-vip-list -f value | awk '{print $1}'`
|
||||
LBVIPStatus=`neutron lb-vip-show $LBVIPUUID -f value -c status`
|
||||
echo "LB VIP resource is in $LBVIPStatus state"
|
||||
else
|
||||
echo "LB VIP resource not created"
|
||||
fi
|
||||
|
||||
LBHMCount=`neutron lb-healthmonitor-list -f value | wc -l`
|
||||
LBHMCount=`neutron lbaas-healthmonitor-list -f value | wc -l`
|
||||
if [ "$LBHMCount" -eq "1" ]; then
|
||||
echo "LB Healthmonitor resource created"
|
||||
else
|
||||
|
@ -120,7 +110,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group fw_lb-provider provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -129,7 +119,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group fw_lb-provider provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "2" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -138,7 +128,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
|
@ -147,7 +137,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "0" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
|
|
|
@ -24,7 +24,7 @@ source $TOP_DIR/openrc neutron service
|
|||
create_gbp_resources() {
|
||||
# E-W insertion
|
||||
gbp servicechain-node-create --service-profile base_mode_fw_vm --config 'custom_json:{"mimetype": "config/custom+json","rules": [{"action": "log", "name": "tcp", "service": "tcp/80"}, {"action": "log", "name": "tcp", "service": "tcp/8080"}, {"action": "accept", "name": "tcp", "service": "tcp/22"}, {"action": "accept", "name": "icmp", "service": "icmp"}]}' FW_LB-FWNODE
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy.template FW_LB-LBNODE
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy_lbaasv2.template FW_LB-LBNODE
|
||||
gbp servicechain-spec-create --nodes "FW_LB-FWNODE FW_LB-LBNODE" fw_lb_chainspec
|
||||
gbp policy-action-create --action-type REDIRECT --action-value fw_lb_chainspec redirect-to-fw_lb
|
||||
gbp policy-classifier-create --protocol tcp --direction bi fw_lb-webredirect
|
||||
|
@ -91,27 +91,17 @@ validate_firewall_resources() {
|
|||
}
|
||||
|
||||
validate_loadbalancer_resources() {
|
||||
LBPoolCount=`neutron lb-pool-list -f value | wc -l`
|
||||
LBPoolCount=`neutron lbaas-pool-list -f value | wc -l`
|
||||
if [ "$LBPoolCount" -eq "1" ]; then
|
||||
echo "LB Pool resource created"
|
||||
LBPoolUUID=`neutron lb-pool-list -f value | awk '{print $1}'`
|
||||
LBPoolStatus=`neutron lb-pool-show $LBPoolUUID -f value -c status`
|
||||
echo "LB Pool resource is in $LBPoolStatus state"
|
||||
LBPoolUUID=`neutron lbaas-pool-list -f value | awk '{print $1}'`
|
||||
#LBPoolStatus=`neutron lb-pool-show $LBPoolUUID -f value -c status`
|
||||
#echo "LB Pool resource is in $LBPoolStatus state"
|
||||
else
|
||||
echo "LB Pool resource not created"
|
||||
fi
|
||||
|
||||
LBVIPCount=`neutron lb-vip-list -f value | wc -l`
|
||||
if [ "$LBVIPCount" -eq "1" ]; then
|
||||
echo "LB VIP resource created"
|
||||
LBVIPUUID=`neutron lb-vip-list -f value | awk '{print $1}'`
|
||||
LBVIPStatus=`neutron lb-vip-show $LBVIPUUID -f value -c status`
|
||||
echo "LB VIP resource is in $LBVIPStatus state"
|
||||
else
|
||||
echo "LB VIP resource not created"
|
||||
fi
|
||||
|
||||
LBHMCount=`neutron lb-healthmonitor-list -f value | wc -l`
|
||||
LBHMCount=`neutron lbaas-healthmonitor-list -f value | wc -l`
|
||||
if [ "$LBHMCount" -eq "1" ]; then
|
||||
echo "LB Healthmonitor resource created"
|
||||
else
|
||||
|
@ -120,7 +110,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group fw_lb-provider provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -129,7 +119,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group fw_lb-provider provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "2" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -138,7 +128,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
|
@ -147,7 +137,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "0" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
|
|
|
@ -24,7 +24,7 @@ source $TOP_DIR/openrc neutron service
|
|||
|
||||
create_gbp_resources() {
|
||||
# E-W insertion
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy.template LB-NODE
|
||||
gbp servicechain-node-create --service-profile base_mode_lb --template-file $TOP_DIR/nfp-templates/haproxy_lbaasv2.template LB-NODE
|
||||
gbp servicechain-spec-create --nodes "LB-NODE" lb_chainspec
|
||||
gbp policy-action-create --action-type REDIRECT --action-value lb_chainspec redirect-to-lb
|
||||
gbp policy-classifier-create --protocol tcp --direction bi lb-webredirect
|
||||
|
@ -57,27 +57,21 @@ validate_gbp_resources() {
|
|||
}
|
||||
|
||||
validate_loadbalancer_resources() {
|
||||
LBPoolCount=`neutron lb-pool-list -f value | wc -l`
|
||||
LBPoolCount=`neutron lbaas-pool-list -f value | wc -l`
|
||||
if [ "$LBPoolCount" -eq "1" ]; then
|
||||
echo "LB Pool resource created"
|
||||
LBPoolUUID=`neutron lb-pool-list -f value | awk '{print $1}'`
|
||||
LBPoolStatus=`neutron lb-pool-show $LBPoolUUID -f value -c status`
|
||||
echo "LB Pool resource is in $LBPoolStatus state"
|
||||
echo "LB Pool resources created"
|
||||
LBPoolUUID=`neutron lbaas-pool-list -f value | awk '{print $1}'`
|
||||
#PoolRsourcesList=$(neutron lbaas-pool-list -f value -c id)
|
||||
#for pool in $(echo $PoolRsourcesList | tr " " "\n")
|
||||
#do
|
||||
# LBPoolStatus=`neutron lbaas-pool-show $LBPoolUUID -f value -c status`
|
||||
# echo "LB Pool resource is in $LBPoolStatus state"
|
||||
#done
|
||||
else
|
||||
echo "LB Pool resource not created"
|
||||
fi
|
||||
|
||||
LBVIPCount=`neutron lb-vip-list -f value | wc -l`
|
||||
if [ "$LBVIPCount" -eq "1" ]; then
|
||||
echo "LB VIP resource created"
|
||||
LBVIPUUID=`neutron lb-vip-list -f value | awk '{print $1}'`
|
||||
LBVIPStatus=`neutron lb-vip-show $LBVIPUUID -f value -c status`
|
||||
echo "LB VIP resource is in $LBVIPStatus state"
|
||||
else
|
||||
echo "LB VIP resource not created"
|
||||
fi
|
||||
|
||||
LBHMCount=`neutron lb-healthmonitor-list -f value | wc -l`
|
||||
LBHMCount=`neutron lbaas-healthmonitor-list -f value | wc -l`
|
||||
if [ "$LBHMCount" -eq "1" ]; then
|
||||
echo "LB Healthmonitor resource created"
|
||||
else
|
||||
|
@ -86,7 +80,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group lb-provider provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -95,7 +89,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-create --policy-target-group lb-provider provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "2" ]; then
|
||||
echo "LB Member resource created"
|
||||
else
|
||||
|
@ -104,7 +98,7 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt1
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "1" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
|
@ -113,12 +107,13 @@ validate_loadbalancer_resources() {
|
|||
|
||||
gbp policy-target-delete provider_pt2
|
||||
sleep 5
|
||||
LBMemberCount=`neutron lb-member-list -f value | wc -l`
|
||||
LBMemberCount=`neutron lbaas-member-list $LBPoolUUID -f value | wc -l`
|
||||
if [ "$LBMemberCount" -eq "0" ]; then
|
||||
echo "LB Member resource deleted"
|
||||
else
|
||||
echo "LB Member resource not deleted"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_gbp_resources() {
|
||||
|
|
|
@ -45,12 +45,15 @@ enable_service q-svc
|
|||
enable_service q-agt
|
||||
enable_service q-dhcp
|
||||
enable_service q-l3
|
||||
#enable_service q-fwaas
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/newton
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/newton
|
||||
enable_plugin octavia https://git.openstack.org/openstack/octavia
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/newton
|
||||
|
||||
|
||||
#ENBALE OCTAVIA
|
||||
enable_plugin octavia https://git.openstack.org/openstack/octavia
|
||||
#ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
|
||||
|
||||
enable_service q-fwaas-v1
|
||||
enable_service q-lbaasv2
|
||||
enable_service q-meta
|
||||
|
@ -58,7 +61,7 @@ enable_service neutron
|
|||
enable_service group-policy
|
||||
disable_service tempest
|
||||
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
|
||||
enable_service orchestrator,proxy,proxy_agent,base_configurator
|
||||
enable_service orchestrator,proxy,proxy_agent,base_configurator,q-lbaasv2-agent
|
||||
|
||||
LOG_COLOR=False
|
||||
DEST=/opt/stack/new
|
||||
|
|
|
@ -141,7 +141,7 @@ function create_nfp_gbp_resources {
|
|||
FLAVOR=m1.nfp-tiny
|
||||
|
||||
gbp network-service-policy-create --network-service-params type=ip_pool,name=vip_ip,value=nat_pool svc_mgmt_fip_policy
|
||||
gbp service-profile-create --servicetype LOADBALANCER --insertion-mode l3 --shared True --service-flavor service_vendor=haproxy,device_type=None --vendor NFP base_mode_lb
|
||||
gbp service-profile-create --servicetype LOADBALANCERV2 --insertion-mode l3 --shared True --service-flavor service_vendor=haproxy,device_type=None --vendor NFP base_mode_lb
|
||||
gbp service-profile-create --servicetype FIREWALL --insertion-mode l3 --shared True --service-flavor service_vendor=vyos,device_type=None --vendor NFP base_mode_fw
|
||||
gbp service-profile-create --servicetype FIREWALL --insertion-mode l3 --shared True --service-flavor service_vendor=nfp,device_type=nova,image_name=$IMAGE_NAME_FLAT,flavor=$FLAVOR --vendor NFP base_mode_fw_vm
|
||||
|
||||
|
@ -250,11 +250,77 @@ function copy_nfp_files_and_start_process {
|
|||
sleep 2
|
||||
echo "Configuration success ... "
|
||||
}
|
||||
|
||||
|
||||
function restart_devstack_screen_processes {
|
||||
SCREEN_NAME=stack
|
||||
SERVICE_DIR=$DEST/status/$SCREEN_NAME
|
||||
bin=/usr/local/bin
|
||||
proc_screen_name=$1
|
||||
sandbox=$2
|
||||
proc_name=$3
|
||||
param=$4
|
||||
extra_param=$5
|
||||
|
||||
cmd=$bin/$proc_name\ $param\ $extra_param
|
||||
cmd="$(echo -e "${cmd}" | sed -e 's/[[:space:]]*$//')"
|
||||
|
||||
if [[ ! -z "${sandbox// }" ]]; then
|
||||
cmd=$sandbox\ \'$cmd\'
|
||||
fi
|
||||
|
||||
# stop the process
|
||||
screen -S $SCREEN_NAME -p $proc_screen_name -X kill
|
||||
sleep 4
|
||||
|
||||
# start the process
|
||||
screen -S $SCREEN_NAME -X screen -t $proc_screen_name
|
||||
screen -S $SCREEN_NAME -p $proc_screen_name -X stuff "$cmd \
|
||||
& echo \$! >$SERVICE_DIR/${proc_screen_name}.pid; fg || \
|
||||
echo \"$proc_screen_name failed to start\" \
|
||||
| tee \"$SERVICE_DIR/${proc_screen_name}.failure\"\n"
|
||||
sleep 5
|
||||
}
|
||||
|
||||
function restart_neutron_server {
|
||||
proc=q-svc
|
||||
proc_name=neutron-server
|
||||
sandbox=
|
||||
param="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
extra_param="--log-file /opt/stack/new/logs/q-svc.log"
|
||||
restart_devstack_screen_processes "$proc" "$sandbox" "$proc_name" "$param" "$extra_param"
|
||||
}
|
||||
|
||||
function configure_lbaas {
|
||||
echo "Configuring NFP Loadbalancer plugin driver"
|
||||
LBAAS_SERVICE_PROVIDER=LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
|
||||
sudo\
|
||||
sed\
|
||||
-i\
|
||||
'/^service_provider.*:default/'\
|
||||
's'/\
|
||||
':default'/\
|
||||
'\n'\
|
||||
"service_provider = $LBAAS_SERVICE_PROVIDER"/\
|
||||
/etc/neutron/neutron_lbaas.conf
|
||||
|
||||
echo "Configuring ineterface driver"
|
||||
iniset -sudo /etc/neutron/neutron_lbaas.conf DEFAULT interface_driver openvswitch
|
||||
echo "whereis neutron-lbaasv2-agent: " `whereis neutron-lbaasv2-agent`
|
||||
TOP_DIR=$1
|
||||
source $TOP_DIR/functions-common
|
||||
echo "Starting Lbaasv2 Agent"
|
||||
run_process q-lbaasv2-agent "sudo neutron-lbaasv2-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/neutron_lbaas.conf"
|
||||
|
||||
restart_neutron_server
|
||||
}
|
||||
|
||||
function nfp_setup {
|
||||
prepare_nfp_image_builder
|
||||
create_nfp_image $1
|
||||
assign_user_role_credential $1
|
||||
create_nfp_gbp_resources $1
|
||||
get_router_namespace $1
|
||||
configure_lbaas $1
|
||||
copy_nfp_files_and_start_process $1
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"heat_template_version": "2015-10-15",
|
||||
"description": "Configuration for Haproxy Neutron Loadbalacer V2 service",
|
||||
"parameters": {
|
||||
"lb_port": {
|
||||
"type": "number",
|
||||
"default": 80,
|
||||
"description": "Port used by the listener"
|
||||
},
|
||||
"app_port": {
|
||||
"type": "number",
|
||||
"default": 80,
|
||||
"description": "Port used by the servers in pool"
|
||||
},
|
||||
"Subnet": {
|
||||
"type": "string",
|
||||
"description": "Subnet on which the load balancer will be located"
|
||||
},
|
||||
"vip_ip": {
|
||||
"type": "string",
|
||||
"description": "VIP IP Address"
|
||||
},
|
||||
"service_chain_metadata": {
|
||||
"type": "string",
|
||||
"description": "sc metadata"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"monitor": {
|
||||
"type": "OS::Neutron::LBaaS::HealthMonitor",
|
||||
"depends_on": "pool",
|
||||
"properties": {
|
||||
"delay": 3,
|
||||
"type": "HTTP",
|
||||
"timeout": 3,
|
||||
"max_retries": 3,
|
||||
"pool": {
|
||||
"get_resource": "pool"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pool": {
|
||||
"type": "OS::Neutron::LBaaS::Pool",
|
||||
"depends_on": "listener",
|
||||
"description": "{'app_port_param_name': 'app_port'}",
|
||||
"properties": {
|
||||
"lb_algorithm": "ROUND_ROBIN",
|
||||
"protocol": "HTTP",
|
||||
"listener": {
|
||||
"get_resource": "listener"
|
||||
}
|
||||
}
|
||||
},
|
||||
"listener": {
|
||||
"type": "OS::Neutron::LBaaS::Listener",
|
||||
"depends_on": "loadbalancer",
|
||||
"properties": {
|
||||
"loadbalancer": {
|
||||
"get_resource": "loadbalancer"
|
||||
},
|
||||
"protocol": "HTTP",
|
||||
"protocol_port": {
|
||||
"get_param": "lb_port"
|
||||
}
|
||||
}
|
||||
},
|
||||
"loadbalancer": {
|
||||
"type": "OS::Neutron::LBaaS::LoadBalancer",
|
||||
"properties": {
|
||||
"vip_subnet": {
|
||||
"get_param": "Subnet"
|
||||
},
|
||||
"provider": "haproxy",
|
||||
"vip_address": {
|
||||
"get_param": "vip_ip"
|
||||
},
|
||||
"description": {
|
||||
"get_param": "service_chain_metadata"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,6 +34,7 @@ function prepare_nfp_devstack {
|
|||
sudo cp $CONTRIB_DIR/devstack/local-nfp.conf $TOP_DIR/local.conf
|
||||
sudo rm -rf $TOP_DIR/exercises/*.sh
|
||||
sudo cp $CONTRIB_DIR/devstack/exercises-nfp/*.sh $TOP_DIR/exercises/
|
||||
#sudo cp $CONTRIB_DIR/devstack/exercises-nfp/lb.sh $TOP_DIR/exercises/
|
||||
sudo cp -r $CONTRIB_DIR/devstack/nfp-templates $TOP_DIR
|
||||
sudo cp $CONTRIB_DIR/devstack/nfp $TOP_DIR/lib/
|
||||
sed -i 's/source $TOP_DIR\/lib\/dstat/source $TOP_DIR\/lib\/dstat\nsource $TOP_DIR\/lib\/nfp/g' stack.sh
|
||||
|
|
Loading…
Reference in New Issue