summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2015-10-09 10:29:44 -0400
committerDan Radez <dradez@redhat.com>2015-10-14 23:00:54 -0400
commit9cb33fba16cce5990e6412db6024168f44698435 (patch)
tree5d1bf66fa539cedd41b5d1122e2f1bc36554b1b8
parent040e68b1ae46004ab832e40bb9d46ed27751b96f (diff)
using rdo project glance images
Change-Id: I61cd1ff95c0940dcc5ef7d8dfcab507c5609b072 Signed-off-by: Dan Radez <dradez@redhat.com>
-rw-r--r--build/Makefile17
-rw-r--r--build/cache.mk8
-rwxr-xr-xbuild/instack.sh32
-rw-r--r--build/opnfv-apex.spec21
4 files changed, 44 insertions, 34 deletions
diff --git a/build/Makefile b/build/Makefile
index 67d0f632..38099089 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -21,9 +21,9 @@ export CENTDNLD = http://mirrors.cat.pdx.edu/centos/7.1.1503/isos/x86_64/CentOS-
export ISOSRC = file:$(shell pwd)/CentOS-7-x86_64-DVD-1503-01.iso
export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
export PRODNO = "OPNFV_BGS"
-export REVSTATE = "P0000"
+export REVSTATE = "0000"
export NEWISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${REVSTATE}.iso
-export APEXRPM = $(shell pwd)/x86_64/opnfv-apex-2.0-1.x86_64.rpm
+export APEXRPM = $(shell pwd)/noarch/opnfv-apex-2.0-$(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.
@@ -110,15 +110,14 @@ rpm:
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/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:stack/fedora-user.qcow2:opnfv-apex-2.0/build/stack/fedora-user.qcow2:" --file=opnfv-apex.tar stack/fedora-user.qcow2
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`)'
+ 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 '_-')"
.PHONY: instack
instack: instack.qcow2
@@ -138,10 +137,8 @@ instack-clean:
.PHONY: iso
iso: build-clean instack.qcow2 rpm $(ISOCACHE)
- @make mount-centiso
@mkdir centos release
- cp -r $(CENTDIR)/* centos
- @make umount-centiso
+ cd centos && bsdtar -xf ../$(shell basename $(ISOSRC))
# modify the installer iso's contents
@cp -f isolinux.cfg centos/isolinux/isolinux.cfg
@cp $(APEXRPM) centos/Packages
diff --git a/build/cache.mk b/build/cache.mk
index 28495a9d..29a7c252 100644
--- a/build/cache.mk
+++ b/build/cache.mk
@@ -16,6 +16,14 @@ CACHECLEAN := $(addsuffix .clean,$(CACHEFILES) $(CACHEDIRS))
# BEGIN of variables to customize
#
CACHEFILES += .versions
+CACHEFILES += stack/deploy-ramdisk-ironic.initramfs
+CACHEFILES += stack/deploy-ramdisk-ironic.kernel
+CACHEFILES += stack/ironic-python-agent.initramfs
+CACHEFILES += stack/ironic-python-agent.kernel
+CACHEFILES += stack/ironic-python-agent.vmlinuz
+CACHEFILES += stack/overcloud-full.initrd
+CACHEFILES += stack/overcloud-full.qcow2
+CACHEFILES += stack/overcloud-full.vmlinuz
CACHEFILES += $(shell basename $(ISOSRC))
#
# END of variables to customize
diff --git a/build/instack.sh b/build/instack.sh
index a00d9ee7..7d20b76d 100755
--- a/build/instack.sh
+++ b/build/instack.sh
@@ -111,10 +111,11 @@ if ! rpm -q epel-release > /dev/null; then
yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
fi
+yum -y install yum-plugin-priorities
curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7-liberty/current-passed-ci/delorean.repo
curl -o /etc/yum.repos.d/delorean-current.repo http://trunk.rdoproject.org/centos7-liberty/current/delorean.repo
sed -i 's/\\[delorean\\]/\\[delorean-current\\]/' /etc/yum.repos.d/delorean-current.repo
-echo "\\nincludepkgs=diskimage-builder,openstack-heat,instack,instack-undercloud,openstack-ironic,openstack-ironic-inspector,os-cloud-config,python-ironic-inspector-client,python-tripleoclient,tripleo-common,openstack-tripleo-heat-templates,openstack-tripleo-image-elements,openstack-tripleo-puppet-elements,openstack-tuskar-ui-extras,openstack-puppet-modules" >> /etc/yum.repos.d/delorean-current.repo
+echo $'\nincludepkgs=diskimage-builder,openstack-heat,instack,instack-undercloud,openstack-ironic,openstack-ironic-inspector,os-cloud-config,python-ironic-inspector-client,python-tripleoclient,tripleo-common,openstack-tripleo-heat-templates,openstack-tripleo-image-elements,openstack-tripleo-puppet-elements,openstack-tuskar-ui-extras,openstack-puppet-modules' >> /etc/yum.repos.d/delorean-current.repo
curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7-liberty/delorean-deps.repo
yum install -y python-tripleoclient
cp /root/.ssh/authorized_keys /home/stack/.ssh/authorized_keys
@@ -182,24 +183,29 @@ echo "Copying CentOS Cache to instack VM"
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "mkdir .cache"
ssh -T ${SSH_OPTIONS[@]} stack@localhost "scp -r ${SSH_OPTIONS[@]} /home/stack/.cache/image-create/CentOS-7-x86_64-GenericCloud* \"stack@$UNDERCLOUD\":.cache/"
+### Commented this out for now we'll download the RDO prebuilt ones
+### but leaving this here so we can have the option in the future
# build the overcloud images
-echo "Building overcloud images"
-ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-set -e
-export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean.repo /etc/yum.repos.d/delorean-current.repo /etc/yum.repos.d/delorean-deps.repo"
-openstack overcloud image build --all
-EOI
-
-# copy off the built images
-echo "Copying overcloud images"
+#echo "Building overcloud images"
+#ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+#set -e
+#export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean.repo /etc/yum.repos.d/delorean-current.repo /etc/yum.repos.d/delorean-deps.repo"
+#openstack overcloud image build --all
+#EOI
+
+# pull down the the built images
+echo "Copying overcloud resources"
if [ ! -d stack ]; then mkdir stack; fi
+scp ${SSH_OPTIONS[@]} stack@$UNDERCLOUD:instackenv.json stack/instackenv.json
IMAGES="deploy-ramdisk-ironic.initramfs deploy-ramdisk-ironic.kernel"
-#IMAGES+=" ironic-python-agent.initramfs ironic-python-agent.kernel ironic-python-agent.vmlinuz"
+IMAGES+=" ironic-python-agent.initramfs ironic-python-agent.kernel ironic-python-agent.vmlinuz"
IMAGES+=" overcloud-full.initrd overcloud-full.qcow2 overcloud-full.vmlinuz"
-IMAGES+=" fedora-user.qcow2 instackenv.json"
for i in $IMAGES; do
-scp ${SSH_OPTIONS[@]} stack@$UNDERCLOUD:$i stack/
+ # download prebuilt images from RDO Project
+ curl https://repos.fedorapeople.org/repos/openstack-m/rdo-images-centos-liberty/$i -z stack/$i -o stack/$i --verbose --silent --location
+# used for building the images
+#scp ${SSH_OPTIONS[@]} stack@$UNDERCLOUD:$i stack/
done
# move and Sanitize private keys from instack.json file
diff --git a/build/opnfv-apex.spec b/build/opnfv-apex.spec
index 0bc663be..9557056e 100644
--- a/build/opnfv-apex.spec
+++ b/build/opnfv-apex.spec
@@ -1,6 +1,6 @@
Name: opnfv-apex
Version: 2.0
-Release: 1
+Release: %{release}
Summary: RDO Manager disk images for deployment
Group: System Environment
@@ -8,8 +8,9 @@ License: Apache 2.0
URL: https://gerrit.opnfv.org/gerrit/apex.git
Source0: opnfv-apex.tar.gz
-#BuildRequires:
-#Requires:
+BuildArch: noarch
+BuildRequires: openvswitch libvirt qemu-kvm
+Requires: openvswitch libvirt qemu-kvm bridge-utils libguestfs-tools
%description
These files are disk images used to launch the instack
@@ -43,13 +44,12 @@ mkdir -p %{buildroot}%{_var}/opt/opnfv/stack/
cp build/instackenv-virt.json %{buildroot}%{_var}/opt/opnfv/
cp build/stack/deploy-ramdisk-ironic.initramfs %{buildroot}%{_var}/opt/opnfv/stack/
cp build/stack/deploy-ramdisk-ironic.kernel %{buildroot}%{_var}/opt/opnfv/stack/
-#cp build/stack/ironic-python-agent.initramfs %{buildroot}/opt/opnfv/stack/
-#cp build/stack/ironic-python-agent.kernel %{buildroot}%{_var}/opt/opnfv/stack/
-#cp build/stack/ironic-python-agent.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
+cp build/stack/ironic-python-agent.initramfs %{buildroot}%{_var}/opt/opnfv/stack/
+cp build/stack/ironic-python-agent.kernel %{buildroot}%{_var}/opt/opnfv/stack/
+cp build/stack/ironic-python-agent.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
cp build/stack/overcloud-full.initrd %{buildroot}%{_var}/opt/opnfv/stack/
cp build/stack/overcloud-full.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
cp build/stack/overcloud-full.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
-cp build/stack/fedora-user.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
%files
%{_bindir}/deploy.sh
@@ -63,13 +63,12 @@ cp build/stack/fedora-user.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
%{_var}/opt/opnfv/instackenv-virt.json
%{_var}/opt/opnfv/stack/deploy-ramdisk-ironic.initramfs
%{_var}/opt/opnfv/stack/deploy-ramdisk-ironic.kernel
-#{_var}/opt/opnfv/stack/ironic-python-agent.initramfs
-#{_var}/opt/opnfv/stack/ironic-python-agent.kernel
-#{_var}/opt/opnfv/stack/ironic-python-agent.vmlinuz
+%{_var}/opt/opnfv/stack/ironic-python-agent.initramfs
+%{_var}/opt/opnfv/stack/ironic-python-agent.kernel
+%{_var}/opt/opnfv/stack/ironic-python-agent.vmlinuz
%{_var}/opt/opnfv/stack/overcloud-full.initrd
%{_var}/opt/opnfv/stack/overcloud-full.qcow2
%{_var}/opt/opnfv/stack/overcloud-full.vmlinuz
-%{_var}/opt/opnfv/stack/fedora-user.qcow2
%changelog
* Fri Sep 25 2015 Dan Radez <dradez@redhatcom> - 2.0-1