aboutsummaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-01-30f_repobuild: Use packetary to build partial mirrorAlexandru Avadanii1-20/+21
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>
2016-12-20build: select_ubuntu_repo: break on errAlexandru Avadanii1-2/+2
Stop ISO build process if no sane Ubuntu mirrors are available, instead of continuing with an empty URL, which is bound to fail later. While at it, skip re-assesing the output of select_ubuntu_repo.sh if the URL var already is set. Also, stderr and stdout were both captured in UBUNTU_MIRROR_URL, so disable debug by default, and only print debug info in case no valid mirror is found. v2 -> v3: - allow "One hour behind" mirror state to be considered, since we already accept "Six hours behind" mirrors; JIRA: FUEL-240 Change-Id: I791942da234304528ff5cae1891415602e1a62b2 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-10-11Re-introduce mirror blacklistingStefan K. Berg1-3/+23
Some mirrors are misbehaving, for instance due to flood protection, which makes them unreliable. This change re-introduces the possibility to blacklist them locally. Change-Id: I7840ac0a622f2997395e54911685f9eea393dee4 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-10-06Improving robustness of repo mirror selectionStefan K. Berg1-39/+81
Change-Id: If0f5b268848439aa9d2abee099bbd985abd53d5c Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-09-20Temporary Hardcoded Ubuntu repoJonas Bjurel1-16/+18
Meanwhile we're investigating the issues with Ubuntu repo mirror selection, we will hardcode the Ubuntu repo mirror Change-Id: I776bd3a8a72dc87e00052e8ff965de1134293c7a Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
2016-09-19Make sure to use only up-to-date mirrorsStefan K. Berg1-3/+9
Whitewash the geographically "close" mirrors against the list of fully synced mirrors - we've had a few instances of getting bad mirrors which would break the script. All credit goes to: https://askubuntu.com/questions/39922/how-do-you-select-the-fastest-mirror-from-the-command-line ... and we should perhaps use the netselect tool as well somewhere down the line, but this fixes the most urgent problem. Change-Id: Ia61a2bd78657b28019f57fc1962d410e754e6d2a Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-09-05Do not use rsync for choosing mirror serverMichal Skalski1-49/+14
Rsync protocol was used for creating local mirrors, but now we only need http connection. This requirement can be problematic for environments which are behind proxy and can lead to build failures when rsync is not allowed. Change-Id: I4efcf500fd0c25de5fdb87307e7210cc4a96714d Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-07-21Pinning down exact Fuel 9.0.1 repo versionsMichal Skalski1-1/+1
stable/mitaka branch is open for new commits for Fuel 9.1. To not be impacted by new upstream changes point to specific commits which were used for Fuel 9.0 General Availabilit (9.0.1). JIRA: https://jira.opnfv.org/browse/FUEL-153 verify: no-cache Change-Id: I7fd8d2f11e4be6f47e39924913c48bfe7d4f2eb3 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-02-15Fix for blacklisting Ubuntu mirrors with "issues"Stefan Berg1-1/+6
Change-Id: Id60f2625c2d84695b86b5b7bce3271babcefde12 Signed-off-by: Stefan Berg <sfb@consultron.com>
2016-02-04Correcting license and copyright terms throughout the repoJonas Bjurel1-1/+8
Please review this carefully! Strategy: 1) No strict research on copyright/who did what (if you want it changed contact the Fuel team or Jonas Bjurel) 2) Licence statements will not be added to the following file types: - Patch files or orig files for patches - Config files generated by ordinary tools, like libvirt/visrsh - GIT dierctive file - Other auto-generated files Change-Id: I48504c6f27925445dc44683a27a575bcab78d828 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
2016-01-21Use mirrors snapshotsMichal Skalski1-3/+25
Add logic to fetch information about last suitable snapshot which can be used to download ubuntu packages. This is for example use to build community ISO [1]. This should help in case of snapshot switch [2]. [1] https://github.com/fuel-infra/jenkins-jobs/blob/master/servers/fuel-ci/8.0/builders/community.all.sh#L36-L40 [2] https://bugs.launchpad.net/fuel/+bug/1493390/comments/9 Change-Id: Id5a8d41278561473ea4844631bfefa0049e64dbc Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2015-11-27Restructcture of the directory layoutJonas Bjurel1-0/+33
Restructure of the directory layout due to move of Fuel into it's own repo JIRA: FUEL-85 Change-Id: I3647e1992a508f29dce06a5d6c790725c527f6f5 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>