summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile278
-rw-r--r--build/cache.sh29
-rw-r--r--build/instackenv.json.example74
-rw-r--r--build/mvn_settings.xml106
-rw-r--r--build/opnfv-puppet-tripleo.patch62
-rw-r--r--build/osc_auth_fix.diff33
-rwxr-xr-xbuild/overcloud-full.sh84
-rwxr-xr-xbuild/overcloud-onos.sh10
-rwxr-xr-xbuild/overcloud-opendaylight.sh50
-rw-r--r--build/rpm_specs/opnfv-apex-onos.spec4
-rw-r--r--build/rpm_specs/opnfv-apex.spec4
-rwxr-xr-xbuild/undercloud.sh39
-rw-r--r--build/variables.sh5
13 files changed, 229 insertions, 549 deletions
diff --git a/build/Makefile b/build/Makefile
index 88a6e962..4786d2d3 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -40,19 +40,24 @@ export RPMUDR = $(shell pwd)/noarch/opnfv-apex-undercloud-$(RPMVERS)-$(shell ech
export RPMODL = $(shell pwd)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMONO = $(shell pwd)/noarch/opnfv-apex-onos-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
+export BUILD_DIR = $(shell dirname $$(pwd))/.build
+export CACHE_DIR = $(shell dirname $$(pwd))/.cache
+export RPM_DIR_ARGS = -D '_topdir $(BUILD_DIR)' -D '_builddir $(BUILD_DIR)' -D '_sourcedir $(BUILD_DIR)' -D '_rpmdir $(BUILD_DIR)' -D '_specdir $(BUILD_DIR)' -D '_srcrpmdir $(BUILD_DIR)'
+
.PHONY: all
all: iso
.PHONY: clean
-clean: images-clean rpms-clean iso-clean tacker-clean tackerclient-clean congress-clean networking-vpp-clean
+clean:
+ rm -rf $(BUILD_DIR)
+
+.PHONY: clean-cache
+clean-cache:
+ rm -rf $(CACHE_DIR)
.PHONY: images
images: undercloud overcloud-full overcloud-opendaylight overcloud-onos
-.PHONY: images-clean
-images-clean: undercloud-clean overcloud-full-clean overcloud-opendaylight-clean overcloud-onos-clean
- rm -rf images/
-
.PHONY: rpms
rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
@@ -60,50 +65,40 @@ rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
.PHONY: rpms-clean
-rpms-clean: release-rpm-clean common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean
- rm -rf noarch
- rm -rf BUILDROOT
+rpms-clean:
+ rm -rf $(BUILD_DIR)/noarch
+ rm -rf $(BUILD_DIR)/BUILDROOT
-opnfv-apex-release.tar.gz:
- pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-release-$(RELRPMVERS)/ HEAD > build/opnfv-apex-release.tar.gz
+$(BUILD_DIR)/opnfv-apex-release.tar.gz:
+ mkdir -p $(BUILD_DIR)
+ pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-release-$(RELRPMVERS)/ HEAD > $(BUILD_DIR)/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 '_-')"
+release-rpm-check: $(BUILD_DIR)/opnfv-apex-release.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-release.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
.PHONY: release-rpm
-release-rpm: opnfv-apex-release.tar.gz $(RPMREL)
+release-rpm: $(BUILD_DIR)/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 '_-')"
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-release.spec $(RPM_DIR_ARGS) -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
+$(BUILD_DIR)/opnfv-apex-common.tar.gz:
+ pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-common-$(RPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-common.tar.gz
.PHONY: common-rpm-check
-common-rpm-check: opnfv-apex-common.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-common.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 '_-')"
+common-rpm-check: $(BUILD_DIR)/opnfv-apex-common.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-common.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
.PHONY: common-rpm
-common-rpm: opnfv-apex-common.tar.gz $(RPMCOM)
+common-rpm: $(BUILD_DIR)/opnfv-apex-common.tar.gz $(RPMCOM)
$(RPMCOM):
@echo "Building the Apex Common RPM"
# build the common RPM
- rpmbuild --clean -ba rpm_specs/opnfv-apex-common.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: common-rpm-clean
-common-rpm-clean:
- rm -rf opnfv-apex-common-$(RPMVERS)
- rm -rf opnfv-apex-common.tar.gz
-
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-common.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
##################
# PYTHON TESTS #
@@ -133,149 +128,105 @@ python-pep8-check:
# TACKER #
###############
-.PHONY: tacker-clean
-
-tacker-clean:
- rm -rf openstack-tacker-2016.2
- rm -f openstack-tacker.tar.gz
-
-openstack-tacker.tar.gz:
+$(BUILD_DIR)/openstack-tacker.tar.gz:
@echo "Preparing the Tacker RPM prerequisites"
- git clone $(TACKER_REPO) -b $(TACKER_BRANCH) openstack-tacker-2016.2
- tar czf openstack-tacker.tar.gz openstack-tacker-2016.2
+ git clone $(TACKER_REPO) -b $(TACKER_BRANCH) $(BUILD_DIR)/openstack-tacker-2016.2
+ tar czf $(BUILD_DIR)/openstack-tacker.tar.gz -C $(BUILD_DIR) openstack-tacker-2016.2
.PHONY: tacker-rpm
-tacker-rpm: openstack-tacker.tar.gz noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm
+tacker-rpm: $(BUILD_DIR)/openstack-tacker.tar.gz $(BUILD_DIR)/noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm
-noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm:
+$(BUILD_DIR)/noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm:
@echo "Building the Tacker RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/openstack-tacker.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 'git .git$(TACKER_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/openstack-tacker.spec $(RPM_DIR_ARGS) -D 'git .git$(TACKER_COMMIT)'
#################
# TACKERCLIENT #
#################
-.PHONY: tackerclient-clean
-tackerclient-clean:
- rm -rf python-tackerclient-2016.2
- rm -f python-tackerclient.tar.gz
-
-python-tackerclient.tar.gz:
+$(BUILD_DIR)/python-tackerclient.tar.gz:
@echo "Preparing the TackerClient RPM prerequisites"
- git clone $(TACKERCLIENT_REPO) -b $(TACKERCLIENT_BRANCH) python-tackerclient-2016.2
- tar czf python-tackerclient.tar.gz python-tackerclient-2016.2
+ git clone $(TACKERCLIENT_REPO) -b $(TACKERCLIENT_BRANCH) $(BUILD_DIR)/python-tackerclient-2016.2
+ tar czf $(BUILD_DIR)/python-tackerclient.tar.gz -C $(BUILD_DIR) python-tackerclient-2016.2
.PHONY: tackerclient-rpm
-tackerclient-rpm: python-tackerclient.tar.gz noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm
+tackerclient-rpm: $(BUILD_DIR)/python-tackerclient.tar.gz $(BUILD_DIR)/noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm
-noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm:
+$(BUILD_DIR)/noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm:
@echo "Building the TackerClient RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/python-tackerclient.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 'git .git$(TACKERCLIENT_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/python-tackerclient.spec $(RPM_DIR_ARGS) -D 'git .git$(TACKERCLIENT_COMMIT)'
###############
# CONGRESS #
###############
-.PHONY: congress-clean
-congress-clean:
- @rm -rf openstack-congress-2016.1
- @rm -f openstack-congress.tar.gz
-
-openstack-congress.tar.gz:
+$(BUILD_DIR)/openstack-congress.tar.gz:
@echo "Preparing the Congress RPM prerequisites"
- git clone $(CONGRESS_REPO) -b $(CONGRESS_BRANCH) openstack-congress-2016.1
- cd openstack-congress-2016.1 && curl -O https://radez.fedorapeople.org/openstack-congress.service
- tar czf openstack-congress.tar.gz openstack-congress-2016.1
+ git clone $(CONGRESS_REPO) -b $(CONGRESS_BRANCH) $(BUILD_DIR)/openstack-congress-2016.1
+ cd $(BUILD_DIR)/openstack-congress-2016.1 && curl -O https://radez.fedorapeople.org/openstack-congress.service
+ tar czf $(BUILD_DIR)/openstack-congress.tar.gz -C $(BUILD_DIR) openstack-congress-2016.1
.PHONY: congress-rpm
-congress-rpm: openstack-congress.tar.gz noarch/openstack-congress-2016.1-1.git$(CONGRESS_COMMIT).noarch.rpm
+congress-rpm: $(BUILD_DIR)/openstack-congress.tar.gz $(BUILD_DIR)/noarch/openstack-congress-2016.1-1.git$(CONGRESS_COMMIT).noarch.rpm
-noarch/openstack-congress-2016.1-1.git$(CONGRESS_COMMIT).noarch.rpm:
+$(BUILD_DIR)/noarch/openstack-congress-2016.1-1.git$(CONGRESS_COMMIT).noarch.rpm:
@echo "Building the Congress RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/openstack-congress.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 'git .git$(CONGRESS_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/openstack-congress.spec $(RPM_DIR_ARGS) -D 'git .git$(CONGRESS_COMMIT)'
##################
# NETWORKING-VPP #
##################
-.PHONY: networking-vpp-clean
-networking-vpp-clean:
- @rm -rf networking-vpp
- @rm -rf networking-vpp-*
- @rm -f networking-vpp.tar.gz
- @rm -f networking-vpp-agent.service
-
-networking-vpp.tar.gz:
+$(BUILD_DIR)/networking-vpp.tar.gz:
@echo "Preparing the networking-vpp RPM prerequisites"
- git clone $(NETVPP_REPO) networking-vpp-$(NETVPP_VERS)
- tar czf networking-vpp.tar.gz networking-vpp-$(NETVPP_VERS)
+ git clone $(NETVPP_REPO) $(BUILD_DIR)/networking-vpp-$(NETVPP_VERS)
+ tar czf $(BUILD_DIR)/networking-vpp.tar.gz -C $(BUILD_DIR) networking-vpp-$(NETVPP_VERS)
.PHONY: networking-vpp-rpm
-networking-vpp-rpm: noarch/networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm
+networking-vpp-rpm: $(BUILD_DIR)/noarch/networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm
-noarch/networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm: networking-vpp.tar.gz
+$(BUILD_DIR)/noarch/networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm: $(BUILD_DIR)/networking-vpp.tar.gz
@echo "Building the Networking VPP RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/networking-vpp.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 'git .git$(NETVPP_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/networking-vpp.spec $(RPM_DIR_ARGS) -D 'git .git$(NETVPP_COMMIT)'
###############
# UNDERCLOUD #
###############
-.PHONY: undercloud-clean
-undercloud-clean:
- rm -f images/undercloud.*
- rm -rf opnfv-tht.tar.gz
- rm -rf opnfv-tht/
-
.PHONY: undercloud
-undercloud: images/undercloud.qcow2
+undercloud: $(BUILD_DIR)/undercloud.qcow2
-images/undercloud.qcow2: tackerclient-rpm
+$(BUILD_DIR)/undercloud.qcow2: tackerclient-rpm
@echo "Building the Apex Undercloud Image"
@./undercloud.sh
-opnfv-apex-undercloud.tar.gz: images/undercloud.qcow2
+$(BUILD_DIR)/opnfv-apex-undercloud.tar.gz: $(BUILD_DIR)/undercloud.qcow2
@echo "Preparing the Apex Undercloud RPM prerequisites"
- pushd ../ && git archive --format=tar --prefix=opnfv-apex-undercloud-$(RPMVERS)/ HEAD > build/opnfv-apex-undercloud.tar
- tar -rf opnfv-apex-undercloud.tar \
- --xform="s:images/undercloud.qcow2:opnfv-apex-undercloud-$(RPMVERS)/build/undercloud.qcow2:" images/undercloud.qcow2
- gzip -f opnfv-apex-undercloud.tar
+ pushd ../ && git archive --format=tar --prefix=opnfv-apex-undercloud-$(RPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-undercloud.tar
+ tar -rf $(BUILD_DIR)/opnfv-apex-undercloud.tar \
+ --xform="s:.*undercloud.qcow2:opnfv-apex-undercloud-$(RPMVERS)/build/undercloud.qcow2:" $(BUILD_DIR)/undercloud.qcow2
+ gzip -f $(BUILD_DIR)/opnfv-apex-undercloud.tar
.PHONY: undercloud-rpm-check
-undercloud-rpm-check: opnfv-apex-undercloud.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-undercloud.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 '_-')"
+undercloud-rpm-check: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
.PHONY: undercloud-rpm
-undercloud-rpm: opnfv-apex-undercloud.tar.gz $(RPMUDR)
+undercloud-rpm: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz $(RPMUDR)
$(RPMUDR):
@echo "Building the Apex Undercloud RPM"
- rpmbuild --clean -ba rpm_specs/opnfv-apex-undercloud.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: undercloud-rpm-clean
-undercloud-rpm-clean:
- rm -rf opnfv-apex-undercloud-$(RPMVERS)
- rm -rf opnfv-apex-undercloud.tar.gz
-
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
###############
# OVERCLOUD #
###############
-.PHONY: overcloud-full-clean
-overcloud-full-clean:
- rm -rf images/overcloud-full.d
- rm -f images/overcloud-full.*
- rm -rf opnfv-puppet-tripleo.tar.gz
- rm -rf opnfv-puppet-tripleo/
- rm -rf os-net-config.tar.gz
- rm -rf os-net-config/
-
.PHONY: overcloud-full
-overcloud-full: images/overcloud-full.qcow2
+overcloud-full: $(BUILD_DIR)/overcloud-full.qcow2
-images/overcloud-full.qcow2: congress-rpm tacker-rpm networking-vpp-rpm
+$(BUILD_DIR)/overcloud-full.qcow2: congress-rpm tacker-rpm networking-vpp-rpm
@echo "Building the Apex Base Overcloud Image"
@./overcloud-full.sh
@@ -283,75 +234,53 @@ images/overcloud-full.qcow2: congress-rpm tacker-rpm networking-vpp-rpm
# ODL #
###############
-.PHONY: overcloud-opendaylight-clean
-overcloud-opendaylight-clean:
- @rm -f images/overcloud-full-opendaylight.qcow2
-
.PHONY: overcloud-opendaylight
-overcloud-opendaylight: images/overcloud-full-opendaylight.qcow2
+overcloud-opendaylight: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
-images/overcloud-full-opendaylight.qcow2: images/overcloud-full.qcow2
+$(BUILD_DIR)/overcloud-full-opendaylight.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
@echo "Building the Apex OpenDaylight Overcloud Image"
@./overcloud-opendaylight.sh
-opnfv-apex.tar.gz: images/overcloud-full-opendaylight.qcow2
- tar -czf opnfv-apex.tar.gz --xform="s:images/overcloud-full-opendaylight.qcow2:opnfv-apex-$(RPMVERS)/build/images/overcloud-full-opendaylight.qcow2:" images/overcloud-full-opendaylight.qcow2
+$(BUILD_DIR)/opnfv-apex.tar.gz: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
+ tar -czf $(BUILD_DIR)/opnfv-apex.tar.gz --xform="s:.*overcloud-full-opendaylight.qcow2:opnfv-apex-$(RPMVERS)/build/overcloud-full-opendaylight.qcow2:" $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
.PHONY: opendaylight-rpm-check
-opendaylight-rpm-check: opnfv-apex.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/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 $(RELEASE) | tr -d '_-')"
+opendaylight-rpm-check: $(BUILD_DIR)/opnfv-apex.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
.PHONY: opendaylight-rpm
-opendaylight-rpm: opnfv-apex.tar.gz $(RPMODL)
+opendaylight-rpm: $(BUILD_DIR)/opnfv-apex.tar.gz $(RPMODL)
$(RPMODL):
@echo "Building the Apex OpenDaylight RPM"
# build the overcloud RPM
- rpmbuild --clean -ba rpm_specs/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 $(RELEASE) | tr -d '_-')"
-
-.PHONY: opendaylight-rpm-clean
-opendaylight-rpm-clean:
- rm -rf opnfv-apex-$(RPMVERS)
- rm -rf opnfv-apex.tar.gz
-
+ rpmbuild --clean -ba rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
###############
# ONOS #
###############
-.PHONY: overcloud-onos-clean
-overcloud-onos-clean:
- @rm -f images/overcloud-full-onos.qcow2
- @rm -rf images/puppet-onos
- @rm -f images/puppet-onos.tar.gz
-
.PHONY: overcloud-onos
-overcloud-onos: images/overcloud-full-onos.qcow2
+overcloud-onos: $(BUILD_DIR)/overcloud-full-onos.qcow2
-images/overcloud-full-onos.qcow2: images/overcloud-full.qcow2
+$(BUILD_DIR)/overcloud-full-onos.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
@echo "Building the Apex ONOS Overcloud Image"
@./overcloud-onos.sh
-.PHONY: onos-rpm-clean
-onos-rpm-clean:
- @#rpmbuild --clean rpm_specs/opnfv-apex-onos.spec -D "release $(shell echo $RELEASE | tr -d '_-')"
- rm -rf opnfv-apex-onos-$(RPMVERS)
- rm -rf opnfv-apex-onos.tar.gz
-
-opnfv-apex-onos.tar.gz: images/overcloud-full-onos.qcow2
- tar -czf opnfv-apex-onos.tar.gz --xform="s:images/overcloud-full-onos.qcow2:opnfv-apex-onos-$(RPMVERS)/build/images/overcloud-full-onos.qcow2:" images/overcloud-full-onos.qcow2
+$(BUILD_DIR)/opnfv-apex-onos.tar.gz: $(BUILD_DIR)/overcloud-full-onos.qcow2
+ tar -czf $(BUILD_DIR)/opnfv-apex-onos.tar.gz --xform="s:.*overcloud-full-onos.qcow2:opnfv-apex-onos-$(RPMVERS)/build/overcloud-full-onos.qcow2:" $(BUILD_DIR)/overcloud-full-onos.qcow2
.PHONY: onos-rpm-check
-onos-rpm-check: opnfv-apex-onos.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-onos.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 '_-')"
+onos-rpm-check: $(BUILD_DIR)/opnfv-apex-onos.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
.PHONY: onos-rpm
-onos-rpm: opnfv-apex-onos.tar.gz $(RPMONO)
+onos-rpm: $(BUILD_DIR)/opnfv-apex-onos.tar.gz $(RPMONO)
$(RPMONO):
@echo "Building the Apex ONOS RPM"
# build the overcloud RPM
- rpmbuild --clean -ba rpm_specs/opnfv-apex-onos.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 '_-')"
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
###############
# ISO #
@@ -360,7 +289,6 @@ $(RPMONO):
$(CENTISO):
curl $(CENTDNLD) -z $(CENTISO) -o $(CENTISO) --verbose --silent --location
-.PHONY: iso-clean
iso-clean:
@rm -Rf centos
@rm -Rf release
@@ -417,37 +345,27 @@ iso: iso-clean images rpms $(CENTISO)
####################
.PHONY: python3-jinja2
-python3-jinja2: python3-markupsafe python-jinja2-2.8-5.fc24.src.rpm
- curl -O http://ftp.linux.ncsu.edu/pub/fedora/linux//development/24/Everything/source/tree/Packages/p/python-jinja2-2.8-5.fc24.src.rpm
- rpm2cpio python-jinja2-2.8-5.fc24.src.rpm | cpio -idmv
- sed -i 's/python3-devel/python34-devel/' python-jinja2.spec
- sed -i 's/python3-setuptools/python34-setuptools/' python-jinja2.spec
- sed -i 's/python3-pytest/python34-pytest/' python-jinja2.spec
- sed -i 's/python3-markupsafe/python34-markupsafe/' python-jinja2.spec
- rpmbuild -ba python-jinja2.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 "with_python3 1"
-
-.PHONY: python3-jinja2-clean
-python3-jinja2-clean:
- rm -f python-jinja2-2.8-5.fc24.src.rpm
- rm -f python-jinja2.spec
- rm -f Jinja2-2.8.tar.gz
+python3-jinja2: python3-markupsafe
+ cd $(BUILD_DIR) \
+ && curl -O -L artifacts.opnfv.org/apex/dependencies/python-jinja2-2.8-5.fc24.src.rpm \
+ && rpm2cpio python-jinja2-2.8-5.fc24.src.rpm | cpio -idmv \
+ && sed -i 's/python3-devel/python34-devel/' python-jinja2.spec \
+ && sed -i 's/python3-setuptools/python34-setuptools/' python-jinja2.spec \
+ && sed -i 's/python3-pytest/python34-pytest/' python-jinja2.spec \
+ && sed -i 's/python3-markupsafe/python34-markupsafe/' python-jinja2.spec \
+ && rpmbuild -ba python-jinja2.spec $(RPM_DIR_ARGS) -D "with_python3 1"
########################
# python3-markupsafe #
########################
.PHONY: python3-markupsafe
-python3-markupsafe: python-markupsafe-0.23-9.fc24.src.rpm
- curl -O http://ftp.linux.ncsu.edu/pub/fedora/linux//development/24/Everything/source/tree/Packages/p/python-markupsafe-0.23-9.fc24.src.rpm
- rpm2cpio python-markupsafe-0.23-9.fc24.src.rpm | cpio -idmv
- sed -i 's/python3-devel/python34-devel/' python-markupsafe.spec
- sed -i 's/python3-setuptools/python34-setuptools/' python-markupsafe.spec
- sed -i 's/python3-pytest/python34-pytest/' python-markupsafe.spec
- sed -i 's/python3-markupsafe/python34-markupsafe/' python-markupsafe.spec
- rpmbuild -ba python-markupsafe.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 "with_python3 1"
-
-.PHONY: python3-markupsafe-clean
-python3-markupsafe-clean:
- rm -f python-markupsafe-0.23-9.fc24.src.rpm
- rm -f python-markupsafe.spec
- rm -f MarkupSafe-0.23.tar.gz
+python3-markupsafe:
+ cd $(BUILD_DIR) \
+ && curl -O -L artifacts.opnfv.org/apex/dependencies/python-markupsafe-0.23-9.fc24.src.rpm \
+ && rpm2cpio python-markupsafe-0.23-9.fc24.src.rpm | cpio -idmv \
+ && sed -i 's/python3-devel/python34-devel/' python-markupsafe.spec \
+ && sed -i 's/python3-setuptools/python34-setuptools/' python-markupsafe.spec \
+ && sed -i 's/python3-pytest/python34-pytest/' python-markupsafe.spec \
+ && sed -i 's/python3-markupsafe/python34-markupsafe/' python-markupsafe.spec \
+ && rpmbuild -ba python-markupsafe.spec $(RPM_DIR_ARGS) -D "with_python3 1"
diff --git a/build/cache.sh b/build/cache.sh
index 0c2da399..4c530b02 100644
--- a/build/cache.sh
+++ b/build/cache.sh
@@ -7,9 +7,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-
-CACHE_DIR="$(pwd)/.cache"
-CACHE_HISTORY=".cache_history"
+source ./variables.sh
# Make sure the cache dir exists
function cache_dir {
@@ -19,10 +17,6 @@ function cache_dir {
echo "Cache Dir: $CACHE_DIR"
}
-function cache_git_tar {
- echo "cache_git_tar git ls-remote"
-}
-
# $1 = download url
# $2 = filename to write to
function curl_file {
@@ -52,22 +46,22 @@ function populate_cache {
# check if the cache file exists
# and if it has an md5 compare that
- echo "Checking cache file exists: ${filename}"
+ echo "Checking if cache file exists: ${filename}"
if [ ! -f $CACHE_DIR/${filename} ]; then
echo "Cache file: ${CACHE_DIR}/${filename} missing...will download..."
curl_file $1 $filename
else
echo "Cache file exists...comparing MD5 checksum"
- if [ -z $remote_md5 ]; then
+ if [ -z "$remote_md5" ]; then
remote_md5="$(curl -sf -L ${1}.md5 | awk {'print $1'})"
fi
if [ -z "$remote_md5" ]; then
echo "Got empty MD5 from remote for $filename, skipping MD5 check"
curl_file $1 $filename
else
- my_md5=$(grep ${filename} $CACHE_HISTORY | awk {'print $1'})
+ my_md5=$(grep ${filename} ${CACHE_DIR}/${CACHE_HISTORY} | awk {'print $1'})
if [ -z "$my_md5" ]; then
- echo "${filename} missing in $CACHE_HISTORY file. Caculating md5..."
+ echo "${filename} missing in ${CACHE_HISTORY} file. Caculating md5..."
my_md5=$(md5sum ${CACHE_DIR}/${filename} | awk {'print $1'})
fi
if [ "$remote_md5" != "$my_md5" ]; then
@@ -81,16 +75,3 @@ function populate_cache {
fi
fi
}
-
-# $1 = filename to get from cache
-# $2 = destintation
-function get_cached_file {
- if [ ! -f $CACHE_DIR/$1 ]; then
- echo "Cache file: ${CACHE_DIR}/$1 is not in cache."
- else
- echo "Cache file: Using cached file ${CACHE_DIR}/$1."
- dest='.'
- if [ -n $2 ]; then dest=$2; fi
- cp -f $CACHE_DIR/$1 $dest
- fi
-}
diff --git a/build/instackenv.json.example b/build/instackenv.json.example
deleted file mode 100644
index 370ff202..00000000
--- a/build/instackenv.json.example
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "nodes": [
- {
- "cpu": "24",
- "memory": "64220",
- "disk": "40",
- "arch": "x86_64",
- "mac": [
- "b8:ca:3a:63:8b:58"
- ],
- "pm_type": "pxe_ipmitool",
- "pm_addr": "10.1.8.70",
- "pm_user": "root",
- "pm_password": "password",
- "capabilities": "profile:control"
- },
- {
- "cpu": "24",
- "memory": "64220",
- "disk": "40",
- "arch": "x86_64",
- "mac": [
- "b8:ca:3a:63:87:88"
- ],
- "pm_type": "pxe_ipmitool",
- "pm_addr": "10.1.8.73",
- "pm_user": "root",
- "pm_password": "password",
- "capabilities": "profile:control"
- },
- {
- "cpu": "24",
- "memory": "64220",
- "disk": "40",
- "arch": "x86_64",
- "mac": [
- "b8:ca:3a:63:87:10"
- ],
- "pm_type": "pxe_ipmitool",
- "pm_addr": "10.1.8.74",
- "pm_user": "root",
- "pm_password": "password",
- "capabilities": "profile:control"
- },
- {
- "cpu": "24",
- "memory": "64220",
- "disk": "40",
- "arch": "x86_64",
- "mac": [
- "B8:CA:3A:63:87:48"
- ],
- "pm_type": "pxe_ipmitool",
- "pm_addr": "10.1.8.76",
- "pm_user": "root",
- "pm_password": "password",
- "capabilities": "profile:compute"
- },
- {
- "cpu": "24",
- "memory": "64220",
- "disk": "40",
- "arch": "x86_64",
- "mac": [
- "B8:CA:3A:63:8B:18"
- ],
- "pm_type": "pxe_ipmitool",
- "pm_addr": "10.1.8.78",
- "pm_user": "root",
- "pm_password": "password",
- "capabilities": "profile:compute"
- }
- ]
-}
diff --git a/build/mvn_settings.xml b/build/mvn_settings.xml
deleted file mode 100644
index c774461c..00000000
--- a/build/mvn_settings.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=2 tabstop=2: -->
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
-
- <profiles>
- <profile>
- <id>fd.io-release</id>
- <repositories>
- <repository>
- <id>fd.io-mirror</id>
- <name>fd.io-mirror</name>
- <url>https://nexus.fd.io/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>fd.io-mirror</id>
- <name>fd.io-mirror</name>
- <url>https://nexus.fd.io/content/repositories/public/</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
-
- <profile>
- <id>fd.io-snapshots</id>
- <repositories>
- <repository>
- <id>fd.io-snapshot</id>
- <name>fd.io-snapshot</name>
- <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>fd.io-snapshot</id>
- <name>fd.io-snapshot</name>
- <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- <profile>
- <id>opendaylight-snapshots</id>
- <repositories>
- <repository>
- <id>opendaylight-snapshot</id>
- <name>opendaylight-snapshot</name>
- <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>opendaylight-shapshot</id>
- <name>opendaylight-snapshot</name>
- <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
-
- <activeProfiles>
- <activeProfile>fd.io-release</activeProfile>
- <activeProfile>fd.io-snapshots</activeProfile>
- <activeProfile>opendaylight-snapshots</activeProfile>
- </activeProfiles>
-</settings>
-
diff --git a/build/opnfv-puppet-tripleo.patch b/build/opnfv-puppet-tripleo.patch
deleted file mode 100644
index 99d3c742..00000000
--- a/build/opnfv-puppet-tripleo.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 9f012bc3e4f23fa756f5435ee69e5d51dd6fc874 Mon Sep 17 00:00:00 2001
-From: Tim Rozet <tdrozet@gmail.com>
-Date: Thu, 3 Mar 2016 14:36:11 -0500
-Subject: [PATCH] Adds ODL to load balancer
-
----
- manifests/loadbalancer.pp | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
-index 2fcfac6..6e13566 100644
---- a/manifests/loadbalancer.pp
-+++ b/manifests/loadbalancer.pp
-@@ -247,6 +247,10 @@
- # (optional) Enable or not Redis binding
- # Defaults to false
- #
-+# [*opendaylight*]
-+# (optional) Enable or not OpenDaylight binding
-+# Defaults to false
-+#
- class tripleo::loadbalancer (
- $controller_virtual_ip,
- $control_virtual_interface,
-@@ -299,6 +303,7 @@ class tripleo::loadbalancer (
- $mysql_clustercheck = false,
- $rabbitmq = false,
- $redis = false,
-+ $opendaylight = false,
- ) {
-
- if !$controller_host and !$controller_hosts {
-@@ -1044,4 +1049,26 @@ class tripleo::loadbalancer (
- }
- }
-
-+ $opendaylight_api_vip = hiera('opendaylight_api_vip', $controller_virtual_ip)
-+ $opendaylight_bind_opts = {
-+ "${opendaylight_api_vip}:8081" => [],
-+ "${public_virtual_ip}:8081" => [],
-+ }
-+
-+ if $opendaylight {
-+ haproxy::listen { 'opendaylight':
-+ bind => $opendaylight_bind_opts,
-+ options => {
-+ 'balance' => 'source',
-+ },
-+ collect_exported => false,
-+ }
-+ haproxy::balancermember { 'opendaylight':
-+ listening_service => 'opendaylight',
-+ ports => '8081',
-+ ipaddresses => hiera('opendaylight_api_node_ips', $controller_hosts_real),
-+ server_names => $controller_hosts_names_real,
-+ options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
-+ }
-+ }
- }
---
-2.5.0
-
diff --git a/build/osc_auth_fix.diff b/build/osc_auth_fix.diff
new file mode 100644
index 00000000..29aee3f8
--- /dev/null
+++ b/build/osc_auth_fix.diff
@@ -0,0 +1,33 @@
+From fc370104156810cb4f65a3235d6bf6ab65f028bd Mon Sep 17 00:00:00 2001
+From: Boris Bobrov <bbobrov@mirantis.com>
+Date: Thu, 17 Nov 2016 13:46:21 +0300
+Subject: [PATCH] Use project_domain_id only in password auth
+
+The method being changed constructs domain-related parameters that will
+further be passed to the auth plugin. If project domain is not
+passed, the method sets it to the default domain.
+
+token_endpoint does not expect any information about domain,
+because it uses only a token and URL. Passing it to auth plugin causes
+an exception.
+
+Construct domain-related parameters only for specific plugins, such
+as password or totp.
+
+Change-Id: I13db3bbe31a0ed843e9f4528d37c768546e2bee9
+Closes-Bug: 1642301
+(cherry picked from commit e51a8d63747932f2ee4ffab02dfb0cd43e4a103d)
+---
+
+diff --git a/openstackclient/common/client_config.py b/openstackclient/common/client_config.py
+index 895909e..e23b07b 100644
+--- a/openstackclient/common/client_config.py
++++ b/openstackclient/common/client_config.py
+@@ -148,6 +148,7 @@
+ # present, then do not change the behaviour. Otherwise, set the
+ # PROJECT_DOMAIN_ID to 'OS_DEFAULT_DOMAIN' for better usability.
+ if (
++ auth_type in ("password", "v3password", "v3totp") and
+ not config['auth'].get('project_domain_id') and
+ not config['auth'].get('project_domain_name')
+ ):
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index d08c4115..ce2fcdfe 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -7,65 +7,54 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-set -e
+set -xe
source ./cache.sh
source ./variables.sh
source ./functions.sh
populate_cache "$rdo_images_uri/overcloud-full.tar"
-if [ ! -d images/ ]; then mkdir images; fi
-tar -xf cache/overcloud-full.tar -C images/
-mv -f images/overcloud-full.qcow2 images/overcloud-full_build.qcow2
+if [ ! -d ${BUILD_DIR} ]; then mkdir ${BUILD_DIR}; fi
+tar -xf ${CACHE_DIR}/overcloud-full.tar -C ${BUILD_DIR}/
+mv -f ${BUILD_DIR}/overcloud-full.qcow2 ${BUILD_DIR}/overcloud-full_build.qcow2
##########################################################
##### Prep initial overcloud image with common deps #####
##########################################################
+pushd ${BUILD_DIR} > /dev/null
+
# prep opnfv-puppet-tripleo for undercloud
clone_fork opnfv-puppet-tripleo
pushd opnfv-puppet-tripleo > /dev/null
-git archive --format=tar.gz --prefix=tripleo/ HEAD > ../opnfv-puppet-tripleo.tar.gz
+git archive --format=tar.gz --prefix=tripleo/ HEAD > ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz
popd > /dev/null
# download customized os-net-config
rm -fr os-net-config
git clone https://github.com/trozet/os-net-config.git -b stable/colorado
-pushd os-net-config > /dev/null
-pushd os_net_config > /dev/null
-git archive --format=tar.gz --prefix=os_net_config/ HEAD > ../../os-net-config.tar.gz
-popd > /dev/null
+pushd os-net-config/os_net_config > /dev/null
+git archive --format=tar.gz --prefix=os_net_config/ HEAD > ${BUILD_DIR}/os-net-config.tar.gz
popd > /dev/null
-pushd images > /dev/null
-
dpdk_pkg_str=''
for package in ${dpdk_rpms[@]}; do
wget "$dpdk_uri_base/$package"
- dpdk_pkg_str+=" --upload $package:/root/dpdk_rpms"
+ dpdk_pkg_str+=" --upload ${BUILD_DIR}/${package}:/root/dpdk_rpms"
done
# tar up the congress puppet module
rm -rf puppet-congress
git clone -b stable/mitaka https://github.com/radez/puppet-congress
pushd puppet-congress > /dev/null
-git archive --format=tar.gz --prefix=congress/ origin/stable/mitaka > ../puppet-congress.tar.gz
+git archive --format=tar.gz --prefix=congress/ origin/stable/mitaka > ${BUILD_DIR}/puppet-congress.tar.gz
popd > /dev/null
-# create fd.io yum repo file
-#cat > /tmp/fdio-master.repo << EOF
-#[fdio-master]
-#name=fd.io master branch latest merge
-#baseurl=https://nexus.fd.io/content/repositories/fd.io.master.centos7/
-#enabled=1
-#gpgcheck=0
-#EOF
-
# tar up the fd.io module
rm -rf puppet-fdio
git clone https://github.com/radez/puppet-fdio
pushd puppet-fdio > /dev/null
-git archive --format=tar.gz --prefix=fdio/ HEAD > ../puppet-fdio.tar.gz
+git archive --format=tar.gz --prefix=fdio/ HEAD > ${BUILD_DIR}/puppet-fdio.tar.gz
popd > /dev/null
# tar up vsperf
@@ -77,11 +66,11 @@ tar czf vsperf.tar.gz vsperf
rm -rf puppet-tacker
git clone https://github.com/openstack/puppet-tacker
pushd puppet-tacker > /dev/null
-git archive --format=tar.gz --prefix=tacker/ HEAD > ../puppet-tacker.tar.gz
+git archive --format=tar.gz --prefix=tacker/ HEAD > ${BUILD_DIR}/puppet-tacker.tar.gz
popd > /dev/null
# Master FD.IO Repo
-cat > /tmp/fdio.repo << EOF
+cat > ${BUILD_DIR}/fdio.repo << EOF
[fdio-master]
name=fd.io master branch latest merge
baseurl=https://nexus.fd.io/content/repositories/fd.io.master.centos7/
@@ -107,7 +96,7 @@ qemu-img resize overcloud-full_build.qcow2 +500MB
# install tacker
LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "xfs_growfs /dev/sda" \
- --upload ../opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \
+ --upload ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \
--run-command "yum update -y python-ipaddress rabbitmq-server erlang*" \
--run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \
--run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
@@ -115,11 +104,10 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \
--run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \
--run-command "mkdir /root/dpdk_rpms" \
- --upload /tmp/fdio.repo:/etc/yum.repos.d/fdio.repo \
+ --upload ${BUILD_DIR}/fdio.repo:/etc/yum.repos.d/fdio.repo \
$dpdk_pkg_str \
- --run-command "yum install --downloadonly --downloaddir=/root/fdio vpp vpp-devel vpp-lib vpp-python-api vpp-plugins" \
- $fdio_pkg_str \
- --upload ../noarch/$netvpp_pkg:/root/fdio \
+ --run-command "yum install --downloadonly --downloaddir=/root/fdio vpp-16.12 vpp-devel-16.12 vpp-lib-16.12 vpp-python-api-16.12 vpp-plugins-16.12" \
+ --upload ${BUILD_DIR}/noarch/$netvpp_pkg:/root/fdio \
--run-command "pip install distro flask_restful" \
--run-command "yum install -y etcd" \
--run-command "pip install python-etcd" \
@@ -128,38 +116,40 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install "centos-release-qemu-ev" \
--run-command "yum install -y qemu-kvm-ev-2.3.0-31.el7_2.21.1.x86_64" \
--run-command "yum remove -y qemu-system-x86" \
- --upload ../os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
+ --upload ${BUILD_DIR}/os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
--run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \
- --upload ../noarch/$congress_pkg:/root/ \
+ --upload ${BUILD_DIR}/noarch/$congress_pkg:/root/ \
--install /root/$congress_pkg \
--install "python2-congressclient" \
- --upload puppet-congress.tar.gz:/etc/puppet/modules/ \
+ --upload ${BUILD_DIR}/puppet-congress.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \
--run-command "cd /usr/lib/python2.7/site-packages/congress/datasources && curl -O $doctor_driver" \
--run-command "yum install -y /root/fdio/*.rpm" \
--run-command "rm -f /etc/sysctl.d/80-vpp.conf" \
--install unzip \
- --upload puppet-fdio.tar.gz:/etc/puppet/modules \
+ --upload ${BUILD_DIR}/puppet-fdio.tar.gz:/etc/puppet/modules \
--run-command "cd /etc/puppet/modules && tar xzf puppet-fdio.tar.gz" \
- --upload vsperf.tar.gz:/var/opt \
+ --upload ${BUILD_DIR}/vsperf.tar.gz:/var/opt \
--run-command "cd /var/opt && tar xzf vsperf.tar.gz" \
- --upload puppet-tacker.tar.gz:/etc/puppet/modules/ \
+ --upload ${BUILD_DIR}/puppet-tacker.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-tacker.tar.gz" \
- --upload ../noarch/$tacker_pkg:/root/ \
+ --upload ${BUILD_DIR}/noarch/$tacker_pkg:/root/ \
--install /root/$tacker_pkg \
- --upload ../noarch/$tackerclient_pkg:/root/ \
+ --upload ${BUILD_DIR}/noarch/$tackerclient_pkg:/root/ \
--install /root/$tackerclient_pkg \
--run-command "pip install python-senlinclient" \
- --upload ../neutron/agent/interface/interface.py:/usr/lib/python2.7/site-packages/neutron/agent/linux/ \
+ --upload ${BUILD_ROOT}/neutron/agent/interface/interface.py:/usr/lib/python2.7/site-packages/neutron/agent/linux/ \
--run-command "mkdir /root/fdio_neutron_l3" \
- --upload ../neutron/agent/l3/namespaces.py:/root/fdio_neutron_l3/ \
- --upload ../neutron/agent/l3/router_info.py:/root/fdio_neutron_l3/ \
- --upload ../puppet-neutron/manifests/agents/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/agents/ml2/ \
- --upload ../puppet-neutron/manifests/plugins/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/plugins/ml2/ \
- --upload ../puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb:/etc/puppet/modules/neutron/lib/puppet/type/ \
+ --upload ${BUILD_ROOT}/neutron/agent/l3/namespaces.py:/root/fdio_neutron_l3/ \
+ --upload ${BUILD_ROOT}/neutron/agent/l3/router_info.py:/root/fdio_neutron_l3/ \
+ --upload ${BUILD_ROOT}/puppet-neutron/manifests/agents/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/agents/ml2/ \
+ --upload ${BUILD_ROOT}/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/plugins/ml2/ \
+ --upload ${BUILD_ROOT}/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb:/etc/puppet/modules/neutron/lib/puppet/type/ \
--mkdir /etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp \
- --upload ../puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb:/etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp/ \
+ --upload ${BUILD_ROOT}/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb:/etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp/ \
--run-command "sed -i -E 's/timeout=[0-9]+/timeout=60/g' /usr/share/openstack-puppet/modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb" \
+ --upload ${BUILD_ROOT}/osc_auth_fix.diff:/tmp/ \
+ --run-command "cd /usr/lib/python2.7/site-packages/ && git apply /tmp/osc_auth_fix.diff" \
-a overcloud-full_build.qcow2
rm -rf ovs_nsh_patches
@@ -178,8 +168,8 @@ tar czf ovs.tar.gz ovs
# BUILD NSH OVS
LIBGUESTFS_BACKEND=direct virt-customize \
- --upload ../build_ovs_nsh.sh:/root/ \
- --upload ovs.tar.gz:/root/ \
+ --upload ${BUILD_ROOT}/build_ovs_nsh.sh:/root/ \
+ --upload ${BUILD_DIR}/ovs.tar.gz:/root/ \
--run-command "cd /root/ && tar xzf ovs.tar.gz" \
--run-command "cd /root/ovs && /root/build_ovs_nsh.sh" \
-a overcloud-full_build.qcow2
diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh
index 921ad506..c00cee7b 100755
--- a/build/overcloud-onos.sh
+++ b/build/overcloud-onos.sh
@@ -11,7 +11,7 @@ set -e
source ./cache.sh
source ./variables.sh
-pushd images > /dev/null
+pushd ${BUILD_DIR} > /dev/null
cp -f overcloud-full.qcow2 overcloud-full-onos_build.qcow2
#######################################
@@ -23,7 +23,7 @@ rm -rf puppet-onos
populate_cache "$onos_release_uri/$onos_release_file" "$(curl https://downloads.onosproject.org/nightly/ | grep $onos_release_file | grep -o -e '[0-9a-f]\{32\}')"
populate_cache "$onos_jdk_uri/jdk-8u51-linux-x64.tar.gz"
-LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/$onos_release_file:/opt/ \
+LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/${onos_release_file}:/opt/ \
--run-command "mkdir /opt/onos && cd /opt/ && tar -xzf $onos_release_file -C /opt/onos --strip-components=1" \
-a overcloud-full-onos_build.qcow2
@@ -31,10 +31,10 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/$onos_release_file:
git clone https://github.com/bobzhouHW/puppet-onos.git
tar --xform="s:puppet-onos/:onos/:" -czf puppet-onos.tar.gz puppet-onos
-LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/jdk-8u51-linux-x64.tar.gz:/opt/ \
- --upload puppet-onos/files/install_jdk8.tar:/opt/ \
+LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/jdk-8u51-linux-x64.tar.gz:/opt/ \
+ --upload ${BUILD_DIR}/puppet-onos/files/install_jdk8.tar:/opt/ \
--run-command "cd /opt/ && tar -xf install_jdk8.tar && sh /opt/install_jdk8/install_jdk8.sh" \
- --upload puppet-onos.tar.gz:/etc/puppet/modules/ \
+ --upload ${BUILD_DIR}/puppet-onos.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" \
-a overcloud-full-onos_build.qcow2
diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh
index 4f81a300..5a05ea40 100755
--- a/build/overcloud-opendaylight.sh
+++ b/build/overcloud-opendaylight.sh
@@ -10,7 +10,7 @@
set -e
source ./variables.sh
-pushd images > /dev/null
+pushd ${BUILD_DIR} > /dev/null
cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2
@@ -22,11 +22,11 @@ cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2
rm -rf fds
git clone https://gerrit.opnfv.org/gerrit/fds
pushd fds > /dev/null
-tar -czvf ../networking-odl.tar.gz networking-odl
+tar -czvf ${BUILD_DIR}/networking-odl.tar.gz networking-odl
popd > /dev/null
# Beryllium Repo
-cat > /tmp/opendaylight.repo << EOF
+cat > ${BUILD_DIR}/opendaylight.repo << EOF
[opendaylight-4-release]
name=CentOS CBS OpenDaylight Beryllium repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-release/\$basearch/os/
@@ -35,7 +35,7 @@ gpgcheck=0
EOF
# Boron Repo
-cat > /tmp/opendaylight_boron.repo << EOF
+cat > ${BUILD_DIR}/opendaylight_boron.repo << EOF
[opendaylight-5-release]
name=CentOS CBS OpenDaylight Boron repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-5-testing/\$basearch/os/
@@ -44,7 +44,7 @@ gpgcheck=0
EOF
# Master Repo
-cat > /tmp/opendaylight_master.repo << EOF
+cat > ${BUILD_DIR}/opendaylight_master.repo << EOF
[opendaylight-6-release]
name=CentOS CBS OpenDaylight Carbon repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/\$basearch/os/
@@ -53,7 +53,7 @@ gpgcheck=0
EOF
#BGPVPN Repo
-cat > /tmp/bgpvpn.repo << EOF
+cat > ${BUILD_DIR}/bgpvpn.repo << EOF
[bgpvpn]
name=bgpvpn
baseurl=https://trunk.rdoproject.org/centos7/consistent/
@@ -66,42 +66,34 @@ EOF
# SDNVPN - Copy tunnel setup script
curl -fO https://raw.githubusercontent.com/openstack/fuel-plugin-opendaylight/brahmaputra-sr2/deployment_scripts/puppet/modules/opendaylight/templates/setup_TEPs.py
+# OpenDaylight Puppet Module
+rm -rf puppet-opendaylight
+git clone -b master https://github.com/dfarrell07/puppet-opendaylight
+pushd puppet-opendaylight > /dev/null
+git archive --format=tar.gz --prefix=opendaylight/ HEAD > ${BUILD_DIR}/puppet-opendaylight.tar.gz
+popd > /dev/null
+
# install ODL packages
# install Jolokia for ODL HA
# Patch in OPNFV custom puppet-tripleO
# install Honeycomb
LIBGUESTFS_BACKEND=direct virt-customize \
- --upload networking-odl.tar.gz:/root/ \
- --upload /tmp/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
+ --upload ${BUILD_DIR}/networking-odl.tar.gz:/root/ \
+ --upload ${BUILD_DIR}/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
--run-command "yum install --downloadonly --downloaddir=/root/boron/ opendaylight" \
- --upload /tmp/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
+ --upload ${BUILD_DIR}/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
--run-command "yum install --downloadonly --downloaddir=/root/master/ opendaylight" \
- --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
+ --upload ${BUILD_DIR}/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
--install opendaylight,python-networking-odl \
- --upload /tmp/bgpvpn.repo:/etc/yum.repos.d/bgpvpn.repo \
+ --upload ${BUILD_DIR}/bgpvpn.repo:/etc/yum.repos.d/bgpvpn.repo \
--install python-networking-bgpvpn \
--run-command "wget https://github.com/rhuss/jolokia/releases/download/v1.3.3/jolokia-1.3.3-bin.tar.gz -O /tmp/jolokia-1.3.3-bin.tar.gz" \
--run-command "tar -xvf /tmp/jolokia-1.3.3-bin.tar.gz -C /opt/opendaylight/system/org" \
--install honeycomb \
- --upload ./setup_TEPs.py:/tmp \
+ --upload ${BUILD_DIR}/setup_TEPs.py:/tmp \
+ --upload ${BUILD_DIR}/puppet-opendaylight.tar.gz:/etc/puppet/modules/ \
+ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \
-a overcloud-full-opendaylight_build.qcow2
- # Move these two lines above the -a overcloud-full-opendaylight_build.qcow2 when the patch has been rebased
- #--upload ../opnfv-puppet-tripleo.patch:/tmp \
- #--run-command "cd /etc/puppet/modules/tripleo && patch -Np1 < /tmp/opnfv-puppet-tripleo.patch" \
-
-## WORK AROUND
-## when OpenDaylight lands in upstream RDO manager this can be removed
-
-# upload the opendaylight puppet module
-rm -rf puppet-opendaylight
-git clone -b master https://github.com/dfarrell07/puppet-opendaylight
-pushd puppet-opendaylight > /dev/null
-git archive --format=tar.gz --prefix=opendaylight/ HEAD > ../puppet-opendaylight.tar.gz
-popd > /dev/null
-LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/etc/puppet/modules/ \
- --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \
- -a overcloud-full-opendaylight_build.qcow2
-
mv overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2
popd > /dev/null
diff --git a/build/rpm_specs/opnfv-apex-onos.spec b/build/rpm_specs/opnfv-apex-onos.spec
index ef1c66da..7bdd7772 100644
--- a/build/rpm_specs/opnfv-apex-onos.spec
+++ b/build/rpm_specs/opnfv-apex-onos.spec
@@ -21,13 +21,15 @@ https://wiki.opnfv.org/apex
%install
mkdir -p %{buildroot}%{_var}/opt/opnfv/images/
-install build/images/overcloud-full-onos.qcow2 %{buildroot}%{_var}/opt/opnfv/images/
+install build/overcloud-full-onos.qcow2 %{buildroot}%{_var}/opt/opnfv/images/
%files
%defattr(644, root, root, -)
%{_var}/opt/opnfv/images/overcloud-full-onos.qcow2
%changelog
+* Wed Dec 7 2016 Tim Rozet <trozet@redhat.com> - 4.0-2
+- Make install path consistent
* Wed Nov 2 2016 Dan Radez <dradez@redhat.com> - 4.0-1
- Version update for Danube
* Mon Apr 04 2016 Dan Radez <dradez@redhat.com> - 3.0-0
diff --git a/build/rpm_specs/opnfv-apex.spec b/build/rpm_specs/opnfv-apex.spec
index 1844d8c5..a74733c5 100644
--- a/build/rpm_specs/opnfv-apex.spec
+++ b/build/rpm_specs/opnfv-apex.spec
@@ -21,13 +21,15 @@ https://wiki.opnfv.org/apex
%install
mkdir -p %{buildroot}%{_var}/opt/opnfv/images/
-install build/images/overcloud-full-opendaylight.qcow2 %{buildroot}%{_var}/opt/opnfv/images/
+install build/overcloud-full-opendaylight.qcow2 %{buildroot}%{_var}/opt/opnfv/images/
%files
%defattr(644, root, root, -)
%{_var}/opt/opnfv/images/overcloud-full-opendaylight.qcow2
%changelog
+* Wed Dec 7 2016 Tim Rozet <trozet@redhat.com> - 4.0-2
+- Make install path consistent
* Wed Nov 2 2016 Dan Radez <dradez@redhat.com> - 4.0-1
- Version update for Danube
* Mon Apr 04 2016 Dan Radez <dradez@redhat.com> - 3.0-0
diff --git a/build/undercloud.sh b/build/undercloud.sh
index d0bab527..5352ac7b 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -7,22 +7,27 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-set -e
+set -xe
source ./cache.sh
source ./variables.sh
source ./functions.sh
populate_cache "$rdo_images_uri/undercloud.qcow2"
-if [ ! -d images ]; then mkdir images/; fi
-cp -f cache/undercloud.qcow2 images/undercloud_build.qcow2
+if [ ! -d "$BUILD_DIR" ]; then mkdir ${BUILD_DIR}; fi
+cp -f ${CACHE_DIR}/undercloud.qcow2 ${BUILD_DIR}/undercloud_build.qcow2
+
+pushd ${BUILD_DIR} > /dev/null
# prep opnfv-tht for undercloud
clone_fork opnfv-tht
pushd opnfv-tht > /dev/null
-git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ../opnfv-tht.tar.gz
+git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ${BUILD_DIR}/opnfv-tht.tar.gz
popd > /dev/null
-pushd images > /dev/null
+# Add custom IPA to allow kernel params
+curl -fO https://raw.githubusercontent.com/trozet/ironic-python-agent/opnfv_kernel/ironic_python_agent/extensions/image.py
+python3 -c 'import py_compile; py_compile.compile("image.py", cfile="image.pyc")'
+
# installing forked opnfv-tht
# enabling ceph OSDs to live on the controller
# OpenWSMan package update supports the AMT Ironic driver for the TealBox
@@ -31,10 +36,11 @@ pushd images > /dev/null
# add congress password to python-tripleoclient
# add tacker password to python-tripleoclient
# upload tacker repo and install the client package
+# Add performance image scripts
LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
--run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \
- --upload ../opnfv-tht.tar.gz:/usr/share \
+ --upload ${BUILD_DIR}/opnfv-tht.tar.gz:/usr/share \
--install "openstack-utils" \
--install "ceph-common" \
--run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \
@@ -43,8 +49,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "curl -f http://download.opensuse.org/repositories/Openwsman/CentOS_CentOS-7/Openwsman.repo > /etc/yum.repos.d/wsman.repo" \
--run-command "yum update -y openwsman*" \
--run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
- --upload ../opnfv-environment.yaml:/home/stack/ \
- --upload ../virtual-environment.yaml:/home/stack/ \
+ --upload ${BUILD_ROOT}/opnfv-environment.yaml:/home/stack/ \
+ --upload ${BUILD_ROOT}/virtual-environment.yaml:/home/stack/ \
--install "python2-congressclient" \
--run-command "sed -i '/SERVICE_LIST/a\\ \x27congress\x27: {\x27password_field\x27: \x27OVERCLOUD_CONGRESS_PASSWORD\x27},' /usr/lib/python2.7/site-packages/tripleoclient/constants.py" \
--run-command "sed -i '/PASSWORD_NAMES =/a\\ \"OVERCLOUD_CONGRESS_PASSWORD\",' /usr/lib/python2.7/site-packages/tripleoclient/utils.py" \
@@ -54,24 +60,17 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "sed -i '/PASSWORD_NAMES =/a\\ \"OVERCLOUD_TACKER_PASSWORD\",' /usr/lib/python2.7/site-packages/tripleoclient/utils.py" \
--run-command "sed -i '/AodhPassword/a\\ parameters\[\x27TackerPassword\x27\] = passwords\[\x27OVERCLOUD_TACKER_PASSWORD\x27\]' /usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py" \
--run-command "sed -i '/^SERVICES/a\ \x27tacker\x27: {\x27description\x27: \x27Tacker Service\x27, \x27type\x27: \x27servicevm\x27, \x27path\x27: \x27/\x27, \x27port\x27: 8888 },' /usr/lib/python2.7/site-packages/os_cloud_config/keystone.py" \
- --upload ../noarch/$tackerclient_pkg:/root/ \
+ --upload ${BUILD_DIR}/noarch/$tackerclient_pkg:/root/ \
--install /root/$tackerclient_pkg \
--install "python2-aodhclient" \
--install "openstack-heat-engine" \
--install "openstack-heat-api-cfn" \
--install "openstack-heat-api" \
+ --upload ${BUILD_ROOT}/build_perf_image.sh:/home/stack \
+ --upload ${BUILD_ROOT}/set_perf_images.sh:/home/stack \
+ --upload ${BUILD_DIR}/image.py:/root \
+ --upload ${BUILD_DIR}/image.pyc:/root \
-a undercloud_build.qcow2
-# Add custom IPA to allow kernel params
-curl -fO https://raw.githubusercontent.com/trozet/ironic-python-agent/opnfv_kernel/ironic_python_agent/extensions/image.py
-python3 -c 'import py_compile; py_compile.compile("image.py", cfile="image.pyc")'
-
-# Add performance image scripts
-LIBGUESTFS_BACKEND=direct virt-customize --upload ../build_perf_image.sh:/home/stack \
- --upload ../set_perf_images.sh:/home/stack \
- --upload image.py:/root \
- --upload image.pyc:/root \
- -a undercloud_build.qcow2
-
mv -f undercloud_build.qcow2 undercloud.qcow2
popd > /dev/null
diff --git a/build/variables.sh b/build/variables.sh
index 0c938775..c9ce80f6 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -8,6 +8,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+BUILD_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
+BUILD_DIR="$(dirname ${BUILD_ROOT})/.build"
+CACHE_DIR="$(dirname ${BUILD_ROOT})/.cache"
+CACHE_HISTORY=".cache_history"
+
rdo_images_uri=http://buildlogs.centos.org/centos/7/cloud/x86_64/tripleo_images/newton/delorean
onos_release_uri=https://downloads.onosproject.org/nightly/
onos_release_file=onos-1.6.0-rc2.tar.gz