summaryrefslogtreecommitdiffstats
path: root/lib/overcloud-deploy-functions.sh
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-08-06 21:55:44 -0400
committerFeng Pan <fpan@redhat.com>2017-08-11 14:58:29 -0400
commit6bfab6c7e79ed029a9102ff7b7955b0a71f13c6d (patch)
tree6c85b73daba19e230c740d68f95db2c654c1171c /lib/overcloud-deploy-functions.sh
parent240fb2eeb9398871e55703f9e62bc7fbb4e01162 (diff)
Add os-odl-fdio-dvr support
apex-tripleo-heat-templates: I6a83c9e2deeb0df9a3ab09a707c9c64aa84da55e apex-puppet-tripleo: I2025e3157b97b376b63002003ca17c7206aba546 JIRA: APEX-466 Change-Id: Iedb75994d35b5dc1dd5d5ce1a57277c8f3729dfd Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'lib/overcloud-deploy-functions.sh')
-rwxr-xr-xlib/overcloud-deploy-functions.sh45
1 files changed, 38 insertions, 7 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 1f25a365..0fe838d0 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -25,6 +25,10 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e ${ENV_FILE}"
DEPLOY_OPTIONS+=" -e network-environment.yaml"
+ # get number of nodes available in inventory
+ num_control_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:control /home/stack/instackenv.json")
+ num_compute_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:compute /home/stack/instackenv.json")
+
# Custom Deploy Environment Templates
if [[ "${#deploy_options_array[@]}" -eq 0 || "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then
if [ "${deploy_options_array['sfc']}" == 'True' ]; then
@@ -37,6 +41,8 @@ function overcloud_deploy {
elif [ "${deploy_options_array['vpp']}" == 'True' ]; then
if [ "${deploy_options_array['odl_vpp_netvirt']}" == "True" ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-netvirt-vpp.yaml"
+ elif [ "${deploy_options_array['odl_vpp_routing_node']}" == "dvr" ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-fdio-dvr.yaml"
else
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml"
fi
@@ -183,13 +189,29 @@ EOI
-a overcloud-full.qcow2
EOI
- # Configure routing node and interface role mapping for odl-fdio
- if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['odl_vpp_routing_node']}" != 'dvr' ]]; then
+ # Configure routing node for odl-fdio
+ if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then
+ if [[ "${deploy_options_array['odl_vpp_routing_node']}" == 'dvr' ]]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/OS::TripleO::Services::NeutronDhcpAgent/d" ${ENV_FILE}
+ sed -i "/NeutronDhcpAgentsPerNetwork:/ c\ NeutronDhcpAgentsPerNetwork: $num_compute_nodes" ${ENV_FILE}
+ sed -i "$ a\ - OS::TripleO::Services::NeutronDhcpAgent" ${ENV_FILE}
+# TODO: Update VPP version to 17.10 when specific version is known
+# LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y vpp-lib" \
+# --run-command "yum install -y /root/fdio_dvr/*.rpm" \
+# --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \
+# -a overcloud-full.qcow2
+EOI
+ else
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/opendaylight::vpp_routing_node:/c\ opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
+EOI
+ fi
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
- sed -i "/opendaylight::vpp_routing_node:/c\ opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
sed -i "/ControllerExtraConfig:/ c\ ControllerExtraConfig:\n tripleo::profile::base::neutron::agents::honeycomb::interface_role_mapping: ['${tenant_nic_mapping_controller_members}:tenant-interface']" ${ENV_FILE}
sed -i "/NovaComputeExtraConfig:/ c\ NovaComputeExtraConfig:\n tripleo::profile::base::neutron::agents::honeycomb::interface_role_mapping: ['${tenant_nic_mapping_compute_members}:tenant-interface','${external_nic_mapping_compute_members}:public-interface']" ${ENV_FILE}
EOI
+
fi
fi
@@ -300,6 +322,19 @@ EOI
# fi
fi
+ # Override ODL if we enable dvr for fdio
+# TODO: Update ODL version when specific version is known.
+# if [[ "${deploy_options_array['odl_vpp_routing_node']}" == 'dvr' ]]; then
+# ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+# LIBGUESTFS_BACKEND=direct virt-customize --run-command "rm -rf /opt/opendaylight/*" \
+# --run-command "tar zxvf /root/fdio_odl_carbon.tar.gz -C /opt/opendaylight/ --strip-components=1" \
+# --run-command "chown odl:odl -R /opt/opendaylight" \
+# -a overcloud-full.qcow2
+#EOI
+# fi
+
+
+
# check if ceph should be enabled
if [ "${deploy_options_array['ceph']}" == 'True' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
@@ -316,10 +351,6 @@ EOI
EOI
fi
- # get number of nodes available in inventory
- num_control_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:control /home/stack/instackenv.json")
- num_compute_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:compute /home/stack/instackenv.json")
-
# check if HA is enabled
if [[ "$ha_enabled" == "True" ]]; then
if [ "$num_control_nodes" -lt 3 ]; then