From ae96bbde9c2a40401929103f66cbf61b8ef2d6cb Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Mon, 31 Aug 2015 14:59:43 -0400 Subject: adding master support for building updating build.sh to use RDO manager ensuring jenkins will build properly Change-Id: Id7660c49650a85958e5ff0153d9b5cc6255cb6ad Signed-off-by: Dan Radez --- build/Makefile | 37 ++--- build/c7-opnfv-x86_64-comps.xml | 292 ++++++++++++++++++++++++++++++++++++++++ build/cache.mk | 2 +- build/instack.sh | 186 +++++++++++++++++++------ build/isolinux.cfg | 120 +++++++++++++++++ build/opnfv-apex.spec | 40 ++++++ ci/build.sh | 20 ++- include/build.sh.debug | 0 8 files changed, 630 insertions(+), 67 deletions(-) create mode 100644 build/c7-opnfv-x86_64-comps.xml create mode 100644 build/isolinux.cfg create mode 100644 build/opnfv-apex.spec create mode 100644 include/build.sh.debug diff --git a/build/Makefile b/build/Makefile index c33c1755..c0086fcf 100644 --- a/build/Makefile +++ b/build/Makefile @@ -15,6 +15,7 @@ SHELL = /bin/bash # #Input args export UNIT_TEST = FALSE +export USE_MASTER = "" export INTERACTIVE = TRUE export CENTDNLD = http://mirrors.cat.pdx.edu/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso export ISOSRC = file:$(shell pwd)/CentOS-7-x86_64-DVD-1503-01.iso @@ -22,7 +23,7 @@ export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC)) export PRODNO = "OPNFV_BGS" export REVSTATE = "P0000" export NEWISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${REVSTATE}.iso -export GENESISRPM = $(shell pwd)/x86_64/opnfv-genesis-0.1-1.x86_64.rpm +export APEXRPM = $(shell pwd)/x86_64/opnfv-apex-2.0-1.x86_64.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. @@ -80,7 +81,7 @@ build-clean: $(SUBCLEAN) @rm -f $(NEWISO) .PHONY: clean $(SUBCLEAN) -clean: clean-cache $(SUBCLEAN) +clean: clean-cache instack-clean $(SUBCLEAN) @rm -f *.iso @rm -Rf release @rm -Rf newiso @@ -92,44 +93,46 @@ $(SUBCLEAN): %.clean: .PHONY: rpm-clean rpm-clean: - rpmbuild --clean opnfv-genesis.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`)' + @rm -f build/opnfv-apex.tar.gz .PHONY: rpm rpm: - pushd ../../ && git archive --format=tar --prefix=opnfv-genesis-0.1/ HEAD | gzip > foreman/build/opnfv-genesis.tar.gz - rpmbuild -ba opnfv-genesis.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`)' - @make rpm-clean + 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 + 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`)' .PHONY: instack instack: instack.qcow2 instack.qcow2: - @./instack.sh + @./instack.sh $(USE_MASTER) .PHONY: instack-clean instack-clean: - @virsh destroy instack 2> /dev/null || echo -n '' - @virsh undefine instack 2> /dev/null || echo -n '' - @virsh destroy baremetal_0 2> /dev/null || echo -n '' - @virsh undefine baremetal_0 2> /dev/null || echo -n '' - @virsh destroy baremetal_1 2> /dev/null || echo -n '' - @virsh undefine baremetal_1 2> /dev/null || echo -n '' + #@virsh destroy instack 2> /dev/null || echo -n '' + #@virsh undefine instack 2> /dev/null || echo -n '' + #@virsh destroy baremetal_0 2> /dev/null || echo -n '' + #@virsh undefine baremetal_0 2> /dev/null || echo -n '' + #@virsh destroy baremetal_1 2> /dev/null || echo -n '' + #@virsh undefine baremetal_1 2> /dev/null || echo -n '' + rm -f instackenv.json + rm -f baremetal_0.xml + rm -f baremetal_1.xml rm -f instack.xml rm -f instack.qcow2 rm -rf stack -# Todo: Make things smarter - we shouldn't need to clean everything -# betwen make invocations. .PHONY: iso -iso: build-clean $(ISOCACHE) instack.qcow2 rpm +iso: build-clean instack.qcow2 rpm $(ISOCACHE) @make mount-centiso @mkdir centos release cp -r $(CENTDIR)/* centos @make umount-centiso # modify the installer iso's contents @cp -f isolinux.cfg centos/isolinux/isolinux.cfg - @cp $(GENESISRPM) centos/Packages + @cp $(APEXRPM) centos/Packages # regenerate yum repo data @echo "Generating new yum metadata" createrepo --update -g ../c7-opnfv-x86_64-comps.xml centos diff --git a/build/c7-opnfv-x86_64-comps.xml b/build/c7-opnfv-x86_64-comps.xml new file mode 100644 index 00000000..53eee655 --- /dev/null +++ b/build/c7-opnfv-x86_64-comps.xml @@ -0,0 +1,292 @@ + + + + + core + Core + Kern + ማዕከላዊ ቦታ + اللبّ + ভিত্তি + هستگ + Падмурак + Основа + কোর + কোর + Jezgra + Nucli + Úplný základ + Craidd + Grundlæggende + Kern + Πυρήνας + Core + Núcleo + Tuum + اصل + Keskeiset + Core + Núcleo + મૂળ + ליבה + कोर + Jezgra + Mag + Հիմք + Nucleo + Inti + Bugas + Lágmarkskerfi + Principale + コア + ბირთვი + ಅಂತಸ್ಸಾರ + 핵심 + Pamatsistēma + कोर + Основни + കോറ്‍ + कोर + Teras + Kjerne + कोर + Kern + Kjerne + Bogare + ପ୍ରମୂଖ + ਮੂਲ + Rdzeń + Núcleo + Núcleo + Nucleu + Основа + න්‍යෂ්ඨිය + Jadro + Jedro + Bërthama + Срж + Srž + Srž + Grund + கோர் + అంతర్భాగం + Система + แกนหลัก + Çekirdek + Основа + مرکز + Lõi + 核心 + 核心 + Okuyikhona + Smallest possible installation. + ন্যূনতম ইনস্টল। + ন্যূনতম ইনস্টলেশন। + ন্যূনতম ইনস্টলেশন। + Nejmenší možná instalace. + Kleinstmögliche Installation. + La instalación más pequeña posible. + Plus petite installation possible. + નાનામાં નાના શક્ય સ્થાપન. + लघुतम संभावित संस्थापन. + Le minime possibile installation. + Minima installazione possibile. + 最小限のインストール + ಅತ್ಯಲ್ಪಸಾಧ್ಯ ಅನುಸ್ಥಾಪನೆ. + 가능한 최소 설치 + സാധ്യമായ ഏറ്റവും ചെറിയ ഇന്‍സ്റ്റലേഷന്‍. + शक्यतया सर्वात लहान प्रतिष्ठापन. + କ୍ଷୁଦ୍ରତମ ସମ୍ଭାବ୍ଯ ସ୍ଥାପନା। + ਘੱਟੋ-ਘੱਟ ਸੰਭਵ ਇੰਸਟਾਲੇਸ਼ਨ। + Najmniejsza możliwa instalacja. + Menor instalação possível + Минимально возможная установка + Minsta möjliga installation + மிகச் சிறிய செயல்படுத்தக்கூடிய நிறுவல். + సాధ్యమగు అతిచిన్న సంస్థాపన. + Мінімально можливе встановлення. + 最小可能安装。 + 最小型安裝。 + false + false + + aic94xx-firmware + alsa-firmware + bfa-firmware + dracut-config-rescue + ivtv-firmware + iwl1000-firmware + iwl100-firmware + iwl105-firmware + iwl135-firmware + iwl2000-firmware + iwl2030-firmware + iwl3160-firmware + iwl3945-firmware + iwl4965-firmware + iwl5000-firmware + iwl5150-firmware + iwl6000-firmware + iwl6000g2a-firmware + iwl6000g2b-firmware + iwl6050-firmware + iwl7260-firmware + kernel-tools + libertas-sd8686-firmware + libertas-sd8787-firmware + libertas-usb8388-firmware + linux-firmware + microcode_ctl + NetworkManager + NetworkManager-tui + postfix + ql2100-firmware + ql2200-firmware + ql23xx-firmware + audit + basesystem + bash + biosdevname + btrfs-progs + coreutils + cpp + cronie + curl + dhclient + dkms + e2fsprogs + filesystem + gcc + glibc + glibc-devel + glibc-headers + git + hostname + initscripts + iproute + iprutils + iptables + iputils + irqbalance + kbd + kernel-devel + kernel-headers + kexec-tools + less + libmpc + mpfr + man-db + ncurses + net-tools + less + man-db + ncurses + openssh-clients + openssh-server + opnfv-apex + parted + passwd + patch + plymouth + policycoreutils + procps-ng + rootfiles + rpm + rsyslog + selinux-policy-targeted + setup + shadow-utils + sudo + systemd + tar + tuned + util-linux + vagrant + vim-minimal + VirtualBox-4.3 + xfsprogs + yum + dracut-config-generic + dracut-fips-aesni + dracut-fips + dracut-network + openssh-keycat + selinux-policy-mls + tboot + + + + + opnfv_provisioning + OPNFV Provisioning Server Install + নূন্যতম ইনস্টল + ন্যূনতম ইনস্টল + Minimální instalace + Minimale Installation + Instalación mínima + Installation minimale + ન્યૂનતમ સ્થાપન + न्यूनतम संस्थापन + Installazione minima + 最小限のインストール + ಕನಿಷ್ಟ ಅನುಸ್ಥಾಪನೆ + 최소 설치 + ഏറ്റവും കുറഞ്ഞ ഇന്‍സ്റ്റോള്‍ + किमान इंस्टॉल + ସର୍ବନିମ୍ନ ସ୍ଥାପନ + ਘੱਟ ਤੋਂ ਘੱਟ ਇੰਸਟਾਲ + Minimalna instalacja + Instalações Mínimas + Минимальная установка + குறைந்தபட்ச நிறுவல் + కనీసపు సంస్థాపన + Мінімальна система + 最小安装 + 最小型安裝 + Installs an OPNFV Provisioning Server + মৌলি কাৰ্য্যকৰীতা। + প্রাথমিক বৈশিষ্ট্য। + Základní funkcionalita. + Grundlegende Funktionalität. + Funcionalidad básica. + Fonctionnalité de base. + મૂળભૂત વિધેય. + मौलिक प्रकार्यात्मकता. + Funzione di base. + 基本的な機能です。 + ಮೂಲಭೂತ ಕ್ರಿಯಾಶೀಲತೆ. + 기본적인 기능입니다. + അടിസ്ഥാന പ്രവൃത്തിവിശേഷണം. + मूळ कार्यक्षमता. + ସାଧାରଣ କାର୍ଯ୍ୟକାରିତା। + ਮੁੱਢਲੀ ਕਾਰਜਸ਼ੀਲਤਾ। + Podstawowa funkcjonalność. + Função básica + Базовая функциональность. + அடிப்படை செயலம்சம். + ప్రాథమిక ఫంక్షనాలిటి. + Основні можливості. + 基本功能。 + 基本功能。 + 5 + + core + + + + + + + + + + + + + + + + + + + diff --git a/build/cache.mk b/build/cache.mk index fdfd0034..28495a9d 100644 --- a/build/cache.mk +++ b/build/cache.mk @@ -1,4 +1,4 @@ -############################################################################## +############################################################################# # Copyright (c) 2015 Ericsson AB and others. # stefan.k.berg@ericsson.com # jonas.bjurel@ericsson.com diff --git a/build/instack.sh b/build/instack.sh index 6ead347c..ad1f4bb1 100755 --- a/build/instack.sh +++ b/build/instack.sh @@ -1,96 +1,194 @@ -#!/bin/sh +#!/bin/sh set -e +declare -i CNT + +RDO_RELEASE=kilo + +# RDO Manager expects a stack user to exist, this checks for one +# and creates it if you are root if ! id stack > /dev/null; then - useradd stack; - echo 'stack ALL=(root) NOPASSWD:ALL' | sudo tee -a /etc/sudoers.d/stack - echo 'Defaults:stack !requiretty' | sudo tee -a /etc/sudoers.d/stack - chmod 0440 /etc/sudoers.d/stack + sudo useradd stack; + sudo echo 'stack ALL=(root) NOPASSWD:ALL' | sudo tee -a /etc/sudoers.d/stack + sudo echo 'Defaults:stack !requiretty' | sudo tee -a /etc/sudoers.d/stack + sudo chmod 0440 /etc/sudoers.d/stack echo 'Added user stack' fi +# ensure that I can ssh as the stack user +if ! sudo grep "$(cat ~/.ssh/id_rsa.pub)" /home/stack/.ssh/authorized_keys; then + if ! sudo ls -d /home/stack/.ssh/ ; then + sudo mkdir /home/stack/.ssh + sudo chown stack:stack /home/stack/.ssh + sudo chmod 700 /home/stack/.ssh + fi + USER=$(whoami) sudo sh -c "cat ~$USER/.ssh/id_rsa.pub >> /home/stack/.ssh/authorized_keys" + sudo chown stack:stack /home/stack/.ssh/authorized_keys +fi + +# clean up stack user previously build instack disk images +ssh -T -o "StrictHostKeyChecking no" stack@localhost "rm -f instack*.qcow2" + +# Yum repo setup for building the undercloud if ! rpm -q epel-release > /dev/null; then - yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + sudo yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm fi if ! rpm -q rdo-release > /dev/null; then - yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm + sudo yum install -y https://rdoproject.org/repos/openstack-${RDO_RELEASE}/rdo-release-${RDO_RELEASE}.rpm fi -if ! [ -a /etc/yum.repos.d/rdo-management-trunk.repo ]; then - curl -o /etc/yum.repos.d/rdo-management-trunk.repo http://trunk-mgt.rdoproject.org/centos-kilo/current-passed-ci/delorean-rdo-management.repo +if ! rpm -q rdo-release > /dev/null && [ "$1" != "-master" ]; then + sudo yum install -y https://rdoproject.org/repos/openstack-${RDO_RELEASE}/rdo-release-${RDO_RELEASE}.rpm + sudo rm -rf /etc/yum.repos.d/delorean.repo + sudo rm -rf /etc/yum.repos.d/delorean-current.repo + sudo rm -rf /etc/yum.repos.d/delorean-deps.repo +elif [ "$1" == "-master" ]; then + sudo yum -y install yum-plugin-priorities + sudo yum-config-manager --disable openstack-${RDO_RELEASE} + sudo curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7/current-tripleo/delorean.repo + sudo curl -o /etc/yum.repos.d/delorean-current.repo http://trunk.rdoproject.org/centos7/current/delorean.repo + sudo sed -i 's/\[delorean\]/\[delorean-current\]/' /etc/yum.repos.d/delorean-current.repo + sudo curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7/delorean-deps.repo fi +# ensure the undercloud package is installed so we can build the undercloud if ! rpm -q instack-undercloud > /dev/null; then - yum install -y instack-undercloud + sudo yum install -y instack-undercloud fi -sudo -u stack -- sh -c 'cd; instack-virt-setup' +# ensure openvswitch is installed +if ! rpm -q openvswitch > /dev/null; then + sudo yum install -y openvswitch +fi + +# ensure libvirt is installed +if ! rpm -q libvirt-daemon-kvm > /dev/null; then + sudo yum install -y libvirt-daemon-kvm +fi + +# ensure that no previous undercloud VMs are running +# and rebuild the bare undercloud VMs +ssh -T -o "StrictHostKeyChecking no" stack@localhost < /dev/null || echo -n '' +virsh undefine instack 2> /dev/null || echo -n '' +virsh destroy baremetal_0 2> /dev/null || echo -n '' +virsh undefine baremetal_0 2> /dev/null || echo -n '' +virsh destroy baremetal_1 2> /dev/null || echo -n '' +virsh undefine baremetal_1 2> /dev/null || echo -n '' +instack-virt-setup +EOI + +# attach undercloud to the underlay network for +# baremetal installations #if ! ovs-vsctl show | grep brbm; then # ovs-vsctl add-port brbm em2 #fi -cp /home/stack/.ssh/id_rsa* /root/.ssh/ -UNDERCLOUD=$(virsh net-dhcp-leases default | grep instack | awk '{print $5}' | awk -F '/' '{print $1}') -ssh -T -o "StrictHostKeyChecking no" root@$UNDERCLOUD < /dev/null; then - yum install -y https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm -fi +# let dhcp happen so we can get the ip +# just wait instead of checking until we see an address +# because there may be a previous lease that needs +# to be cleaned up +sleep 5 + +# get the undercloud ip address +UNDERCLOUD=$(grep instack /var/lib/libvirt/dnsmasq/default.leases | awk '{print $3}' | head -n 1) -if ! [ -a /etc/yum.repos.d/rdo-management-trunk.repo ]; then - curl -o /etc/yum.repos.d/rdo-management-trunk.repo http://trunk-mgt.rdoproject.org/centos-kilo/current-passed-ci/delorean-rdo-management.repo +# ensure that we can ssh to the undercloud +CNT=10 +while ! ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" "echo ''" > /dev/null && [ $CNT -gt 0 ]; do + echo -n "." + sleep 3 + CNT=CNT-1 +done +# TODO fail if CNT=0 + +# yum repo, triple-o package and ssh key setup for the undercloud +ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" < /dev/null; then + yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm fi -yum install -y python-rdomanager-oscplugin +curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7/current-tripleo/delorean.repo +curl -o /etc/yum.repos.d/delorean-current.repo http://trunk.rdoproject.org/centos7/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 +curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7/delorean-deps.repo +yum install -y python-tripleoclient cp /root/.ssh/authorized_keys /home/stack/.ssh/authorized_keys chown stack:stack /home/stack/.ssh/authorized_keys EOI -ssh -o "StrictHostKeyChecking no" stack@$UNDERCLOUD "openstack undercloud install" -#ssh -T -o "StrictHostKeyChecking no" stack@$UNDERCLOUD < /dev/null && [ $CNT -gt 0 ]; do echo -n "." sleep 5 + CNT=CNT-1 done +if virsh list | grep instack > /dev/null; then + echo "instack failed to shutdown for copy" + exit 1 +fi -echo "Copying instack disk image and starting instack VM." +echo "\nCopying instack disk image and starting instack VM." +virsh dumpxml baremetal_0 > baremetal_0.xml +virsh dumpxml baremetal_1 > baremetal_1.xml cp -f /var/lib/libvirt/images/instack.qcow2 . virsh dumpxml instack > instack.xml -virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml +#virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml virsh start instack +EOI + +# copy off the instack artifacts +echo "Copying instack files to build directory" +scp -o "StrictHostKeyChecking no" stack@localhost:baremetal_0.xml . +scp -o "StrictHostKeyChecking no" stack@localhost:baremetal_1.xml . +scp -o "StrictHostKeyChecking no" stack@localhost:instack.xml . +scp -o "StrictHostKeyChecking no" stack@localhost:instack.qcow2 . + +# start the instack VM back up to continue installation echo "Waiting for instack VM to start" -while ! ping -c 1 $UNDERCLOUD > /dev/null; do +CNT=10 +while ! ping -c 1 "$UNDERCLOUD" > /dev/null && [ $CNT -gt 0 ]; do echo -n "." sleep 5 + CNT=CNT-1 done -while ! ssh -T -o "StrictHostKeyChecking no" root@$UNDERCLOUD "echo ''" > /dev/null; do +CNT=10 +while ! ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" "echo ''" > /dev/null && [ $CNT -gt 0 ]; do echo -n "." sleep 3 + CNT=CNT-1 done +# inject the already downloaded cloud image so it's not downloaded again echo "Copying CentOS Cache to instack VM" -ssh -o "StrictHostKeyChecking no" stack@$UNDERCLOUD "mkdir .cache" -scp -r /home/stack/.cache/image-create/CentOS-7-x86_64-GenericCloud* stack@$UNDERCLOUD:.cache/ +ssh -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" "mkdir .cache" +ssh -T -o "StrictHostKeyChecking no" stack@localhost "scp -r -o 'StrictHostKeyChecking no' /home/stack/.cache/image-create/CentOS-7-x86_64-GenericCloud* \"stack@$UNDERCLOUD\":.cache/" +# build the overcloud images echo "Building overcloud images" -ssh -tt -o "StrictHostKeyChecking no" stack@$UNDERCLOUD "openstack overcloud image build --all" +ssh -tt -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" "openstack overcloud image build --all" +# copy off the built images echo "Copying overcloud images" -mkdir stack -scp stack@$UNDERCLOUD:deploy-ramdisk-ironic.initramfs stack -scp stack@$UNDERCLOUD:deploy-ramdisk-ironic.kernel stack -scp stack@$UNDERCLOUD:discovery-ramdisk.initramfs stack -scp stack@$UNDERCLOUD:discovery-ramdisk.kernel stack -scp stack@$UNDERCLOUD:fedora-user.qcow2 stack -scp stack@$UNDERCLOUD:overcloud-full.initrd stack -scp stack@$UNDERCLOUD:overcloud-full.qcow2 stack -scp stack@$UNDERCLOUD:overcloud-full.vmlinuz stack +if [ -f stack ]; then mkdir stack; fi +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:deploy-ramdisk-ironic.initramfs stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:deploy-ramdisk-ironic.kernel stack +#scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:discovery-ramdisk.initramfs stack +#scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:discovery-ramdisk.kernel stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:fedora-user.qcow2 stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:overcloud-full.initrd stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:overcloud-full.qcow2 stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:overcloud-full.vmlinuz stack +scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:instackenv.json instackenv-virt.json diff --git a/build/isolinux.cfg b/build/isolinux.cfg new file mode 100644 index 00000000..12848de7 --- /dev/null +++ b/build/isolinux.cfg @@ -0,0 +1,120 @@ +default vesamenu.c32 +timeout 600 + +display boot.msg + +# Clear the screen when exiting the menu, instead of leaving the menu displayed. +# For vesamenu, this means the graphical background is still displayed without +# the menu itself for as long as the screen remains in graphics mode. +menu clear +menu background splash.png +menu title CentOS 7 +menu vshift 8 +menu rows 18 +menu margin 8 +#menu hidden +menu helpmsgrow 15 +menu tabmsgrow 13 + +# Border Area +menu color border * #00000000 #00000000 none + +# Selected item +menu color sel 0 #ffffffff #00000000 none + +# Title bar +menu color title 0 #ff7ba3d0 #00000000 none + +# Press [Tab] message +menu color tabmsg 0 #ff3a6496 #00000000 none + +# Unselected menu item +menu color unsel 0 #84b8ffff #00000000 none + +# Selected hotkey +menu color hotsel 0 #84b8ffff #00000000 none + +# Unselected hotkey +menu color hotkey 0 #ffffffff #00000000 none + +# Help text +menu color help 0 #ffffffff #00000000 none + +# A scrollbar of some type? Not sure. +menu color scrollbar 0 #ffffffff #ff355594 none + +# Timeout msg +menu color timeout 0 #ffffffff #00000000 none +menu color timeout_msg 0 #ffffffff #00000000 none + +# Command prompt text +menu color cmdmark 0 #84b8ffff #00000000 none +menu color cmdline 0 #ffffffff #00000000 none + +# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message. + +menu tabmsg Press Tab for full configuration options on menu items. + +menu separator # insert an empty line +menu separator # insert an empty line + +label linux + menu label ^Install OPNFV CentOS 7 + menu default + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=OPNFV\x20CentOS\x207\x20x86_64 + +#label check +# menu label Test this ^media & install CentOS 7 +# kernel vmlinuz +# append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet + +menu separator # insert an empty line + +# utilities submenu +menu begin ^Troubleshooting + menu title Troubleshooting + +label vesa + menu indent count 5 + menu label Install CentOS 7 in ^basic graphics mode + text help + Try this option out if you're having trouble installing + CentOS 7. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=OPNFV\x20CentOS\x207\x20x86_64 xdriver=vesa nomodeset quiet + +label rescue + menu indent count 5 + menu label ^Rescue a CentOS system + text help + If the system will not boot, this lets you access files + and edit config files to try to get it booting again. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rescue quiet + +label memtest + menu label Run a ^memory test + text help + If your system is having issues, a problem with your + system's memory may be the cause. Use this utility to + see if the memory is working correctly. + endtext + kernel memtest + +menu separator # insert an empty line + +label local + menu label Boot from ^local drive + localboot 0xffff + +menu separator # insert an empty line +menu separator # insert an empty line + +label returntomain + menu label Return to ^main menu + menu exit + +menu end diff --git a/build/opnfv-apex.spec b/build/opnfv-apex.spec new file mode 100644 index 00000000..fb010615 --- /dev/null +++ b/build/opnfv-apex.spec @@ -0,0 +1,40 @@ +Name: opnfv-apex +Version: 2.0 +Release: 1 +Summary: RDO Manager disk images for deployment + +Group: System Environment +License: Apache 2.0 +URL: https://gerrit.opnfv.org/gerrit/apex.git +Source0: opnfv-apex.tar.gz + +#BuildRequires: +#Requires: + +%description +These files are disk images used to launch the instack +libvirt VM and to load into the instack undercloud machine +to deploy an OpenStack overcloud. + +%prep +%setup -q + + +%build + +%install +mkdir -p %{buildroot}/usr/bin/ +cp ci/deploy.sh %{buildroot}/usr/bin/ + +mkdir -p %{buildroot}/var/lib/libvirt/images/ +cp build/instack.qcow2 %{buildroot}/var/lib/libvirt/images/ + +%files +/usr/bin/deploy.sh +/var/lib/libvirt/images/instack.qcow2 + +%changelog +* Fri Sep 25 2015 Dan Radez - 2.0-1 +- Migrated to RDO Manager +* Fri Apr 24 2015 Dan Radez - 0.1-1 +- Initial Packaging diff --git a/ci/build.sh b/ci/build.sh index 7a1ef523..9159f23e 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -24,7 +24,7 @@ fi;' EXIT usage () { cat << EOF -$0 Builds the Foreman OPNFV Deployment ISO +$0 Builds the Apex OPNFV Deployment Toolchain usage: $0 [-s spec-file] [-c cache-URI] [-l log-file] [-f Flags] build-directory @@ -41,6 +41,7 @@ OPTIONS: o s: Do nothing, succeed o f: Do nothing, fail o t: run build unit tests + o M: Use master branch code o i: run interactive (-t flag to docker run) o P: Populate a new local cache and push it to the (-c cache-URI) cache artifactory if -c option is present, currently file://, http:// and ftp:// are supported o d: Detatch - NOT YET SUPPORTED @@ -58,7 +59,7 @@ To reduce build time it uses build cache on a local or remote location. The cach - The git Commit-Id on the remote repos/HEAD defined in the spec file does not correspont with the Commit-Id for what the cache was built with. 3) A valid cache does not exist on the specified -c cache-base-URI. -The cache URI object name is foreman_cache-"md5sum(spec file)" +The cache URI object name is apex_cache-"md5sum(spec file)" Logging by default to console, but can be directed elsewhere with the -l option in which case both stdout and stderr is redirected to that destination. @@ -72,7 +73,7 @@ Return codes: - 200 Build failure Examples: -build -c http://opnfv.org/artifactory/foreman/cache -d ~/jenkins/genesis/foreman/ci/output -f ti +build -c http://opnfv.org/artifactory/apex/cache -d ~/jenkins/genesis/apex/ci/output -f ti NOTE: At current the build scope is set to the git root of the repository, -d destination locations outside that scope will not work EOF } @@ -87,8 +88,8 @@ BUILD_BASE=$(readlink -e ../build/) RESULT_DIR="${BUILD_BASE}/release" BUILD_SPEC="${BUILD_BASE}/config.mk" CACHE_DIR="cache" -LOCAL_CACHE_ARCH_NAME="foreman-cache" -REMOTE_CACHE_ARCH_NAME="foreman_cache-$(md5sum ${BUILD_SPEC}| cut -f1 -d " ")" +LOCAL_CACHE_ARCH_NAME="apex-cache" +REMOTE_CACHE_ARCH_NAME="apex_cache-$(md5sum ${BUILD_SPEC}| cut -f1 -d " ")" REMOTE_ACCESS_METHD=curl INCLUDE_DIR=../include # @@ -104,6 +105,7 @@ CACHE_TMP="${SCRIPT_DIR}/tmp" TEST_SUCCEED=0 TEST_FAIL=0 UNIT_TEST=0 +USE_MASTER=0 UPDATE_CACHE=0 POPULATE_CACHE=0 RECURSIV=0 @@ -210,6 +212,10 @@ for ((i=0; i<${#BUILD_FLAGS};i++)); do UNIT_TEST=1 ;; + M) + USE_MASTER=1 + ;; + i) INTERACTIVE=1 ;; @@ -345,6 +351,10 @@ else MAKE_ARGS+="UNIT_TEST=FALSE " fi +if [ ${USE_MASTER} -eq 1 ]; then + MAKE_ARGS+="USE_MASTER=-master " +fi + if [ ${INTERACTIVE} -eq 1 ]; then MAKE_ARGS+="INTERACTIVE=TRUE " else diff --git a/include/build.sh.debug b/include/build.sh.debug new file mode 100644 index 00000000..e69de29b -- cgit 1.2.3-korg