summaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_repobuild/Makefile
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2015-11-27 02:14:48 +0100
committerMichal Skalski <mskalski@mirantis.com>2015-11-27 11:36:22 +0100
commit21c25e1b67540202bccaddefcbd1453b25885ad6 (patch)
tree345b53948ad09df2c04c1c83b8f6467058ba5fe8 /build/f_isoroot/f_repobuild/Makefile
parent24a95306d2564b272b5320e9149d9aea70b4061c (diff)
Download plugins dependencies using fuel-createmirror
Including dependencies directly in to plugin binary require maintain list of direct links to specific versions of system packages, which often become out of date. This change propose to create requirements-deb.txt file in plugin build directories which will contain only names of deb packages needed for successful deployments in offline environments. Based on the content of these files the common list of dependencies will be created [1]. Defined system packages together with their dependencies will be downloaded during process of creating partial mirror. [1] https://docs.mirantis.com/openstack/fuel/fuel-7.0/operations.html#troubleshooting-partial-mirror verify: no-cache Change-Id: If40b040fcf062f78af6c453a791b02ebf10e7b85 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Diffstat (limited to 'build/f_isoroot/f_repobuild/Makefile')
-rw-r--r--build/f_isoroot/f_repobuild/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile
index d7db2dd90..522722e66 100644
--- a/build/f_isoroot/f_repobuild/Makefile
+++ b/build/f_isoroot/f_repobuild/Makefile
@@ -11,6 +11,7 @@
SHELL := /bin/bash
TOP := $(shell pwd)
RSYNC_HOST := $(shell ./select_ubuntu_repo.sh)
+DEPENDENCIES_FILE := /etc/fuel-createmirror/requirements-deb.txt
.PHONY: all
@@ -37,6 +38,8 @@ nailgun:
sudo sed -i 's/DOCKER_MODE=true/DOCKER_MODE=false/' /etc/fuel-createmirror/common.cfg
sudo sed -i 's/DEBUG="no"/DEBUG="yes"/' /etc/fuel-createmirror/ubuntu.cfg
sudo sed -i "s/MIRROR_UBUNTU_HOST=\".*\"/MIRROR_UBUNTU_HOST=\"$(RSYNC_HOST)\"/" /etc/fuel-createmirror/common.cfg
+ # Add dependencies from plugins. With awk help try add only unique packages.
+ sudo bash -c 'find ../ -name requirements-deb.txt -print0 | xargs -0 -I% awk '\''NR == FNR {first[$$0];next}; ! ($$0 in first)'\'' "${DEPENDENCIES_FILE}" "%" >> "${DEPENDENCIES_FILE}"'
rm -Rf nailgun
sudo mkdir -p /var/www
sudo su - -c /opt/fuel-createmirror-*/fuel-createmirror