summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-01-27 15:20:07 -0500
committerTim Rozet <trozet@redhat.com>2016-01-27 21:37:20 -0500
commit4a7e1d41a5356f18b900986b06dccd968ab6b6a0 (patch)
tree43e31f987a06de32e5213836e93e8c94647ee4ad
parentcc5578d53c28b80a3a1449b036b714c8647c11ae (diff)
Fixes various bugs and adds some improvements
Changes Include: - Disables introspection. We don't currently use introspection for anything other than to just run it. Disabling it to increase deploy speed and reduce pxeboot issues. - Adds timeout to deploy of 90 minutes. Default heat timeout is 3-4 hours. - Fixes OVS bridge attach/detach for users who use PREFIX in their ifcfg instead of NETMASK - Adds nosdn deploy settings file, and allows nosdn deployments - Adds example inventory file to the docs dir Change-Id: Ic13d6c4d5f27bac25365e5951acdd9bd3e641a15 Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--build/opnfv-apex-common.spec6
-rwxr-xr-xci/deploy.sh15
-rw-r--r--config/deploy/os-nosdn-nofeature-ha.yaml9
-rw-r--r--config/inventory/pod_example_settings.yaml10
-rw-r--r--lib/common-functions.sh28
5 files changed, 53 insertions, 15 deletions
diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec
index 15838c04..752ce2e0 100644
--- a/build/opnfv-apex-common.spec
+++ b/build/opnfv-apex-common.spec
@@ -29,6 +29,7 @@ install ci/deploy.sh %{buildroot}%{_bindir}/opnfv-deploy
install ci/clean.sh %{buildroot}%{_bindir}/opnfv-clean
mkdir -p %{buildroot}%{_sysconfdir}/opnfv-apex/
+install config/deploy/os-nosdn-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
install config/deploy/os-odl_l2-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
install config/deploy/os-odl_l2-sfc-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-ha.yaml
install config/deploy/os-odl_l3-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
@@ -48,6 +49,7 @@ install docs/release-notes/index.rst %{buildroot}%{_docdir}/opnfv/release-notes.
install docs/release-notes.html %{buildroot}%{_docdir}/opnfv/
install config/deploy/deploy_settings.yaml %{buildroot}%{_docdir}/opnfv/deploy_settings.yaml.example
install config/deploy/network/network_settings.yaml %{buildroot}%{_docdir}/opnfv/network_settings.yaml.example
+install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/inventory.yaml.example
%files
%defattr(644, root, root, -)
@@ -55,6 +57,7 @@ install config/deploy/network/network_settings.yaml %{buildroot}%{_docdir}/opnfv
%attr(755,root,root) %{_bindir}/opnfv-clean
%{_var}/opt/opnfv/lib/common-functions.sh
%{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
+%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
@@ -67,8 +70,11 @@ install config/deploy/network/network_settings.yaml %{buildroot}%{_docdir}/opnfv
%doc %{_docdir}/opnfv/release-notes.html
%doc %{_docdir}/opnfv/deploy_settings.yaml.example
%doc %{_docdir}/opnfv/network_settings.yaml.example
+%doc %{_docdir}/opnfv/inventory.yaml.example
%changelog
+* Wed Jan 27 2016 Tim Rozet <trozet@redhat.com> - 2.1-4
+- Adds example inventory file and nosdn scenario
* Wed Jan 20 2016 Dan Radez <dradez@redhat.com> - 2.1-3
- Updating the installation instructions
* Thu Jan 14 2016 Dan Radez <dradez@redhat.com> - 2.1-2
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 507e62aa..d0b8338b 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -796,9 +796,12 @@ function undercloud_prep_overcloud_deploy {
SDN_IMAGE=opendaylight
elif [ ${deploy_options_array['sdn_controller']} == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
+ exit 1
+ elif [[ -z ${deploy_options_array['sdn_controller']} || ${deploy_options_array['sdn_controller']} == 'false' ]]; then
+ echo -e "${blue}INFO: SDN Controller disabled...will deploy nosdn scenario${reset}"
else
echo "${red}Invalid sdn_controller: ${deploy_options_array['sdn_controller']}${reset}"
- echo "${red}Valid choices are opendaylight, opendaylight-external, onos, opencontrail${reset}"
+ echo "${red}Valid choices are opendaylight, opendaylight-external, onos, opencontrail, false, or null${reset}"
exit 1
fi
@@ -837,9 +840,9 @@ openstack overcloud image upload
echo "Configuring undercloud and discovering nodes"
openstack baremetal import --json instackenv.json
openstack baremetal configure boot
-if [[ -z "$virtual" ]]; then
- openstack baremetal introspection bulk start
-fi
+#if [[ -z "$virtual" ]]; then
+# openstack baremetal introspection bulk start
+#fi
echo "Configuring flavors"
for flavor in baremetal control compute; do
echo -e "${blue}INFO: Updating flavor: \${flavor}${reset}"
@@ -860,9 +863,9 @@ echo "Executing overcloud deployment, this should run for an extended period wit
sleep 60 #wait for Hypervisor stats to check-in to nova
# save deploy command so it can be used for debugging
cat > deploy_command << EOF
-openstack overcloud deploy --templates $DEPLOY_OPTIONS
+openstack overcloud deploy --templates $DEPLOY_OPTIONS --timeout 90
EOF
-openstack overcloud deploy --templates $DEPLOY_OPTIONS
+openstack overcloud deploy --templates $DEPLOY_OPTIONS --timeout 90
EOI
if [ "$debug" == 'TRUE' ]; then
diff --git a/config/deploy/os-nosdn-nofeature-ha.yaml b/config/deploy/os-nosdn-nofeature-ha.yaml
new file mode 100644
index 00000000..becd6e57
--- /dev/null
+++ b/config/deploy/os-nosdn-nofeature-ha.yaml
@@ -0,0 +1,9 @@
+global_params:
+ ha_enabled: true
+
+deploy_options:
+ sdn_controller: false
+ sdn_l3: false
+ tacker: false
+ congress: false
+ sfc: false
diff --git a/config/inventory/pod_example_settings.yaml b/config/inventory/pod_example_settings.yaml
index 70fa50e7..55d8fb61 100644
--- a/config/inventory/pod_example_settings.yaml
+++ b/config/inventory/pod_example_settings.yaml
@@ -5,7 +5,7 @@ nodes:
ipmi_user: root
ipmi_pass: root
cpus: 2
- memory: 2048
+ memory: 8192
disk: 40
arch: "x86_64"
capabilities: "profile:control"
@@ -15,7 +15,7 @@ nodes:
ipmi_user: root
ipmi_pass: root
cpus: 2
- memory: 2048
+ memory: 8192
disk: 40
arch: "x86_64"
capabilities: "profile:control"
@@ -25,7 +25,7 @@ nodes:
ipmi_user: root
ipmi_pass: root
cpus: 2
- memory: 2048
+ memory: 8192
disk: 40
arch: "x86_64"
capabilities: "profile:control"
@@ -35,7 +35,7 @@ nodes:
ipmi_user: root
ipmi_pass: root
cpus: 2
- memory: 2048
+ memory: 8192
disk: 40
arch: "x86_64"
capabilities: "profile:compute"
@@ -45,7 +45,7 @@ nodes:
ipmi_user: root
ipmi_pass: root
cpus: 2
- memory: 2048
+ memory: 8192
disk: 40
arch: "x86_64"
capabilities: "profile:compute"
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 1e55aa18..7435411e 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -2,6 +2,15 @@
# Common Functions used by OPNFV Apex
# author: Tim Rozet (trozet@redhat.com)
+##converts subnet mask to prefix
+##params: subnet mask
+function prefix2mask {
+ # Number of args to shift, 255..255, first non-255 byte, zeroes
+ set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
+ [ $1 -gt 1 ] && shift $1 || shift
+ echo ${1-0}.${2-0}.${3-0}.${4-0}
+}
+
##find ip of interface
##params: interface name
function find_ip {
@@ -356,7 +365,7 @@ function generate_floating_ip_range {
##public indicates attaching to a public interface
function attach_interface_to_ovs {
local bridge interface
- local if_ip if_mask if_gw if_file ovs_file
+ local if_ip if_mask if_gw if_file ovs_file if_prefix
if [[ -z "$1" || -z "$2" ]]; then
return 1
@@ -381,8 +390,14 @@ function attach_interface_to_ovs {
return 1
fi
+ if [ -z "$if_mask" ]; then
+ # we can look for PREFIX here, then convert it to NETMASK
+ if_prefix=$(sed -n 's/^PREFIX=\(.*\)$/\1/p' ${if_file})
+ if_mask=$(prefix2mask ${if_prefix})
+ fi
+
if [[ -z "$if_ip" || -z "$if_mask" ]]; then
- echo "ERROR: IPADDR or NETMASK missing for ${interface}"
+ echo "ERROR: IPADDR or NETMASK/PREFIX missing for ${interface}"
return 1
elif [[ -z "$if_gw" && "$3" == "public_network" ]]; then
echo "ERROR: GATEWAY missing for ${interface}, which is public"
@@ -436,7 +451,7 @@ function detach_interface_from_ovs {
local bridge
local port_output ports_no_orig
local net_path
- local if_ip if_mask if_gw
+ local if_ip if_mask if_gw if_prefix
net_path=/etc/sysconfig/network-scripts/
if [[ -z "$1" ]]; then
@@ -462,8 +477,13 @@ function detach_interface_from_ovs {
if_mask=$(sed -n 's/^NETMASK=\(.*\)$/\1/p' ${if_file})
if_gw=$(sed -n 's/^GATEWAY=\(.*\)$/\1/p' ${if_file})
+ if [ -z "$if_mask" ]; then
+ if_prefix=$(sed -n 's/^PREFIX=\(.*\)$/\1/p' ${if_file})
+ if_mask=$(prefix2mask ${if_prefix})
+ fi
+
if [[ -z "$if_ip" || -z "$if_mask" ]]; then
- echo "ERROR: IPADDR or NETMASK missing for ${bridge} and no .orig file for interface ${line}"
+ echo "ERROR: IPADDR or PREFIX/NETMASK missing for ${bridge} and no .orig file for interface ${line}"
return 1
fi