diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-07-06 17:03:49 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-01-30 17:40:18 +0100 |
commit | 3518e4b1a55724766e91c58f06d536a9047b8a70 (patch) | |
tree | 7c9c08a4af5eecf95a115915f6142f47713ace78 /build/install | |
parent | 7a4538e62aa98b42d26177e81f8d43c891fbe0d2 (diff) |
f_repobuild: Use packetary to build partial mirror
Packetary [1] will replace fuel-mirror in upstream Fuel.
fuel-mirror is using packetary under the hood already, so the
transition should not be too hard.
Adapt OPNFV Ubuntu partial mirror build:
- obsolete opnfv-config.yaml (packetary uses CLI args for this);
- new opnfv_config.yaml will hold old ubuntu.yaml data, split at
build runtime into:
* mos_<arch>_mirror.yaml - MOS mirror cfg, only for deps analysis;
* ubuntu_<arch>_mirror.yaml - Ubuntu mirror cfg, for pkgs download;
* ubuntu_<arch>_packages.yaml - Ubuntu packages to download;
While the consumers of our mirror still use `debootstrap`, which only
supports the "main" repo component, make sure the "main" package set
is complete, in the scope of:
* ubuntu_<arch>_mirror_main.yaml - Ubuntu [main only] mirror;
* ubuntu_<arch>_packages_main.yaml - Ubuntu packages for [main];
New workflow (executed for EACH architecture):
1. Collect bootstrap package deps from <fuel_bootstrap_cli.yaml>;
2. Collect all fixture release pkgs from fuel-web's <openstack.yaml>;
3. Add OPNFV extra pkg deps from "opnfv_config.yaml"
(based on old fuel-mirror)
Currently, this is based on old fuel-mirror's
<fuel-mirror/contrib/fuel_mirror/data/ubuntu.yaml>, holding a
hardcoded list of package deps; plus eventual extra OPNFV packages,
like additional kernels, bootloaders etc.
Since we now inspect MOS repos for deps with packetary, this old
list should be easy to throw away as soon as we confirm each item
is directly required by another, already existing package in the
mirror. For now, keep the old list as safety net for missing deps.
NOTE: Dependencies up to and including this group should also
be satisfiable from Ubuntu "main" repo component only.
4. Append plugin dependencies to the package list;
5. Run `packetary unresolved` for MOS repos, gathering MOS deps that
should be fetched from Ubuntu. The new packages will be appended
to the predefined list from old "ubuntu.yaml";
6. Run `packetary clone` to download all required pkgs for the
partial Ubuntu mirror.
7. IF repo component merging is disabled, run `packetary clone` only
on Ubuntu[main] repo components to download any (still) missing
dependencies for `debootstrap`, which only looks at this component,
and not the whole mirror.
8. IF repo component merging is enabled, run first `dpkg-scanpackages`
to filter out old duplicate versions of packages, then run
`packetary create` to merge all repo comps into a single "main".
v1 -> v2:
- multiarch support (activated via UBUNTU_ARCH envvar);
- fixed debootstrap missing deps in "main" component of Ubuntu mirror;
- factored out some hardcodes into variables/functions;
- add .gitignore file;
- move generated config files to "opnfv_config" subdir;
- add arm64 Ubuntu repo URL (ports.ubuntu.com is separated from the
main Ubuntu mirror, archive.ubuntu.com, which only holds x86 pkgs);
v3 -> v4:
- introduce env var "MIRROR_UBUNTU_MERGE" to control local mirror
repo-component merging into a single "main";
- enable mirror repo-component merging by default, edit
fuel_bootstrap_cli.yaml accordingly;
v4 -> v6:
- edit dea_base to use only main mirror;
- fix duplicated logs;
- remove `-q` flag for `create`;
v6 -> v7:
- rebase for Newton fuel_bootstrap_cli.yaml (s/trusty/xenial/);
- include OPNFV plugin deps in local Ubuntu mirror;
- add `vgabios` dependency, required for arm64 guest firmware;
- remove all fuel-mirror references;
- merge old fuel-mirror pkglist to OPNFV pkglist;
- update packetary commit to include upstream bugfixes [2, 3];
v7 -> v11:
- re-enable f_repobuild after Newton rebase;
- fix leftover "trusty" ref to "xenial";
- force f_repobuild rebuild to bypass cache (by editing Makefile);
- extend f_repobuild .cacheid to include scripts and OPNFV config;
v11 -> v12:
- fix install/install.sh old refs to "trusty";
- fix out of date select_ubuntu_repo.s refs to "trusty";
v12 -> v16:
- fix leftover mos9.0 / fuel-mirror references;
- fix most issues reported by `pylint opnfv_mirror_ubuntu.py`;
v16 -> v18:
- Sync fuel_bootstrap_cli.yaml with settings.yaml.sample from 10.0:
[4] Stub pass for "Get root password for build image from settings"
[5] Sync pkg list with "Switch to Ubuntu Xenial"
[6] "Add puppet and daemonize to default packages list"
[7] "Delete kernel debug related parameter for performance"
[8] "Add to bootstrap image dependencies for network checker"
- Remove obsolete Trusty kernel images from pkg lists;
- Don't break when plugins set is empty;
- Fix missing "vim" package, which was resolved using secondary
provider packages like GUI-enabled vim flavors;
The proposed fix is quite sensitive, also cutting the final
mirror size in half (!), and allowing us to remove a previous
hacky workaround (re-running packetary only for main).
- Remove "main"-only packetary run (hacky), since the new fix for "vim"
also takes care of packetary solving dependencies from "universe".
- Add OPNFV blacklisting to workaround "upstart" package being installed,
together with "systemd" (having them both installed confuses puppet);
- Currently in testing in Armband as part of [9]:
* bootstrap and target image building works from offline mirror;
* systemd is used instead of upstart;
* full deploy is not yet confirmed, due to some AArch64 specifics we
are in the process of fixing;
NOTE: Without filtering out old package verisons using
`dpkg-scanpackages`, bootstrap build cannot solve all deps.
FIXME: Repo component merging is sort of slow, since packetary insists
on copying the source files to the destination dir even if they are
pointing to the same repo.
FIXME: Packetary `create` uses a different directory scheme for the
created mirror than the upstream Ubuntu, e.g.:
[p] mirrors/ubuntu/pool/main/l/lvm2_2.02.98-6ubuntu2_amd64.deb
[U] mirrors/ubuntu/pool/main/l/lvm2/lvm2_2.02.98-6ubuntu2_amd64.deb
This disencourages creating the "merged" mirror in the same location
as the source partial mirror.
[1] https://wiki.openstack.org/wiki/Packetary
[2] https://review.openstack.org/#/c/392936/
[3] https://review.openstack.org/#/c/392937/
[4] https://review.openstack.org/#/c/277353/
[5] https://review.openstack.org/#/c/345516/
[6] https://review.openstack.org/#/c/344909/
[7] https://review.openstack.org/#/c/400165/
[8] https://review.openstack.org/#/c/415912/
[9] https://gerrit.opnfv.org/gerrit/#/c/26157/
[10] https://review.openstack.org/#/c/420815
JIRA: FUEL-218
JIRA: FUEL-223
JIRA: ARMBAND-169
JIRA: ARMBAND-185
Change-Id: If2ee86f348b7683c83bfaf686baba4f1b8f555f0
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'build/install')
-rw-r--r-- | build/install/apt-ftparchive-udeb.conf | 4 | ||||
-rwxr-xr-x | build/install/install.sh | 14 | ||||
-rwxr-xr-x | build/install/uninstall.sh | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf index 3b5b239a6..0cabe9425 100644 --- a/build/install/apt-ftparchive-udeb.conf +++ b/build/install/apt-ftparchive-udeb.conf @@ -17,8 +17,8 @@ TreeDefault { }; BinDirectory "pool/debian-installer" { - Packages "dists/trusty/main/debian-installer/binary-amd64/Packages"; - BinOverride "./indices/override.trusty.main.debian-installer"; + Packages "dists/xenial/main/debian-installer/binary-amd64/Packages"; + BinOverride "./indices/override.xenial.main.debian-installer"; }; Default { diff --git a/build/install/install.sh b/build/install/install.sh index 198f26cb5..b2f6ccc3c 100755 --- a/build/install/install.sh +++ b/build/install/install.sh @@ -122,17 +122,17 @@ prep_make_live() { ssh-copy-id root@$FUELHOST sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then + if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then echo "Error - found backup file for Packages!" exit 1 fi - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then + if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then echo "Error - found backup file for Packages.gz!" exit 1 fi - if [ -f $REPO/dists/trusty/Release.backup ]; then + if [ -f $REPO/dists/xenial/Release.backup ]; then echo "Error - found backup file for Release!" exit 1 fi @@ -142,9 +142,9 @@ prep_make_live() { exit 1 fi - cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup - cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup - cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup + cp $REPO/dists/xenial/main/binary-amd64/Packages $REPO/dists/xenial/main/binary-amd64/Packages.backup + cp $REPO/dists/xenial/main/binary-amd64/Packages.gz $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup + cp $REPO/dists/xenial/Release $REPO/dists/xenial/Release.backup cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup } @@ -443,7 +443,7 @@ copy_packages() { echo Not running apt-ftparchive generate "${APT_UDEB_CONF}" # Fuel also needs this index file - # cat dists/trusty/main/binary-amd64/Packages | \ + # cat dists/xenial/main/binary-amd64/Packages | \ # awk '/^Package:/{pkg=$2} # /^Version:/{print pkg ": \"" $2 "\""}' > ubuntu-versions.yaml # cp ubuntu-versions.yaml $DEST diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh index a9e74bc39..5252c3093 100755 --- a/build/install/uninstall.sh +++ b/build/install/uninstall.sh @@ -31,17 +31,17 @@ DEST=$MOUNT REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 cd $REPO -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then +if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then echo "Error - didn't find backup file for Packages!" exit 1 fi -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then +if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then echo "Error - didn't find backup file for Packages.gz!" exit 1 fi -if [ ! -f $REPO/dists/trusty/Release.backup ]; then +if [ ! -f $REPO/dists/xenial/Release.backup ]; then echo "Error - didn't find backup file for Release!" exit 1 fi @@ -71,9 +71,9 @@ cd $REPO echo "Restoring backups of datafiles" -rm -f $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.gz -rm -f $REPO/dists/trusty/Release $DEST/etc/puppet/manifests/site.pp -mv $REPO/dists/trusty/main/binary-amd64/Packages.backup $REPO/dists/trusty/main/binary-amd64/Packages -mv $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup $REPO/dists/trusty/main/binary-amd64/Packages.gz -mv $REPO/dists/trusty/Release.backup $REPO/dists/trusty/Release +rm -f $REPO/dists/xenial/main/binary-amd64/Packages $REPO/dists/xenial/main/binary-amd64/Packages.gz +rm -f $REPO/dists/xenial/Release $DEST/etc/puppet/manifests/site.pp +mv $REPO/dists/xenial/main/binary-amd64/Packages.backup $REPO/dists/xenial/main/binary-amd64/Packages +mv $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup $REPO/dists/xenial/main/binary-amd64/Packages.gz +mv $REPO/dists/xenial/Release.backup $REPO/dists/xenial/Release mv $DEST/etc/puppet/manifests/site.pp.backup $DEST/etc/puppet/manifests/site.pp |