summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile37
-rw-r--r--build/c7-opnfv-x86_64-comps.xml292
-rw-r--r--build/cache.mk2
-rwxr-xr-xbuild/instack.sh186
-rw-r--r--build/isolinux.cfg120
-rw-r--r--build/opnfv-apex.spec40
6 files changed, 615 insertions, 62 deletions
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 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE comps PUBLIC "-//CentOS//DTD Comps info//EN" "comps.dtd">
+<comps>
+ <group>
+ <id>core</id>
+ <name>Core</name>
+ <name xml:lang='af'>Kern</name>
+ <name xml:lang='am'>ማዕከላዊ ቦታ</name>
+ <name xml:lang='ar'>اللبّ</name>
+ <name xml:lang='as'>ভিত্তি</name>
+ <name xml:lang='bal'>هستگ</name>
+ <name xml:lang='be'>Падмурак</name>
+ <name xml:lang='bg'>Основа</name>
+ <name xml:lang='bn'>কোর</name>
+ <name xml:lang='bn_IN'>কোর</name>
+ <name xml:lang='bs'>Jezgra</name>
+ <name xml:lang='ca'>Nucli</name>
+ <name xml:lang='cs'>Úplný základ</name>
+ <name xml:lang='cy'>Craidd</name>
+ <name xml:lang='da'>Grundlæggende</name>
+ <name xml:lang='de'>Kern</name>
+ <name xml:lang='el'>Πυρήνας</name>
+ <name xml:lang='en_GB'>Core</name>
+ <name xml:lang='es'>Núcleo</name>
+ <name xml:lang='et'>Tuum</name>
+ <name xml:lang='fa'>اصل</name>
+ <name xml:lang='fi'>Keskeiset</name>
+ <name xml:lang='fr'>Core</name>
+ <name xml:lang='gl'>Núcleo</name>
+ <name xml:lang='gu'>મૂળ</name>
+ <name xml:lang='he'>ליבה</name>
+ <name xml:lang='hi'>कोर</name>
+ <name xml:lang='hr'>Jezgra</name>
+ <name xml:lang='hu'>Mag</name>
+ <name xml:lang='hy'>Հիմք</name>
+ <name xml:lang='ia'>Nucleo</name>
+ <name xml:lang='id'>Inti</name>
+ <name xml:lang='ilo'>Bugas</name>
+ <name xml:lang='is'>Lágmarkskerfi</name>
+ <name xml:lang='it'>Principale</name>
+ <name xml:lang='ja'>コア</name>
+ <name xml:lang='ka'>ბირთვი</name>
+ <name xml:lang='kn'>ಅಂತಸ್ಸಾರ</name>
+ <name xml:lang='ko'>핵심</name>
+ <name xml:lang='lv'>Pamatsistēma</name>
+ <name xml:lang='mai'>कोर</name>
+ <name xml:lang='mk'>Основни</name>
+ <name xml:lang='ml'>കോറ്‍</name>
+ <name xml:lang='mr'>कोर</name>
+ <name xml:lang='ms'>Teras</name>
+ <name xml:lang='nb'>Kjerne</name>
+ <name xml:lang='ne'>कोर</name>
+ <name xml:lang='nl'>Kern</name>
+ <name xml:lang='no'>Kjerne</name>
+ <name xml:lang='nso'>Bogare</name>
+ <name xml:lang='or'>ପ୍ରମୂଖ</name>
+ <name xml:lang='pa'>ਮੂਲ</name>
+ <name xml:lang='pl'>Rdzeń</name>
+ <name xml:lang='pt'>Núcleo</name>
+ <name xml:lang='pt_BR'>Núcleo</name>
+ <name xml:lang='ro'>Nucleu</name>
+ <name xml:lang='ru'>Основа</name>
+ <name xml:lang='si'>න්‍යෂ්ඨිය</name>
+ <name xml:lang='sk'>Jadro</name>
+ <name xml:lang='sl'>Jedro</name>
+ <name xml:lang='sq'>Bërthama</name>
+ <name xml:lang='sr'>Срж</name>
+ <name xml:lang='sr@latin'>Srž</name>
+ <name xml:lang='sr@Latn'>Srž</name>
+ <name xml:lang='sv'>Grund</name>
+ <name xml:lang='ta'>கோர்</name>
+ <name xml:lang='te'>అంతర్భాగం</name>
+ <name xml:lang='tg'>Система</name>
+ <name xml:lang='th'>แกนหลัก</name>
+ <name xml:lang='tr'>Çekirdek</name>
+ <name xml:lang='uk'>Основа</name>
+ <name xml:lang='ur'>مرکز</name>
+ <name xml:lang='vi'>Lõi</name>
+ <name xml:lang='zh_CN'>核心</name>
+ <name xml:lang='zh_TW'>核心</name>
+ <name xml:lang='zu'>Okuyikhona</name>
+ <description>Smallest possible installation.</description>
+ <description xml:lang='as'>ন্যূনতম ইনস্টল।</description>
+ <description xml:lang='bn'>ন্যূনতম ইনস্টলেশন।</description>
+ <description xml:lang='bn_IN'>ন্যূনতম ইনস্টলেশন।</description>
+ <description xml:lang='cs'>Nejmenší možná instalace.</description>
+ <description xml:lang='de'>Kleinstmögliche Installation.</description>
+ <description xml:lang='es'>La instalación más pequeña posible.</description>
+ <description xml:lang='fr'>Plus petite installation possible.</description>
+ <description xml:lang='gu'>નાનામાં નાના શક્ય સ્થાપન.</description>
+ <description xml:lang='hi'>लघुतम संभावित संस्थापन.</description>
+ <description xml:lang='ia'>Le minime possibile installation.</description>
+ <description xml:lang='it'>Minima installazione possibile.</description>
+ <description xml:lang='ja'>最小限のインストール</description>
+ <description xml:lang='kn'>ಅತ್ಯಲ್ಪಸಾಧ್ಯ ಅನುಸ್ಥಾಪನೆ.</description>
+ <description xml:lang='ko'>가능한 최소 설치</description>
+ <description xml:lang='ml'>സാധ്യമായ ഏറ്റവും ചെറിയ ഇന്‍സ്റ്റലേഷന്‍.</description>
+ <description xml:lang='mr'>शक्यतया सर्वात लहान प्रतिष्ठापन.</description>
+ <description xml:lang='or'>କ୍ଷୁଦ୍ରତମ ସମ୍ଭାବ୍ଯ ସ୍ଥାପନା।</description>
+ <description xml:lang='pa'>ਘੱਟੋ-ਘੱਟ ਸੰਭਵ ਇੰਸਟਾਲੇਸ਼ਨ।</description>
+ <description xml:lang='pl'>Najmniejsza możliwa instalacja.</description>
+ <description xml:lang='pt_BR'>Menor instalação possível</description>
+ <description xml:lang='ru'>Минимально возможная установка</description>
+ <description xml:lang='sv'>Minsta möjliga installation</description>
+ <description xml:lang='ta'>மிகச் சிறிய செயல்படுத்தக்கூடிய நிறுவல்.</description>
+ <description xml:lang='te'>సాధ్యమగు అతిచిన్న సంస్థాపన.</description>
+ <description xml:lang='uk'>Мінімально можливе встановлення.</description>
+ <description xml:lang='zh_CN'>最小可能安装。</description>
+ <description xml:lang='zh_TW'>最小型安裝。</description>
+ <default>false</default>
+ <uservisible>false</uservisible>
+ <packagelist>
+ <packagereq type="default">aic94xx-firmware</packagereq>
+ <packagereq type="default">alsa-firmware</packagereq>
+ <packagereq type="default">bfa-firmware</packagereq>
+ <packagereq type="default">dracut-config-rescue</packagereq>
+ <packagereq type="default">ivtv-firmware</packagereq>
+ <packagereq type="default">iwl1000-firmware</packagereq>
+ <packagereq type="default">iwl100-firmware</packagereq>
+ <packagereq type="default">iwl105-firmware</packagereq>
+ <packagereq type="default">iwl135-firmware</packagereq>
+ <packagereq type="default">iwl2000-firmware</packagereq>
+ <packagereq type="default">iwl2030-firmware</packagereq>
+ <packagereq type="default">iwl3160-firmware</packagereq>
+ <packagereq type="default">iwl3945-firmware</packagereq>
+ <packagereq type="default">iwl4965-firmware</packagereq>
+ <packagereq type="default">iwl5000-firmware</packagereq>
+ <packagereq type="default">iwl5150-firmware</packagereq>
+ <packagereq type="default">iwl6000-firmware</packagereq>
+ <packagereq type="default">iwl6000g2a-firmware</packagereq>
+ <packagereq type="default">iwl6000g2b-firmware</packagereq>
+ <packagereq type="default">iwl6050-firmware</packagereq>
+ <packagereq type="default">iwl7260-firmware</packagereq>
+ <packagereq type="default">kernel-tools</packagereq>
+ <packagereq type="default">libertas-sd8686-firmware</packagereq>
+ <packagereq type="default">libertas-sd8787-firmware</packagereq>
+ <packagereq type="default">libertas-usb8388-firmware</packagereq>
+ <packagereq type="default">linux-firmware</packagereq>
+ <packagereq type="default">microcode_ctl</packagereq>
+ <packagereq type="default">NetworkManager</packagereq>
+ <packagereq type="default">NetworkManager-tui</packagereq>
+ <packagereq type="default">postfix</packagereq>
+ <packagereq type="default">ql2100-firmware</packagereq>
+ <packagereq type="default">ql2200-firmware</packagereq>
+ <packagereq type="default">ql23xx-firmware</packagereq>
+ <packagereq type="mandatory">audit</packagereq>
+ <packagereq type="mandatory">basesystem</packagereq>
+ <packagereq type="mandatory">bash</packagereq>
+ <packagereq type="mandatory">biosdevname</packagereq>
+ <packagereq type="mandatory">btrfs-progs</packagereq>
+ <packagereq type="mandatory">coreutils</packagereq>
+ <packagereq type="mandatory">cpp</packagereq>
+ <packagereq type="mandatory">cronie</packagereq>
+ <packagereq type="mandatory">curl</packagereq>
+ <packagereq type="mandatory">dhclient</packagereq>
+ <packagereq type="mandatory">dkms</packagereq>
+ <packagereq type="mandatory">e2fsprogs</packagereq>
+ <packagereq type="mandatory">filesystem</packagereq>
+ <packagereq type="mandatory">gcc</packagereq>
+ <packagereq type="mandatory">glibc</packagereq>
+ <packagereq type="mandatory">glibc-devel</packagereq>
+ <packagereq type="mandatory">glibc-headers</packagereq>
+ <packagereq type="mandatory">git</packagereq>
+ <packagereq type="mandatory">hostname</packagereq>
+ <packagereq type="mandatory">initscripts</packagereq>
+ <packagereq type="mandatory">iproute</packagereq>
+ <packagereq type="mandatory">iprutils</packagereq>
+ <packagereq type="mandatory">iptables</packagereq>
+ <packagereq type="mandatory">iputils</packagereq>
+ <packagereq type="mandatory">irqbalance</packagereq>
+ <packagereq type="mandatory">kbd</packagereq>
+ <packagereq type="mandatory">kernel-devel</packagereq>
+ <packagereq type="mandatory">kernel-headers</packagereq>
+ <packagereq type="mandatory">kexec-tools</packagereq>
+ <packagereq type="mandatory">less</packagereq>
+ <packagereq type="mandatory">libmpc</packagereq>
+ <packagereq type="mandatory">mpfr</packagereq>
+ <packagereq type="mandatory">man-db</packagereq>
+ <packagereq type="mandatory">ncurses</packagereq>
+ <packagereq type="mandatory">net-tools</packagereq>
+ <packagereq type="mandatory">less</packagereq>
+ <packagereq type="mandatory">man-db</packagereq>
+ <packagereq type="mandatory">ncurses</packagereq>
+ <packagereq type="mandatory">openssh-clients</packagereq>
+ <packagereq type="mandatory">openssh-server</packagereq>
+ <packagereq type="mandatory">opnfv-apex</packagereq>
+ <packagereq type="mandatory">parted</packagereq>
+ <packagereq type="mandatory">passwd</packagereq>
+ <packagereq type="mandatory">patch</packagereq>
+ <packagereq type="mandatory">plymouth</packagereq>
+ <packagereq type="mandatory">policycoreutils</packagereq>
+ <packagereq type="mandatory">procps-ng</packagereq>
+ <packagereq type="mandatory">rootfiles</packagereq>
+ <packagereq type="mandatory">rpm</packagereq>
+ <packagereq type="mandatory">rsyslog</packagereq>
+ <packagereq type="mandatory">selinux-policy-targeted</packagereq>
+ <packagereq type="mandatory">setup</packagereq>
+ <packagereq type="mandatory">shadow-utils</packagereq>
+ <packagereq type="mandatory">sudo</packagereq>
+ <packagereq type="mandatory">systemd</packagereq>
+ <packagereq type="mandatory">tar</packagereq>
+ <packagereq type="mandatory">tuned</packagereq>
+ <packagereq type="mandatory">util-linux</packagereq>
+ <packagereq type="mandatory">vagrant</packagereq>
+ <packagereq type="mandatory">vim-minimal</packagereq>
+ <packagereq type="mandatory">VirtualBox-4.3</packagereq>
+ <packagereq type="mandatory">xfsprogs</packagereq>
+ <packagereq type="mandatory">yum</packagereq>
+ <packagereq type="optional">dracut-config-generic</packagereq>
+ <packagereq type="optional">dracut-fips-aesni</packagereq>
+ <packagereq type="optional">dracut-fips</packagereq>
+ <packagereq type="optional">dracut-network</packagereq>
+ <packagereq type="optional">openssh-keycat</packagereq>
+ <packagereq type="optional">selinux-policy-mls</packagereq>
+ <packagereq type="optional">tboot</packagereq>
+ </packagelist>
+ </group>
+
+ <environment>
+ <id>opnfv_provisioning</id>
+ <name>OPNFV Provisioning Server Install</name>
+ <name xml:lang='as'>নূন্যতম ইনস্টল</name>
+ <name xml:lang='bn_IN'>ন্যূনতম ইনস্টল</name>
+ <name xml:lang='cs'>Minimální instalace</name>
+ <name xml:lang='de'>Minimale Installation</name>
+ <name xml:lang='es'>Instalación mínima</name>
+ <name xml:lang='fr'>Installation minimale</name>
+ <name xml:lang='gu'>ન્યૂનતમ સ્થાપન</name>
+ <name xml:lang='hi'>न्यूनतम संस्थापन</name>
+ <name xml:lang='it'>Installazione minima</name>
+ <name xml:lang='ja'>最小限のインストール</name>
+ <name xml:lang='kn'>ಕನಿಷ್ಟ ಅನುಸ್ಥಾಪನೆ</name>
+ <name xml:lang='ko'>최소 설치</name>
+ <name xml:lang='ml'>ഏറ്റവും കുറഞ്ഞ ഇന്‍സ്റ്റോള്‍</name>
+ <name xml:lang='mr'>किमान इंस्टॉल</name>
+ <name xml:lang='or'>ସର୍ବନିମ୍ନ ସ୍ଥାପନ</name>
+ <name xml:lang='pa'>ਘੱਟ ਤੋਂ ਘੱਟ ਇੰਸਟਾਲ</name>
+ <name xml:lang='pl'>Minimalna instalacja</name>
+ <name xml:lang='pt_BR'>Instalações Mínimas</name>
+ <name xml:lang='ru'>Минимальная установка</name>
+ <name xml:lang='ta'>குறைந்தபட்ச நிறுவல்</name>
+ <name xml:lang='te'>కనీసపు సంస్థాపన</name>
+ <name xml:lang='uk'>Мінімальна система</name>
+ <name xml:lang='zh_CN'>最小安装</name>
+ <name xml:lang='zh_TW'>最小型安裝</name>
+ <description>Installs an OPNFV Provisioning Server</description>
+ <description xml:lang='as'>মৌলি কাৰ্য্যকৰীতা।</description>
+ <description xml:lang='bn_IN'>প্রাথমিক বৈশিষ্ট্য।</description>
+ <description xml:lang='cs'>Základní funkcionalita.</description>
+ <description xml:lang='de'>Grundlegende Funktionalität.</description>
+ <description xml:lang='es'>Funcionalidad básica.</description>
+ <description xml:lang='fr'>Fonctionnalité de base.</description>
+ <description xml:lang='gu'>મૂળભૂત વિધેય.</description>
+ <description xml:lang='hi'>मौलिक प्रकार्यात्मकता.</description>
+ <description xml:lang='it'>Funzione di base.</description>
+ <description xml:lang='ja'>基本的な機能です。</description>
+ <description xml:lang='kn'>ಮೂಲಭೂತ ಕ್ರಿಯಾಶೀಲತೆ.</description>
+ <description xml:lang='ko'>기본적인 기능입니다.</description>
+ <description xml:lang='ml'>അടിസ്ഥാന പ്രവൃത്തിവിശേഷണം.</description>
+ <description xml:lang='mr'>मूळ कार्यक्षमता.</description>
+ <description xml:lang='or'>ସାଧାରଣ କାର୍ଯ୍ୟକାରିତା।</description>
+ <description xml:lang='pa'>ਮੁੱਢਲੀ ਕਾਰਜਸ਼ੀਲਤਾ।</description>
+ <description xml:lang='pl'>Podstawowa funkcjonalność.</description>
+ <description xml:lang='pt_BR'>Função básica</description>
+ <description xml:lang='ru'>Базовая функциональность.</description>
+ <description xml:lang='ta'>அடிப்படை செயலம்சம்.</description>
+ <description xml:lang='te'>ప్రాథమిక ఫంక్షనాలిటి.</description>
+ <description xml:lang='uk'>Основні можливості.</description>
+ <description xml:lang='zh_CN'>基本功能。</description>
+ <description xml:lang='zh_TW'>基本功能。</description>
+ <display_order>5</display_order>
+ <grouplist>
+ <groupid>core</groupid>
+ </grouplist>
+ <optionlist>
+
+ </optionlist>
+ </environment>
+ <langpacks>
+ <match install="autocorr-%s" name="autocorr-en"/>
+ <match install="firefox-langpack-%s" name="firefox"/>
+ <match install="gimp-help-%s" name="gimp-help"/>
+ <match install="gnome-getting-started-docs-%s" name="gnome-getting-started-docs"/>
+ <match install="hunspell-%s" name="hunspell"/>
+ <match install="hyphen-%s" name="hyphen"/>
+ <match install="kde-l10n-%s" name="kdelibs"/>
+ <match install="libreoffice-langpack-%s" name="libreoffice-core"/>
+ <match install="man-pages-%s" name="man-pages"/>
+ <match install="mythes-%s" name="mythes"/>
+ </langpacks>
+
+</comps>
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 <<EOI
+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 ''
+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 <<EOI
-if ! rpm -q rdo-release > /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" <<EOI
+if ! rpm -q epel-release > /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 <<EOI
-#echo "Running undercloud install"
-#openstack undercloud install
-#dontexit=\$(openstack undercloud install)
-#openstack undercloud install && sudo halt -p
-#EOI
+# install undercloud on Undercloud VM
+ssh -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" "openstack undercloud install"
+
+# make a copy of instack VM's definitions, and disk image
+# it must be stopped to make a copy of its disk image
+ssh -T -o "StrictHostKeyChecking no" stack@localhost <<EOI
echo "Shuttind down instack to take snapshop"
virsh shutdown instack
echo "Waiting for instack VM to shutdown"
-while virsh list | grep instack; do
+CNT=20
+while virsh list | grep instack > /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 <dradez@redhatcom> - 2.0-1
+- Migrated to RDO Manager
+* Fri Apr 24 2015 Dan Radez <dradez@redhatcom> - 0.1-1
+- Initial Packaging