summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-12-02 19:37:35 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-02 19:37:35 +0000
commitd6a4e5259f7af3ff23255dd382c93f988c53729d (patch)
tree93dc727b6a1334c20c429457eb92301d311f3016
parent159f6368364792b8cb9e960e7cbb73ea1784dc15 (diff)
parent72f30f98de111e9f10a58829b78e51e80a5a52a5 (diff)
Merge "Adding a release RPM"
-rw-r--r--build/Makefile26
-rw-r--r--build/rpm_specs/opnfv-apex-release.spec30
-rwxr-xr-xci/build.sh12
-rw-r--r--config/yum.repos.d/opnfv-apex.repo6
-rw-r--r--docs/installationprocedure/baremetal.rst38
-rw-r--r--docs/releasenotes/release-notes.rst1
6 files changed, 99 insertions, 14 deletions
diff --git a/build/Makefile b/build/Makefile
index ff615a47..88a6e962 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -32,7 +32,9 @@ export NETVPP_REPO := $(shell awk -F\= '/^netvpp_repo/ {print $$2}' variables.sh
export NETVPP_BRANCH := $(shell awk -F\= '/^netvpp_branch/ {print $$2}' variables.sh )
export NETVPP_COMMIT := $(shell git ls-remote $(NETVPP_REPO) $(NETVPP_BRANCH) | awk '{print substr($$1,1,7)}')
+export RELRPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex-release.spec | head -n 1 | awk '{ print $$2 }')
export RPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex.spec | head -n 1 | awk '{ print $$2 }')
+export RPMREL = $(shell pwd)/noarch/opnfv-apex-release-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMCOM = $(shell pwd)/noarch/opnfv-apex-common-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMUDR = $(shell pwd)/noarch/opnfv-apex-undercloud-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMODL = $(shell pwd)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
@@ -55,13 +57,33 @@ images-clean: undercloud-clean overcloud-full-clean overcloud-opendaylight-clean
rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
.PHONY: rpms-check
-rpms-check: common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
+rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
.PHONY: rpms-clean
-rpms-clean: common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean
+rpms-clean: release-rpm-clean common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean
rm -rf noarch
rm -rf BUILDROOT
+opnfv-apex-release.tar.gz:
+ pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-release-$(RELRPMVERS)/ HEAD > build/opnfv-apex-release.tar.gz
+
+.PHONY: release-rpm-check
+release-rpm-check: opnfv-apex-release.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-release.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 $(RELEASE) | tr -d '_-')"
+
+.PHONY: release-rpm
+release-rpm: opnfv-apex-release.tar.gz $(RPMREL)
+
+$(RPMREL):
+ @echo "Building the Apex Release RPM"
+ # build the release RPM
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-release.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 $(RELEASE) | tr -d '_-')"
+
+.PHONY: release-rpm-clean
+release-rpm-clean:
+ rm -rf opnfv-apex-release-$(RPMVERS)
+ rm -rf opnfv-apex-release.tar.gz
+
opnfv-apex-common.tar.gz:
pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-common-$(RPMVERS)/ HEAD > build/opnfv-apex-common.tar.gz
diff --git a/build/rpm_specs/opnfv-apex-release.spec b/build/rpm_specs/opnfv-apex-release.spec
new file mode 100644
index 00000000..7dd43d93
--- /dev/null
+++ b/build/rpm_specs/opnfv-apex-release.spec
@@ -0,0 +1,30 @@
+Name: opnfv-apex-release
+Version: danube
+Release: %{release}
+Summary: RPM Release file
+
+Group: System Environment
+License: Apache 2.0
+URL: https://gerrit.opnfv.org/gerrit/apex.git
+Source0: opnfv-apex-release.tar.gz
+
+BuildArch: noarch
+Requires: rdo-release = newton epel-release libvirt-python
+
+%description
+RPM Release file that provides a yum repo file to install OPNFV Apex
+
+%prep
+%setup -q
+
+%install
+mkdir -p %{buildroot}%{_sysconfdir}/yum.repos.d/
+install config/yum.repos.d/opnfv-apex.repo %{buildroot}%{_sysconfdir}/yum.repos.d/
+
+%files
+%defattr(644, root, root, -)
+%{_sysconfdir}/yum.repos.d/opnfv-apex.repo
+
+%changelog
+* Wed Nov 23 2016 Dan Radez <dradez@redhat.com> - 3.0-1
+- Initial Packaging
diff --git a/ci/build.sh b/ci/build.sh
index f1333ce4..1b66d557 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -36,6 +36,7 @@ CACHE_DIR="cache"
CACHE_NAME="apex-cache"
MAKE_TARGETS="images"
REQUIRED_PKGS="rpm-build python-docutils"
+RELEASE_RPM=""
parse_cmdline() {
while [ "${1:0:1}" = "-" ]
@@ -63,6 +64,11 @@ parse_cmdline() {
echo "Buiding opnfv-apex RPMs"
shift 1
;;
+ --release-rpm )
+ RELEASE_RPM=" release-rpm"
+ echo "Buiding opnfv-apex RPMs"
+ shift 1
+ ;;
--debug )
debug="TRUE"
echo "Enable debug output"
@@ -83,6 +89,9 @@ run_make() {
parse_cmdline "$@"
+# Add release rpm to make targets if defined
+MAKE_TARGETS+=$RELEASE_RPM
+
# Install build dependencies
for pkg in $REQUIRED_PKGS; do
if ! rpm -q $pkg > /dev/null; then
@@ -123,6 +132,9 @@ if [[ "$MAKE_TARGETS" == "images" ]]; then
if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-undercloud.spec* ]]; then
MAKE_TARGETS+=" undercloud-rpm-check"
fi
+ if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-release.spec* ]]; then
+ MAKE_TARGETS+=" release-rpm-check"
+ fi
if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-common.spec* ]]; then
MAKE_TARGETS+=" common-rpm-check"
fi
diff --git a/config/yum.repos.d/opnfv-apex.repo b/config/yum.repos.d/opnfv-apex.repo
new file mode 100644
index 00000000..aff09420
--- /dev/null
+++ b/config/yum.repos.d/opnfv-apex.repo
@@ -0,0 +1,6 @@
+[opnfv-apex]
+name=OPNFV Apex Danube
+baseurl=http://artifacts.opnfv.org/apex/danube/yumrepo/
+failovermethod=priority
+enabled=1
+gpgcheck=0
diff --git a/docs/installationprocedure/baremetal.rst b/docs/installationprocedure/baremetal.rst
index 878a49d7..2c231b60 100644
--- a/docs/installationprocedure/baremetal.rst
+++ b/docs/installationprocedure/baremetal.rst
@@ -94,9 +94,10 @@ Install Bare Metal Jumphost
support is completed.
1b. If your Jump host already has CentOS 7 with libvirt running on it then
- install the install the RDO Release RPM:
+ install the install the RDO Newton Release RPM and epel-release:
- ``sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm``
+ ``sudo yum install https://repos.fedorapeople.org/repos/openstack/openstack-newton/rdo-release-newton-4.noarch.rpm``
+ ``sudo yum install epel-release``
The RDO Project release repository is needed to install OpenVSwitch, which
is a dependency of opnfv-apex. If you do not have external connectivity to
@@ -113,11 +114,26 @@ Install Bare Metal Jumphost
the USB device as the boot media on your Jumphost
2b. If your Jump host already has CentOS 7 with libvirt running on it then
- install the opnfv-apex RPMs from the OPNFV artifacts site
- <http://artifacts.opnfv.org/apex.html>. The following RPMS are available
- for installation:
+ install the opnfv-apex RPMs using the OPNFV artifacts yum repo. This yum
+ repo is created at release. It will not exist before release day.
+
+ ``sudo yum install http://artifacts.opnfv.org/apex/danube/opnfv-apex-release-danube.noarch.rpm``
+
+ Once you have installed the repo definitions for Apex, RDO and EPEL then
+ yum install Apex:
+
+ ``sudo yum install opnfv-apex``
- - opnfv-apex - OpenDaylight L2 / L3 and ONOS support *
+ If ONOS will be used, install the ONOS rpm instead of the opnfv-apex rpm.
+
+ ``sudo yum install opnfv-apex-onos``
+
+2c. If you choose not to use the Apex yum repo or you choose to use
+ pre-released RPMs you can download and install the required RPMs from the
+ artifacts site <http://artifacts.opnfv.org/apex.html>. The following RPMs
+ are available for installation:
+
+ - opnfv-apex - OpenDaylight L2 / L3 and ODL SFC support *
- opnfv-apex-onos - ONOS support *
- opnfv-apex-undercloud - (reqed) Undercloud Image
- opnfv-apex-common - (reqed) Supporting config files and scripts
@@ -136,20 +152,18 @@ Install Bare Metal Jumphost
no longer carry them and they will not need special handling for
installation.
- Python 3.4 is also required and it needs to be installed if you are using
- the Centos 7 base image:
+ The EPEL and RDO yum repos are still required:
``sudo yum install epel-release``
- ``sudo yum install python34``
+ ``sudo yum install https://repos.fedorapeople.org/repos/openstack/openstack-newton/rdo-release-newton-4.noarch.rpm``
- To install these RPMs download them to the local disk on your CentOS 7
- install and pass the file names directly to yum:
+ Once the apex RPMs are downloaded install them by passing the file namesi
+ directly to yum:
``sudo yum install python34-markupsafe-<version>.rpm
python3-jinja2-<version>.rpm python3-ipmi-<version>.rpm``
``sudo yum install opnfv-apex-<version>.rpm
opnfv-apex-undercloud-<version>.rpm opnfv-apex-common-<version>.rpm``
-
3. After the operating system and the opnfv-apex RPMs are installed, login to
your Jumphost as root.
diff --git a/docs/releasenotes/release-notes.rst b/docs/releasenotes/release-notes.rst
index f873d835..3e6e0aac 100644
--- a/docs/releasenotes/release-notes.rst
+++ b/docs/releasenotes/release-notes.rst
@@ -222,6 +222,7 @@ Deliverables
Software Deliverables
~~~~~~~~~~~~~~~~~~~~~
- Apex .iso file
+- Apex release .rpm (opnfv-apex-release)
- Apex overcloud .rpm (opnfv-apex) - For nosdn and OpenDaylight Scenarios
- Apex overcloud onos .rpm (opnfv-apex-onos) - ONOS Scenarios
- Apex undercloud .rpm (opnfv-apex-undercloud)