summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/Makefile5
-rwxr-xr-xbuild/instack.sh103
-rw-r--r--build/opnfv-apex-opendaylight-sfc.spec32
-rw-r--r--build/opnfv-apex.spec8
-rwxr-xr-xci/deploy.sh28
5 files changed, 131 insertions, 45 deletions
diff --git a/build/Makefile b/build/Makefile
index b0b895a1..ecfd154f 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -143,8 +143,10 @@ rpm:
nics/compute_private_storage.yaml instackenv-virt.json instackenv.json.example
rpmbuild -ba opnfv-apex-undercloud.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(REVSTATE) | tr -d '_-')"
# build the overcloud RPM
- tar -czf opnfv-apex.tar.gz --xform="s:stack/overcloud-full-odl.qcow2:opnfv-apex-$(RPMVERS)/build/stack/overcloud-full.qcow2:" stack/overcloud-full-odl.qcow2
+ tar -czf opnfv-apex.tar.gz --xform="s:stack/overcloud-full-opendaylight.qcow2:opnfv-apex-$(RPMVERS)/build/stack/overcloud-full-opendaylight.qcow2:" stack/overcloud-full-opendaylight.qcow2
rpmbuild -ba opnfv-apex.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(REVSTATE) | tr -d '_-')"
+ tar -czf opnfv-apex-opendaylight-sfc.tar.gz --xform="s:stack/overcloud-full-opendaylight-sfc.qcow2:opnfv-apex-opendaylight-sfc-$(RPMVERS)/build/stack/overcloud-full-opendaylight-sfc.qcow2:" stack/overcloud-full-opendaylight-sfc.qcow2
+ rpmbuild -ba opnfv-apex-opendaylight-sfc.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(REVSTATE) | tr -d '_-')"
.PHONY: instack
instack:
@@ -159,6 +161,7 @@ instack-clean:
rm -f baremetalbrbm_brbm1_brbm2_brbm3_3.xml
rm -f baremetalbrbm_brbm1_brbm2_brbm3_4.xml
rm -f instack.xml
+ rm -rf stack/onos
.PHONY: iso
iso: build-clean instack rpm $(ISOCACHE)
diff --git a/build/instack.sh b/build/instack.sh
index e0d71d51..d7109c55 100755
--- a/build/instack.sh
+++ b/build/instack.sh
@@ -237,22 +237,49 @@ LIBGUESTFS_BACKEND=direct virt-customize --install $PACKAGES \
popd
-#Adding OpenDaylight to overcloud
pushd stack
+
+##########################################################
+##### Prep initial overcloud image with common deps #####
+##########################################################
+
# make a copy of the cached overcloud-full image
-cp overcloud-full.qcow2 overcloud-full-odl.qcow2
+cp overcloud-full.qcow2 overcloud-full-opendaylight.qcow2
+# Update puppet-aodh it's old
+rm -rf aodh
+git clone https://github.com/openstack/puppet-aodh aodh
+pushd aodh
+git checkout stable/liberty
+popd
+tar -czf puppet-aodh.tar.gz aodh
-#install aodh on overcloud
+# Add epel, aodh and ceph, remove openstack-neutron-openvswitch
AODH_PKG="openstack-aodh-api,openstack-aodh-common,openstack-aodh-compat,openstack-aodh-evaluator,openstack-aodh-expirer"
AODH_PKG+=",openstack-aodh-listener,openstack-aodh-notifier"
-
-# remove unnecessary packages and install necessary packages
-LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y openstack-neutron-openvswitch" \
+LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-aodh.tar.gz:/etc/puppet/modules/ \
+ --run-command "cd /etc/puppet/modules/ && rm -rf aodh && tar xzf puppet-aodh.tar.gz" \
+ --run-command "yum remove -y openstack-neutron-openvswitch" \
--install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
- --upload /etc/yum.repos.d/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
- --install opendaylight,python-networking-odl,ceph \
- --install $AODH_PKG \
- -a overcloud-full-odl.qcow2
+ --install "$AODH_PKG,ceph" \
+ -a overcloud-full-opendaylight.qcow2
+
+###############################################
+##### Adding OpenDaylight to overcloud #####
+###############################################
+
+cat > /tmp/opendaylight.repo << EOF
+[opendaylight]
+name=OpenDaylight \$releasever - \$basearch
+baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-33-release/\$basearch/os/
+enabled=1
+gpgcheck=0
+EOF
+
+# install ODL packages
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
+ --install opendaylight,python-networking-odl \
+ -a overcloud-full-opendaylight.qcow2
## WORK AROUND
## when OpenDaylight lands in upstream RDO manager this can be removed
@@ -264,50 +291,57 @@ pushd puppet-opendaylight
git archive --format=tar.gz --prefix=opendaylight/ HEAD > ../puppet-opendaylight.tar.gz
popd
LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/etc/puppet/modules/ \
- --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" -a overcloud-full-odl.qcow2
+ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \
+ --upload ../opendaylight-puppet-neutron.patch:/tmp \
+ --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \
+ -a overcloud-full-opendaylight.qcow2
# Patch in OpenDaylight installation and configuration
LIBGUESTFS_BACKEND=direct virt-customize --upload ../opnfv-tripleo-heat-templates.patch:/tmp \
--run-command "cd /usr/share/openstack-tripleo-heat-templates/ && patch -Np1 < /tmp/opnfv-tripleo-heat-templates.patch" \
-a instack.qcow2
-LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron.patch:/tmp \
- --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \
- -a overcloud-full-odl.qcow2
# REMOVE ME AFTER Brahmaputra
LIBGUESTFS_BACKEND=direct virt-customize --upload ../puppet-neutron-force-metadata.patch:/tmp \
--run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/puppet-neutron-force-metadata.patch" \
- -a overcloud-full-odl.qcow2
+ -a overcloud-full-opendaylight.qcow2
LIBGUESTFS_BACKEND=direct virt-customize --upload ../puppet-cinder-quota-fix.patch:/tmp \
--run-command "cd /etc/puppet/modules/cinder && patch -Np1 < /tmp/puppet-cinder-quota-fix.patch" \
- -a overcloud-full-odl.qcow2
+ -a overcloud-full-opendaylight.qcow2
# END REMOVE ME AFTER Brahmaputra
-## END WORK AROUND
-popd
+################################################
+##### Adding SFC+OpenDaylight overcloud #####
+################################################
-## WORK AROUND
-## Current package of puppet-aodh is old
+cat > /tmp/opendaylight.repo << EOF
+[opendaylight]
+name=OpenDaylight \$releasever - \$basearch
+baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-testing/\$basearch/os/
+enabled=1
+gpgcheck=0
+EOF
-pushd stack
-rm -rf aodh
-git clone https://github.com/openstack/puppet-aodh aodh
-pushd aodh
-git checkout stable/liberty
-popd
+#copy opendaylight overcloud full to isolate odl-sfc
+cp overcloud-full-opendaylight.qcow2 overcloud-full-opendaylight-sfc.qcow2
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --run-command 'yum update -y https://radez.fedorapeople.org/openvswitch-2.3.90-1.x86_64.rpm https://radez.fedorapeople.org/openvswitch-kmod-2.3.90-1.el7.centos.x86_64.rpm' \
+ --install 'https://radez.fedorapeople.org/kernel-ml-3.13.7-1.el7.centos.x86_64.rpm' \
+ --run-command 'grub2-set-default "\$(grep -P \"submenu|^menuentry\" /boot/grub2/grub.cfg | cut -d \"\\x27\" | head -n 1)"' \
+ --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
+ --run-command "yum update -y opendaylight" \
+ -a overcloud-full-opendaylight-sfc.qcow2
-tar -czf puppet-aodh.tar.gz aodh
-LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-aodh.tar.gz:/etc/puppet/modules/ \
- --run-command "cd /etc/puppet/modules/ && rm -rf aodh && tar xzf puppet-aodh.tar.gz" \
- -a overcloud-full-odl.qcow2
-## END WORK AROUND
-popd
+
+
+###############################################
+##### Adding ONOS to overcloud #####
+###############################################
## WORK AROUND
## when ONOS lands in upstream OPNFV artifacts this can be removed
# upload the onos puppet module
-pushd stack
rm -rf puppet-onos
git clone https://github.com/bobzhouHW/puppet-onos.git
@@ -322,9 +356,10 @@ popd
mv puppet-onos onos
tar -czf puppet-onos.tar.gz onos
LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-onos.tar.gz:/etc/puppet/modules/ \
- --run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" -a overcloud-full-odl.qcow2
+ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" -a overcloud-full-opendaylight.qcow2
## END WORK AROUND
+
popd
# move and Sanitize private keys from instack.json file
diff --git a/build/opnfv-apex-opendaylight-sfc.spec b/build/opnfv-apex-opendaylight-sfc.spec
new file mode 100644
index 00000000..6d980f21
--- /dev/null
+++ b/build/opnfv-apex-opendaylight-sfc.spec
@@ -0,0 +1,32 @@
+Name: opnfv-apex-opendaylight-sfc
+Version: 2.1
+Release: %{release}
+Summary: Overcloud Disk images for OPNFV Apex OpenDaylight with SFC deployment
+
+Group: System Environment
+License: Apache 2.0
+URL: https://gerrit.opnfv.org/gerrit/apex.git
+Source0: opnfv-apex-opendaylight-sfc.tar.gz
+
+Provides: opnfv-apex-sdn
+BuildArch: noarch
+Requires: opnfv-apex-common opnfv-apex-undercloud
+
+%description
+Overcloud Disk images for OPNFV Apex OpenDaylight with SFC deployment
+https://wiki.opnfv.org/apex
+
+%prep
+%setup -q
+
+%install
+mkdir -p %{buildroot}%{_var}/opt/opnfv/stack/
+install build/stack/overcloud-full-opendaylight-sfc.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
+
+%files
+%defattr(644, root, root, -)
+%{_var}/opt/opnfv/stack/overcloud-full-opendaylight-sfc.qcow2
+
+%changelog
+* Tue Jan 19 2016 Dan Radez <dradez@redhat.com> - 2.1-1
+- Initial Packaging
diff --git a/build/opnfv-apex.spec b/build/opnfv-apex.spec
index ebe87897..81b8d656 100644
--- a/build/opnfv-apex.spec
+++ b/build/opnfv-apex.spec
@@ -11,7 +11,6 @@ Source0: opnfv-apex.tar.gz
Provides: opnfv-apex-sdn
BuildArch: noarch
Requires: opnfv-apex-common opnfv-apex-undercloud
-Conflicts: opnfv-apex-onos opnfv-apex-opencontrail
%description
Overcloud Disk images for OPNFV Apex OpenDaylight deployment
@@ -22,13 +21,16 @@ https://wiki.opnfv.org/apex
%install
mkdir -p %{buildroot}%{_var}/opt/opnfv/stack/
-install build/stack/overcloud-full.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
+install build/stack/overcloud-full-opendaylight.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
%files
%defattr(644, root, root, -)
-%{_var}/opt/opnfv/stack/overcloud-full.qcow2
+%{_var}/opt/opnfv/stack/overcloud-full-opendaylight.qcow2
%changelog
+* Tue Jan 19 2016 Dan Radez <dradez@redhat.com> - 2.1-3
+- Remove conflicts with other SDN controllers, they can co-exist now
+- update overcloud image name to specify opendaylight
* Thu Jan 14 2016 Dan Radez <dradez@redhat.com> - 2.1-2
- Package Split
* Wed Jan 13 2016 Dan Radez <dradez@redhat.com> - 2.1-1
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 1ce4e186..5118aea1 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -37,7 +37,6 @@ SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o Us
DEPLOY_OPTIONS=""
RESOURCES=/var/opt/opnfv/stack
CONFIG=/var/opt/opnfv
-INSTACKENV=$CONFIG/instackenv.json
OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network"
# Netmap used to map networks to OVS bridge names
NET_MAP['admin_network']="brbm"
@@ -45,10 +44,6 @@ NET_MAP['private_network']="brbm1"
NET_MAP['public_network']="brbm2"
NET_MAP['storage_network']="brbm3"
-##LIBRARIES
-source $CONFIG/lib/common-functions.sh
-source $CONFIG/lib/installer/onos/onos_gw_mac_update.sh
-
##FUNCTIONS
##translates yaml into variables
##params: filename, prefix (ex. "config_")
@@ -667,8 +662,7 @@ function configure_network_environment {
function configure_undercloud {
echo
- echo "Copying configuration file and disk images to instack"
- scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full.qcow2 "stack@$UNDERCLOUD":
+ echo "Copying configuration files to instack"
if [[ "$net_isolation_enabled" == "TRUE" ]]; then
configure_network_environment $CONFIG/network-environment.yaml
echo -e "${blue}Network Environment set for Deployment: ${reset}"
@@ -777,15 +771,27 @@ function undercloud_prep_overcloud_deploy {
else
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml"
fi
+ SDN_IMAGE=opendaylight
+ if [ ${deploy_options_array['sfc']} == 'true' ]; then
+ SDN_IMAGE+=-sfc
+ fi
elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
+ SDN_IMAGE=opendaylight
elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
+ SDN_IMAGE=opendaylight
elif [ ${deploy_options_array['sdn_controller']} == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
+ else
+ echo "${red}Invalid sdn_controller: ${deploy_options_array['sdn_controller']}${reset}"
+ echo "${red}Valid choices are opendaylight, opendaylight-external, onos, opencontrail${reset}"
exit 1
fi
+ echo "Copying overcloud image to instack"
+ scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2
+
# make sure ceph is installed
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
@@ -818,7 +824,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
echo "Configuring flavors"
for flavor in baremetal control compute; do
echo -e "${blue}INFO: Updating flavor: \${flavor}${reset}"
@@ -1019,6 +1027,12 @@ parse_cmdline() {
echo -e "${blue}INFO: Post Install Configuration will be skipped. It is not supported with --flat${reset}"
post_config="FALSE"
fi
+
+ ##LIBRARIES
+ # Do this after cli parse so that $CONFIG is set properly
+ source $CONFIG/lib/common-functions.sh
+ source $CONFIG/lib/installer/onos/onos_gw_mac_update.sh
+
}
##END FUNCTIONS