Feature #236
closedInstallation media should be usable for more than one operating system
Description
The current database schema of Foreman describes a one-to-many relation between Installation Medium and Operating Systems:
+-------+ +-----------------+ | Media |<*>----<1>| Operatingsystem | +-------+ +-----------------+ ActiveRecord: Media :belongs_to Operatingsystem Operatingsystem :has_many Media
The implication of this design is, that the user has to create an installation medium for each operating system created in Foreman. This makes sense for installation media which contain a certain the version number or architecture of the operating system in their URI or path, like the ones of Fedora or CentOS Linux.
With Debian-based Linux distributions on the other hand, one mirror can serve several versions of the operating system from the same URI/path. This results in several identical installation media.
For example, having the operating systems "Ubuntu 8.04 LTS", "Ubuntu 9.10", "Ubuntu 10.04 LTS" each in "x86" and "x86_64" variants need 6 identical installation media in Foreman while one mirror would be sufficient.
By creating a many-to-many relation between Installation Media and Operating Systems, the user could "reuse" an installation medium for several operating system.
+-------+ +-----------------+ | Media |<*>----<*>| Operatingsystem | +-------+ +-----------------+ ActiveRecord: Media has_and_belongs_to_many Operatingsystem Operatingsystem has_and_belongs_to_many Media
PS: Assigned to Paul Kelly due to recommendation of Ohad Levy.
Files
Updated by Jochen Schalanda over 14 years ago
- File 0001-Implements-feature-236-Installation-media-are-now-us.patch 0001-Implements-feature-236-Installation-media-are-now-us.patch added
I've implemented the proposed changes, see the attached patch file.
Being able to assign an installation medium to more than one operating system together with the variable substitution in the URL ($arch
, $version
, $major
and $minor
) should greatly reduce the need for several nearly identical installation mediums.
For example: instead of creating an installation medium for CentOS 5.4 (http://mirror.averse.net/centos/5.4/os/$arch
) and 5.5 (http://mirror.averse.net/centos/5.5/os/$arch
) one could simply create an installation medium with the URL http://mirror.averse.net/centos/$version/os/$arch
and assign it to the respective operating systems.
Updated by Jochen Schalanda over 14 years ago
- File 0002-Refactored-latest-migrations-to-actually-migrate-dat.patch 0002-Refactored-latest-migrations-to-actually-migrate-dat.patch added
Refactored migrations to migrate existing data to the new schema.
Updated by Ohad Levy over 14 years ago
- Assignee changed from Paul Kelly to Jochen Schalanda
- Target version set to 0.1-5
Updated by Jochen Schalanda over 14 years ago
- Status changed from New to Ready For Testing
- % Done changed from 0 to 100
Applied in changeset 0ba45d6d0d68324650c378a35ee54eddd51d67a3.
Updated by Ohad Levy over 14 years ago
- Status changed from Ready For Testing to Closed