https://blueprints.launchpad.net/fuel/+spec/use-packetary-in-fuel
The current scheme of working with repositories in Fuel is quite messy, rigid, and incompatible with upcoming architectural changes. We are going to rework the whole approach to downloading rpm/deb packages and handling of local/remote mirrors by introducing the packetary tool both in the ISO build process and on the Fuel master node side.
When building the ISO there is no need to create full upstream mirror locally and then put it to the ISO. Instead we have the minimal list of required packages. Then we can use tools yumdownloader to recursively resolve package dependencies and download this minimal consistent tree.
Currently we use yumdownloader/reposync and debmirror for downloading rpm/deb packages while building the Fuel ISO image. To mix packages from different RPM repos on the Fuel master node we use the EXTRA_RPM_REPOS variable. We are forced to deal with several tools at the same time that provide user interfaces and functionality which are not fully compatible with data structures that we currently use in Fuel.
Besides, we still build Fuel packages together with the ISO which does not scale well. We have a specific service for building packages not only from merged source code but also from the code that is currently on review. The idea behind is to use these packages to run deployment tests before a patch is even merged. Some cases, however, assume putting these custom packages on a custom ISO, but our current build code does not allow to download deb packages from these custom repositories during ISO build. This EXTRA_RPM_REPOS variable works only in rpm case. Custom deb repos can only be used during deployment itself.
The existing approach has the following disadvantages:
The easiest way to address all these issues is to use Packetary [1] for the ISO build process.
The thing is that neither yumdownloader nor debmirror provide the level of convenience and flexibility that Packetary does. Packetary allows to download everything that we need running it just once passing input data (yaml) in exactly the same format that we use for Fuel-menu and for Nailgun [2]. By the way, it is a flat list of repositories with their priorities. All downloaded packages could either be merged into a single repository or into a set of repositories depending on what one needs. The process is fully data driven.
So, using Packetary we could make ISO build process really flexible. One could put into the ISO packages from arbitrary number of custom repositories. We could even check if this particular set of repositories is consistent, i.e. there are no conflicting dependencies.
We propose to replace current tools mentioned above with Packetary which will process a user-defined list of RPM/DEB repositories and perform the following actions.
At the ISO image build stage:
At the base OS provisioning stage:
At the master node deployment stage:
How are we planning to integrate this new approach into Fuel CI?
- name: “os” path: “upstream” uri: “{{CENTOS_URL}}/os/x86_64” priority: 99
- name: “updates” path: “upstream” uri: “{{CENTOS_URL}}/updates/x86_64” priority: 10
- name: “extras” path: “upstream” uri: “{{CENTOS_URL}}/extras/x86_64” priority: 99
- name: “centosplus” path: “upstream” uri: “{{CENTOS_URL}}/centosplus/x86_64” priority: 99
- name: “mos” path: “mos-centos” uri: “{{MOS_URL}}/x86_64” priority: 5
- name: “mos-updates” path: “mos-centos-updates” uri: “{{MOS_UPDATES_URL}}/x86_64” priority: 1
None
None
None
None
Provide repositories for different OpenStack versions as “pluggable” build artifacts (RPMs) which include:
However, this approach imposes significant impact on CI systems, and does not solve extra repos issue.
Proposed changes allow to simplify the upgrade procedure by unifying the Fuel repositories workflow.
None
None
Users will be required to create or modify the yaml configuration file to include their own set of RPM/DEB repositories. If one needs just to change mirror base url, the it is to be possible to use environment variables.
ISO build process should become faster or remain the same.
None
None
Using packetary allows us to cover such cases as:
Fuel 9.0+ ISO build environments should have packetary and all its dependencies installed. Packetary could be installed using pip.
None
None
The ISO should pass the same set of system and deployment tests.