summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile38
-rwxr-xr-xbuild/instack.sh16
-rw-r--r--build/opnfv-apex.spec16
3 files changed, 40 insertions, 30 deletions
diff --git a/build/Makefile b/build/Makefile
index c2ceea95..2c7e3e2e 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -23,7 +23,8 @@ export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
export PRODNO = "OPNFV_BGS"
export REVSTATE = "0000"
export NEWISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${REVSTATE}.iso
-export APEXRPM = $(shell pwd)/noarch/opnfv-apex-2.0-$(shell echo ${REVSTATE} | tr -d '_-').noarch.rpm
+export RPMVERS = $(shell grep Version $(shell pwd)/opnfv-apex.spec | awk '{ print $$2 }')
+export APEXRPM = $(shell pwd)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${REVSTATE} | tr -d '_-').noarch.rpm
# Note! Invoke with "make REVSTATE=RXXXX all" to make release build!
# Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
@@ -97,25 +98,26 @@ rpm-clean:
.PHONY: rpm
rpm:
- pushd ../ && git archive --format=tar --prefix=opnfv-apex-2.0/ HEAD > build/opnfv-apex.tar
- tar -u --xform="s:instack.qcow2:opnfv-apex-2.0/build/instack.qcow2:" --file=opnfv-apex.tar instack.qcow2
- tar -u --xform="s:instack.xml:opnfv-apex-2.0/build/instack.xml:" --file=opnfv-apex.tar instack.xml
+ pushd ../ && git archive --format=tar --prefix=opnfv-apex-$(RPMVERS)/ HEAD > build/opnfv-apex.tar
+ tar -u --xform="s:instack.qcow2:opnfv-apex-$(RPMVERS)/build/instack.qcow2:" --file=opnfv-apex.tar instack.qcow2
+ tar -u --xform="s:instack.xml:opnfv-apex-$(RPMVERS)/build/instack.xml:" --file=opnfv-apex.tar instack.xml
qemu-img create -f qcow2 baremetalbrbm_0.qcow2 40G
- tar -u --xform="s:baremetalbrbm_0.qcow2:opnfv-apex-2.0/build/baremetalbrbm_0.qcow2:" --file=opnfv-apex.tar baremetalbrbm_0.qcow2
- tar -u --xform="s:baremetalbrbm_0.xml:opnfv-apex-2.0/build/baremetalbrbm_0.xml:" --file=opnfv-apex.tar baremetalbrbm_0.xml
+ tar -u --xform="s:baremetalbrbm_0.qcow2:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_0.qcow2:" --file=opnfv-apex.tar baremetalbrbm_0.qcow2
+ tar -u --xform="s:baremetalbrbm_0.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_0.xml:" --file=opnfv-apex.tar baremetalbrbm_0.xml
qemu-img create -f qcow2 baremetalbrbm_1.qcow2 40G
- tar -u --xform="s:baremetalbrbm_1.qcow2:opnfv-apex-2.0/build/baremetalbrbm_1.qcow2:" --file=opnfv-apex.tar baremetalbrbm_1.qcow2
- tar -u --xform="s:baremetalbrbm_1.xml:opnfv-apex-2.0/build/baremetalbrbm_1.xml:" --file=opnfv-apex.tar baremetalbrbm_1.xml
- tar -u --xform="s:brbm.xml:opnfv-apex-2.0/build/brbm.xml:" --file=opnfv-apex.tar brbm.xml
- tar -u --xform="s:instackenv-virt.json:opnfv-apex-2.0/build/instackenv-virt.json:" --file=opnfv-apex.tar instackenv-virt.json
- tar -u --xform="s:stack/deploy-ramdisk-ironic.initramfs:opnfv-apex-2.0/build/stack/deploy-ramdisk-ironic.initramfs:" --file=opnfv-apex.tar stack/deploy-ramdisk-ironic.initramfs
- tar -u --xform="s:stack/deploy-ramdisk-ironic.kernel:opnfv-apex-2.0/build/stack/deploy-ramdisk-ironic.kernel:" --file=opnfv-apex.tar stack/deploy-ramdisk-ironic.kernel
- tar -u --xform="s:stack/ironic-python-agent.initramfs:opnfv-apex-2.0/build/stack/ironic-python-agent.initramfs:" --file=opnfv-apex.tar stack/ironic-python-agent.initramfs
- tar -u --xform="s:stack/ironic-python-agent.kernel:opnfv-apex-2.0/build/stack/ironic-python-agent.kernel:" --file=opnfv-apex.tar stack/ironic-python-agent.kernel
- tar -u --xform="s:stack/ironic-python-agent.vmlinuz:opnfv-apex-2.0/build/stack/ironic-python-agent.vmlinuz:" --file=opnfv-apex.tar stack/ironic-python-agent.vmlinuz
- tar -u --xform="s:stack/overcloud-full.initrd:opnfv-apex-2.0/build/stack/overcloud-full.initrd:" --file=opnfv-apex.tar stack/overcloud-full.initrd
- tar -u --xform="s:stack/overcloud-full.qcow2:opnfv-apex-2.0/build/stack/overcloud-full.qcow2:" --file=opnfv-apex.tar stack/overcloud-full.qcow2
- tar -u --xform="s:stack/overcloud-full.vmlinuz:opnfv-apex-2.0/build/stack/overcloud-full.vmlinuz:" --file=opnfv-apex.tar stack/overcloud-full.vmlinuz
+ tar -u --xform="s:baremetalbrbm_1.qcow2:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_1.qcow2:" --file=opnfv-apex.tar baremetalbrbm_1.qcow2
+ tar -u --xform="s:baremetalbrbm_1.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_1.xml:" --file=opnfv-apex.tar baremetalbrbm_1.xml
+ tar -u --xform="s:brbm-net.xml:opnfv-apex-$(RPMVERS)/build/brbm-net.xml:" --file=opnfv-apex.tar brbm-net.xml
+ tar -u --xform="s:default-pool.xml:opnfv-apex-$(RPMVERS)/build/default-pool.xml:" --file=opnfv-apex.tar default-pool.xml
+ tar -u --xform="s:instackenv-virt.json:opnfv-apex-$(RPMVERS)/build/instackenv-virt.json:" --file=opnfv-apex.tar instackenv-virt.json
+ tar -u --xform="s:stack/deploy-ramdisk-ironic.initramfs:opnfv-apex-$(RPMVERS)/build/stack/deploy-ramdisk-ironic.initramfs:" --file=opnfv-apex.tar stack/deploy-ramdisk-ironic.initramfs
+ tar -u --xform="s:stack/deploy-ramdisk-ironic.kernel:opnfv-apex-$(RPMVERS)/build/stack/deploy-ramdisk-ironic.kernel:" --file=opnfv-apex.tar stack/deploy-ramdisk-ironic.kernel
+ tar -u --xform="s:stack/ironic-python-agent.initramfs:opnfv-apex-$(RPMVERS)/build/stack/ironic-python-agent.initramfs:" --file=opnfv-apex.tar stack/ironic-python-agent.initramfs
+ tar -u --xform="s:stack/ironic-python-agent.kernel:opnfv-apex-$(RPMVERS)/build/stack/ironic-python-agent.kernel:" --file=opnfv-apex.tar stack/ironic-python-agent.kernel
+ tar -u --xform="s:stack/ironic-python-agent.vmlinuz:opnfv-apex-$(RPMVERS)/build/stack/ironic-python-agent.vmlinuz:" --file=opnfv-apex.tar stack/ironic-python-agent.vmlinuz
+ tar -u --xform="s:stack/overcloud-full.initrd:opnfv-apex-$(RPMVERS)/build/stack/overcloud-full.initrd:" --file=opnfv-apex.tar stack/overcloud-full.initrd
+ tar -u --xform="s:stack/overcloud-full.qcow2:opnfv-apex-$(RPMVERS)/build/stack/overcloud-full.qcow2:" --file=opnfv-apex.tar stack/overcloud-full.qcow2
+ tar -u --xform="s:stack/overcloud-full.vmlinuz:opnfv-apex-$(RPMVERS)/build/stack/overcloud-full.vmlinuz:" --file=opnfv-apex.tar stack/overcloud-full.vmlinuz
gzip -f opnfv-apex.tar
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 '_-')"
diff --git a/build/instack.sh b/build/instack.sh
index 0cc09582..c19ab0fd 100755
--- a/build/instack.sh
+++ b/build/instack.sh
@@ -149,12 +149,13 @@ if virsh list | grep instack > /dev/null; then
exit 1
fi
-echo "\nCopying instack disk image and starting instack VM."
+echo $'\nGenerating libvirt configuration'
virsh dumpxml baremetalbrbm_0 > baremetalbrbm_0.xml
virsh dumpxml baremetalbrbm_1 > baremetalbrbm_1.xml
virsh dumpxml instack > instack.xml
#virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml
-virsh net-dumpxml brbm > brbm.xml
+virsh net-dumpxml brbm > brbm-net.xml
+virsh pool-dumpxml default > default-pool.xml
EOI
# copy off the instack artifacts
@@ -162,12 +163,13 @@ echo "Copying instack files to build directory"
scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_0.xml .
scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_1.xml .
scp ${SSH_OPTIONS[@]} stack@localhost:instack.xml .
-scp ${SSH_OPTIONS[@]} stack@localhost:brbm.xml .
+scp ${SSH_OPTIONS[@]} stack@localhost:brbm-net.xml .
+scp ${SSH_OPTIONS[@]} stack@localhost:default-pool.xml .
-sudo cp /var/lib/libvirt/images/instack.qcow2 ./instack.qcow2_
-sudo chown $(whoami):$(whoami) ./instack.qcow2_
-virt-sparsify --check-tmpdir=fail ./instack.qcow2_ ./instack.qcow2
-rm -f ./instack.qcow2_
+sudo cp /var/lib/libvirt/images/instack.qcow2 ./instack.qcow2
+#sudo chown $(whoami):$(whoami) ./instack.qcow2_
+#virt-sparsify --check-tmpdir=fail ./instack.qcow2_ ./instack.qcow2
+#rm -f ./instack.qcow2_
# pull down the the built images
echo "Copying overcloud resources"
diff --git a/build/opnfv-apex.spec b/build/opnfv-apex.spec
index 23d4abc1..b0c1fa5d 100644
--- a/build/opnfv-apex.spec
+++ b/build/opnfv-apex.spec
@@ -1,5 +1,5 @@
Name: opnfv-apex
-Version: 2.0
+Version: 2.1
Release: %{release}
Summary: RDO Manager disk images for deployment
@@ -25,7 +25,8 @@ to deploy an OpenStack overcloud.
%install
mkdir -p %{buildroot}%{_bindir}/
-cp ci/deploy.sh %{buildroot}%{_bindir}/
+cp ci/deploy.sh %{buildroot}%{_bindir}/opnfv-deploy
+cp ci/clean.sh %{buildroot}%{_bindir}/opnfv-clean
mkdir -p %{buildroot}%{_var}/opt/opnfv/stack/
@@ -33,7 +34,8 @@ cp build/instack.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
cp build/instack.xml %{buildroot}%{_var}/opt/opnfv/
cp build/baremetalbrbm_0.xml %{buildroot}%{_var}/opt/opnfv/
cp build/baremetalbrbm_1.xml %{buildroot}%{_var}/opt/opnfv/
-cp build/brbm.xml %{buildroot}%{_var}/opt/opnfv/
+cp build/brbm-net.xml %{buildroot}%{_var}/opt/opnfv/
+cp build/default-pool.xml %{buildroot}%{_var}/opt/opnfv/
cp build/instackenv-virt.json %{buildroot}%{_var}/opt/opnfv/
cp build/stack/deploy-ramdisk-ironic.initramfs %{buildroot}%{_var}/opt/opnfv/stack/
@@ -46,12 +48,14 @@ cp build/stack/overcloud-full.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
cp build/stack/overcloud-full.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
%files
-%{_bindir}/deploy.sh
+%{_bindir}/opnfv-deploy
+%{_bindir}/opnfv-clean
%{_var}/opt/opnfv/stack/instack.qcow2
%{_var}/opt/opnfv/instack.xml
%{_var}/opt/opnfv/baremetalbrbm_0.xml
%{_var}/opt/opnfv/baremetalbrbm_1.xml
-%{_var}/opt/opnfv/brbm.xml
+%{_var}/opt/opnfv/brbm-net.xml
+%{_var}/opt/opnfv/default-pool.xml
%{_var}/opt/opnfv/instackenv-virt.json
%{_var}/opt/opnfv/stack/deploy-ramdisk-ironic.initramfs
%{_var}/opt/opnfv/stack/deploy-ramdisk-ironic.kernel
@@ -63,6 +67,8 @@ cp build/stack/overcloud-full.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
%{_var}/opt/opnfv/stack/overcloud-full.vmlinuz
%changelog
+* Wed Oct 21 2015 Dan Radez <dradez@redhatcom> - 2.1-1
+- Initial deployment success using RPM packaging
* Fri Sep 25 2015 Dan Radez <dradez@redhatcom> - 2.0-1
- Migrated to RDO Manager
* Fri Apr 24 2015 Dan Radez <dradez@redhatcom> - 0.1-1