Commit 7e96fcaf authored by David Johnson's avatar David Johnson

Bring Cloudlab Capnet scripts up to speed; working; faster.

Lots of little fixes... one important one is to make the Capnet physical
LAN name 'capnetlan-N'... this means our OVS bridge (i.e.,
br-capnetlan-1) has a name < 16 chars, which I believe is the Linux
interface ID limit.

Hopefully this is a pretty complete configuration; debug/verbose modes
enabled by default for all our Neutron stuff (except the minor Nova
plugin... that's not going to be any trouble).  We don't autocreate any
tenant Capnet networks thus far, although we could now that we have the
allpairs workflow app.  Next version.

Since the compile times are so long (have to build protobuf main lib
cause the Ubuntu version is too old for proto-c), we trot out pssh for
some of this.
parent e88b1769
Pipeline #1127 skipped
......@@ -88,8 +88,7 @@ pc.defineParameter("capnetBranch","Capnet: capnet branch",
pc.defineParameter("capnetPluginRepo",
"Capnet: networking-capnet OpenStack Plugin Repo",
portal.ParameterType.STRING,
"http://www.emulab.net/downloads/networking-capnet.tar.gz",
#"https://gitlab.flux.utah.edu/tcloud/networking-capnet.git",
"https://gitlab.flux.utah.edu/tcloud/networking-capnet.git",
longDescription="The networking-capnet Capnet OpenStack Neutron Plugin source code repository")
pc.defineParameter("capnetPluginBranch",
"Capnet: networking-capnet Capnet OpenStack Neutron Plugin branch",
......@@ -438,7 +437,7 @@ for i in range(1,params.vxlanDataLanCount + 1):
ipSubnetsUsed += 1
pass
for i in range(1,params.capnetDataLanCount + 1):
dlanstr = "%s-%d" % ('capnet-physlan',i)
dlanstr = "%s-%d" % ('capnetlan',i)
ipdb[dlanstr] = { 'base' : '10.%d' % (i + dataOffset + ipSubnetsUsed,),'netmask' : '255.255.0.0',
'values' : [-1,-1,10,0] }
capnetlanstrs[i] = dlanstr
......
......@@ -25,8 +25,7 @@ $DIRNAME/setup-ovs-node.sh
##
## Second, however, we do all the Neutron config Capnet needs:
##
NMMGMTIP=`cat /etc/hosts | grep -E " $NETWORKMANAGER$" | head -1 | sed -n -e 's/^\\([0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*\\).*$/\\1/p'`
ML2TYPES=`crudini --get /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers`
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
......@@ -47,6 +46,9 @@ else
ml2 extension_drivers "capnet"
fi
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini DEFAULT interface_driver \
networking_capnet.agent.linux.interface.CapnetOVSInterfaceDriver
crudini --set /etc/neutron/neutron.conf DEFAULT api_extensions_path \
/usr/lib/python2.7/dist-packages/networking_capnet/extensions
......@@ -72,6 +74,16 @@ crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet capnet_networks "$capnet_networks"
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet master_controller_ip $NMMGMTIP
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
DEFAULT verbose True
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
DEFAULT debug True
crudini --set /etc/neutron/neutron.conf DEFAULT verbose True
crudini --set /etc/neutron/neutron.conf DEFAULT debug True
crudini --set /etc/nova/nova-compute.conf DEFAULT compute_driver \
compute_capnet.virt.libvirt.driver.CapnetLibvirtDriver
crudini --set /etc/nova/nova-compute.conf libvirt vif_driver \
......@@ -82,9 +94,14 @@ crudini --set /etc/nova/nova-compute.conf \
crudini --set /etc/nova/nova-compute.conf \
capnet capnet_networks "$capnet_networks"
crudini --set /etc/nova/nova.conf \
DEFAULT network_api_class compute_capnet.network.neutronv2.api.API
##
## Ok, restart Neutron Capnet ML2 plugin
##
service_restart neutron-plugin-capnet-agent
service_enable neutron-plugin-capnet-agent
# Also restart nova-compute to pick up our vif driver.
service_restart nova-compute
......@@ -35,6 +35,9 @@ crudini --set /etc/neutron/neutron.conf DEFAULT core_plugin capnet
#crudini --set /etc/neutron/neutron.conf \
# DEFAULT core_plugin networking_capnet.plugins.ml2.plugin.CapnetMl2Plugin
crudini --set /etc/neutron/neutron.conf DEFAULT api_extensions_path \
/usr/lib/python2.7/dist-packages/networking_capnet/extensions
ML2TYPES=`crudini --get /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers`
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
ml2 type_drivers "capnet,$ML2TYPES"
......@@ -54,14 +57,19 @@ else
ml2 extension_drivers "capnet"
fi
crudini --set /etc/neutron/neutron.conf DEFAULT api_extensions_path \
/usr/lib/python2.7/dist-packages/networking_capnet/extensions
crudini --set /etc/neutron/neutron.conf DEFAULT verbose True
crudini --set /etc/neutron/neutron.conf DEFAULT debug True
##
## Hack the initscript a bit, to add ml2_conf_capnet.ini as a config file.
##
echo 'CONFIG_FILE="/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ml2/ml2_conf_capnet.ini"' >> /etc/default/neutron-server
##
## Also, until we have migrations worked out, install the DB schema.
##
mysql neutron < $OURDIR/capnet/networking-capnet/networking_capnet/db/create.sql
##
## Ok, restart Neutron
##
......
......@@ -23,16 +23,15 @@ OPENMUL_REPO="https://gitlab.flux.utah.edu/tcloud/openmul.git"
OPENMUL_BRANCH="capnet"
CAPNET_REPO="https://gitlab.flux.utah.edu/tcloud/capnet.git"
CAPNET_BRANCH="master"
#CAPNET_PLUGIN_REPO="https://gitlab.flux.utah.edu/tcloud/networking-capnet.git"
CAPNET_PLUGIN_REPO="http://www.emulab.net/downloads/networking-capnet.tar.gz"
CAPNET_PLUGIN_REPO="https://gitlab.flux.utah.edu/tcloud/networking-capnet.git"
CAPNET_PLUGIN_BRANCH="master"
# Grab our libs
. "$DIRNAME/../../setup-lib.sh"
if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
#if [ "$HOSTNAME" != "$CONTROLLER" ]; then
# exit 0;
#fi
if [ -f $SETTINGS ]; then
. $SETTINGS
......
......@@ -47,6 +47,9 @@ else
ml2 extension_drivers "capnet"
fi
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini DEFAULT interface_driver \
networking_capnet.agent.linux.interface.CapnetOVSInterfaceDriver
crudini --set /etc/neutron/neutron.conf DEFAULT api_extensions_path \
/usr/lib/python2.7/dist-packages/networking_capnet/extensions
......@@ -80,9 +83,20 @@ crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet capnet_networks "$capnet_networks"
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet bridge_mappings "$bridge_mappings"
capnet hosts_controllers True
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet capnet_networks "$capnet_networks"
capnet master_controller_ip "$MGMTIP"
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet multi_controller_mode False
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
capnet hosts_workflow_apps True
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
DEFAULT verbose True
crudini --set /etc/neutron/plugins/ml2/ml2_conf_capnet.ini \
DEFAULT debug True
crudini --set /etc/neutron/neutron.conf DEFAULT verbose True
crudini --set /etc/neutron/neutron.conf DEFAULT debug True
crudini --set /etc/neutron/dhcp_agent.ini \
capnet bridge_mappings "$bridge_mappings"
......@@ -92,8 +106,14 @@ crudini --set /etc/neutron/metering_agent.ini \
capnet bridge_mappings "$bridge_mappings"
##
## Ok, restart Neutron Capnet ML2 plugin
## Ok, restart Neutron Capnet ML2 plugin and other Neutron agents.
##
service_restart neutron-plugin-capnet-agent
service_enable neutron-plugin-capnet-agent
service_restart neutron-dhcp-agent
service_restart neutron-l3-agent
service_restart neutron-metadata-agent
service_restart neutron-metering-agent
service_restart neutron-plugin-openvswitch-agent
......@@ -52,15 +52,32 @@ __openstack() {
done
}
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
##
## First, we install Capnet at all of the nodes.
##
$DIRNAME/setup-capnet-install.sh
for node in $COMPUTENODES $NETWORKMANAGER ; do
#$DIRNAME/setup-capnet-install.sh
#for node in $COMPUTENODES $NETWORKMANAGER ; do
# fqdn=`getfqdn $node`
# $SSH $fqdn $DIRNAME/setup-capnet-install.sh
#done
mkdir -p capnet-logs/stdout capnet-logs/stderr
HOSTS=""
fqdn=`getfqdn $CONTROLLER`
HOSTS="$HOSTS -H $fqdn"
fqdn=`getfqdn $NETWORKMANAGER`
HOSTS="$HOSTS -H $fqdn"
#HOSTS="-H $CONTROLLER -H $NETWORKMANAGER "
CPHOSTS=""
for node in $COMPUTENODES ; do
fqdn=`getfqdn $node`
$SSH $fqdn $DIRNAME/setup-capnet-install.sh
CPHOSTS="$CPHOSTS -H $fqdn"
done
$PSSH $HOSTS $CPHOSTS -o capnet-logs/stdout -e capnet-logs/stderr $DIRNAME/setup-capnet-install.sh
##
## Setup the controller node:
##
......@@ -68,16 +85,21 @@ $DIRNAME/setup-capnet-controller.sh
## Setup the networkmanager node:
fqdn=`getfqdn $NETWORKMANAGER`
ssh $fqdn $DIRNAME/setup-capnet-networkmanager.sh
$SSH $fqdn $DIRNAME/setup-capnet-networkmanager.sh
for node in $COMPUTENODES ; do
fqdn=`getfqdn $node`
$SSH $fqdn $DIRNAME/setup-capnet-compute.sh
done
#for node in $COMPUTENODES ; do
# fqdn=`getfqdn $node`
# $SSH $fqdn $DIRNAME/setup-capnet-compute.sh
#done
$PSSH $CPHOSTS -o capnet-logs/stdout -e capnet-logs/stderr $DIRNAME/setup-capnet-compute.sh
##
## Finally, we create initial networks!
##
. $OURDIR/admin-openrc.sh
#. $OURDIR/admin-openrc.sh
echo "Done with Capnet Setup!"
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment