By default, OEM meta-packages get installed on ubuntu-desktop and don't
get installed on ubuntu-server. Using autoinstall, we can now give more
control. The autoinstall section supports the following:
Install on server and desktop:
oem:
install: true
Do not install even on desktop:
oem:
install: false
Install only on desktop (the default):
oem:
install: auto
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
We used to rely on a version key under apt autoinstall section to
specify if we want the old implementation (i.e., a single candidate
primary mirror) or the new implementation (i.e., multiple primary mirror
candidates).
Instead, we now introduce the apt->mirror-selection autoinstall section,
and move the primary section under it.
If the primary section if under apt, we want the old implementation.
If the primary section is under apt->mirror-selection, we want the new
implementation.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Subiquity now supports a new endpoint that can be used by the desktop
installer to configure whether the ubuntu-restricted-addons package
should be installed. This package contains third-party codecs commonly
used on a desktop install.
curl --unix-socket /run/subiquity/socket http://a/codecs
> {"install": false}
curl --unix-socket /run/subiquity/socket \
http://a/codecs -d '{"install": true}'
curl --unix-socket /run/subiquity/socket http://a/codecs
> {"install": true}
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In the source autoinstall section, the search_drivers key was marked
required. This made sense at the time when it was the only supported
key. However, now that we also support the source ID, we don't want
to force the user to supply search_drivers as well.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The source autoinstall section now supports the "id" field where the
user can supply the ID of a source, e.g., "ubuntu-server" or
"ubuntu-server-minimal".
If the field is not supplied, the installation will use the source
declared default: true (if any) in the source catalog. Otherwise, it the
first source declared will be used.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Since we added a search_drivers checkbox that is uncheckd by default,
there is no longer a way for users to install third-party drivers in an
autoinstall context.
We now implement the autoinstall support for source so that users can
specify what value they want for search_drivers.
Futhermore, to be backward compatible with existing autoinstall
configurations, we now make search_drivers default to true in
autoinstall contexts.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The autoinstall data for the drivers was only constituted of a boolean,
e.g.:
drivers: true
or
drivers: false
It was not immediately clear that the boolean value meant (install/don't
install the drivers).
We now store the boolean in the "install" sub-element instead, e.g.:
drivers:
- install: true
drivers:
- install: false
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The autoinstall schema for "apt" now supports the "preferences"
configuration. Each preference element should contain the properties
described below, that 1:1 map with the keywords from apt_preferences(5):
* package <-> Package:
* pin <-> Pin:
* pin-priority <-> Pin-Priority:
These preferences are forwarded to curtin through
subiquity-curtin-apt.conf. Support for these rules must be added to
curtin as well.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
* TimeZone: autoinstall and API
Add support for Get/Set timezone methods. Get means that we inquire
with GeoIP as to which timezone is suggested. Non-availability of
GeoIP, or a previous explicit Set, means that we return the system
timezone. Set of timezone by Post results in set of the live system
timzeone, and queuing a set of the target system by way of cloud-init.
* Add clarifying comment about _request.
* Add element updates (non-UI)
This can be controlled with autoinstall
updates: security or all
Also an API for controlling this:
curl --silent --unix-socket .subiquity/socket a/updates ->
"security"
curl -d '"all"' --unix-socket .subiquity/socket a/updates
* Automated tests - log grep for default/none/all states
* Enforce possible values on Updates controller
Route all the various get/set thru 2 common functions.
Validate incoming data.
Accidental schema updates are unintended, so enforce that. Schema
updates that don't break API are fine, we can handle that by manually
regenerating the schema at such time.