summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-01-20 14:43:15 -0500
committerDan Radez <dradez@redhat.com>2016-01-21 21:48:32 -0500
commited90b347e4228477f419a1b483f3997639665fef (patch)
tree46a79e87c7f8f7e001cea1eb6e2d35abe0e264d8 /build
parent4a6d9adfc7f6ea5938b21055acbd059856aaebf2 (diff)
adding SFC overcloud image
JIRA: APEX-46 JIRA: APEX-48 Change-Id: Ic2a0d9035429c5887d10f60febacff63dd2eeb5e
Diffstat (limited to 'build')
-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
4 files changed, 110 insertions, 38 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