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>
* The mixture of storage for disable_components in and out of the config
dict was confusing and caused bugs, depending on the flow
* disable_components now solely lives in the dict, like other items
This commit introduces example JSON files that would simulate output of
the ua_client script, as in the following command:
$ ubuntu-advantage status \
--simulate-with-token "${token}" \
--format json
Two files are added, one for each of the following scenario:
* output when supplied a valid, non expired token
* output when supplied a valid but expired token
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The UA screen is now shown only if we are running on an LTS release.
In dry-run mode, we pretend to always be on Ubuntu focal.
To implement the possibility to skip the screen, we added another POST
resource to inform the server that we are finished configuring
UbuntuAdvantage.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Introduce a new view, model and controllers pair to enable Ubuntu
Advantage from Subiquity. For now, we expect the user to input an
alphanumeric token and rely on cloud-init to enable the features
associated with the subscription.
This implementation comes with a number of limitations:
* inability to validate the token before first-boot
* inability to check what features are associated with the Ubuntu
Advantage subscription, before first-boot
* the user must input the token directly: there is no mechanism to
deduce the token based on email address and password.
The new screen is placed after the identity scree. The installation
should already be running when the UA screen will be shown to the user.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
1. rebase with main and update autoinstall-system-setup.yml
2. provide a more unified indent style
3. update get_userandgroups() to the dropped one
4. fix the problematic os action
5. simply asignments
6. assign default_loader a default value
7. provide a type-to-file dict in wsl_conf
8. provide stderr info when providing error in creating user
9. update schema and example files
It also adds an argument --ignore-tz to the schema comparison test to
not fail on system where the schema has no TZ like WSL.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
On non systemd systems (ie WSL) the progress view is always empty. Thus
this view is removed and the summary (formerly overview) view becomes
the last page of the setup with the reboot button. This button is
displayed dynamically when setup is complete.
Co-authored-by: Didier Roche <didrocks@ubuntu.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 make_cloudconfig as a function that models should offer that allows
for generation of the cloud-config snippet.
Move snaplist and locale to this mechanism.
Add a test for snaplist output.
* 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.