Ubuntu Server Installer, and backend for Ubuntu Desktop Installer
Go to file
Olivier Gayot f200888e70
Merge pull request #1996 from ogayot/2063124-document
DESIGN.md: document what happens to the API when the server restarts
2024-05-24 08:40:14 +02:00
.github/workflows workflows: -lunar 2024-03-19 23:02:00 -06:00
bin bin/console-conf-wrapper: fix mode extraction when modeenv is not available 2024-02-23 14:21:06 +01:00
console_conf console-conf: fix calls to prev_screen without await 2024-05-06 12:42:11 +02:00
debian update license metadata 2024-04-29 09:22:04 +12:00
doc doc: autoinstall release notes pictures 2024-04-24 16:34:30 -07:00
examples add integration test for installing core 2024-05-23 15:21:23 +12:00
fake_deps tox: Support running tests and flake8 in tox. 2018-06-05 17:59:46 -04:00
font font: allow to display circled white star in console font 2022-05-10 09:45:25 +02:00
kbds kbds: add entries for UDI 2022-08-08 07:54:09 -06:00
po revert en_GB, it has czech 2023-10-05 15:54:49 -06:00
scripts add integration test for installing core 2024-05-23 15:21:23 +12:00
snap/hooks Revert "os-prober: patch instead of sed" 2022-01-24 12:18:41 -07:00
subiquity add a more explicit method for whether to use snapd install API 2024-05-23 15:21:23 +12:00
subiquitycore console-conf: fix calls to prev_screen without await 2024-05-06 12:42:11 +02:00
system_setup Merge pull request #1944 from ogayot/noble-ui-rework 2024-05-02 14:25:11 +02:00
test_data/autoinstall API: Add non-reportable errors to /meta/status API response 2024-03-05 11:31:52 -08:00
.flake8 flake8: compat with black 2023-07-25 15:25:55 -06:00
.git-blame-ignore-revs add .git-blame-ignore-revs 2023-07-25 15:28:44 -06:00
.gitignore Update .gitignore 2022-04-25 07:23:01 -06:00
.pre-commit-config.yaml pre-commit: don't pass file names to spell check 2024-05-02 10:44:32 -07:00
.readthedocs.yaml Add readthedocs config file 2023-07-10 14:49:47 +01:00
CONTRIBUTING.md readme: make a contributing section and point to CONTRIBUTING.md 2023-11-07 16:35:52 +02:00
DESIGN.md DESIGN.md: document what happens to the API when the server restarts 2024-05-23 15:27:13 +02:00
LICENSE update license metadata 2024-04-29 09:22:04 +12:00
LICENSE.AGPL-3 use newer version of AGPL-3 (very minor changes) 2024-04-30 09:58:15 +12:00
LICENSE.GPL-3 update license metadata 2024-04-29 09:22:04 +12:00
Makefile make: add targets format,black,isort 2023-07-25 15:25:55 -06:00
README.md readme: update contribution section wording 2024-01-18 11:23:58 -08:00
apt-deps.txt storage: log snapd response text when v2/systems/{system} fails 2024-04-16 14:03:01 +02:00
autoinstall-schema.json SubiquityServer: Include interactive-sections as a property 2024-01-29 20:15:45 -08:00
autoinstall-system-setup-schema.json SubiquityServer: Include interactive-sections as a property 2024-01-29 20:15:45 -08:00
languagelist update languagelist and layout suggestions 2022-07-29 14:13:27 -06:00
passwd Added a passwd file copied from a livecd filesystem 2022-05-11 12:58:58 -03:00
pyproject.toml pyproject: create 2023-07-25 15:25:55 -06:00
reserved-usernames reserved-usernames: add sgx group ahead of ubuntu 2022-09-22 11:09:30 +02:00
setup.py update license metadata 2024-04-29 09:22:04 +12:00
snapcraft.yaml snapcraft: bump curtin rev for ZFS string interpolation fix 2024-04-17 14:50:10 +02:00
tox.ini tox: use skip_install to speed up black/isort 2023-07-25 18:29:22 -06:00
users-and-groups Ensure first user is in the users group and not in the lxd group. This 2022-11-03 08:22:43 +01:00

README.md

subiquity & console-conf

Ubuntu Server Installer & Snappy first boot experience

The repository contains the source for the new server installer (the "subiquity" part, aka "ubiquity for servers") and for the snappy first boot experience (the "console-conf" part).

We track bugs in Launchpad at https://bugs.launchpad.net/subiquity. Snappy first boot issues can also be discussed in the forum at https://forum.snapcraft.io.

Our localization platform is Launchpad, translations are managed at https://translations.launchpad.net/ubuntu/+source/subiquity/

To update translation template in launchpad:

  • update po/POTFILES.in with any new files that contain translations
  • execute clean target, i.e. $ debuild -S
  • dput subiquity into Ubuntu

To export and update translations in subiquity:

Acquire subiquity from source

git clone https://github.com/canonical/subiquity

cd subiquity && make install_deps

Testing out the installer Text-UI (TUI)

Subiquity's text UI is available for testing without actually installing anything to a system or a VM. Subiquity developers make use of this for rapid development. After checking out subiquity you can start it:

make dryrun

All of the features are present in dry-run mode. The installer will emit its backend configuration files to /tmp/subiquity-config-* but it won't attempt to run any installer commands (which would fail without root privileges). Further, subiquity can load other machine profiles in case you want to test out the installer without having access to the machine. A few sample machine profiles are available in the repository at ./examples/machines and can be loaded via the MACHINE make variable:

make dryrun MACHINE=examples/machines/simple.json

Generating machine profiles

Machine profiles are generated from the probert tool. To collect a machine profile:

PYTHONPATH=probert ./probert/bin/probert --all > mymachine.json

Testing changes in KVM

To try out your changes for real, it is necessary to install them into an ISO. Rather than building one from scratch, it's much easier to install your version of subiquity into the daily image. Here's how to do this:

Commit your changes locally

If you are only making a change in Subiquity itself, running git add <modified-file...> and then git commit should be enough.

Otherwise, if you made any modification to curtin or probert, you need to ensure that:

  • The modification is committed inside the relevant repository (i.e., git add + git commit).
  • The relevant source property in snapcraft.yaml points to the local repository instead of the upstream repository.
  • The relevant source-commit property in snapcraft.yaml is updated to reflect your new revision (one must use the full SHA-1 here).
  • The above modifications to snapcraft.yaml are committed.

Example:

parts:
  curtin:
    plugin: nil

    # Comment out the original source property, pointing to the upstream repository
    #source: https://git.launchpad.net/curtin
    # Instead, specify the name of the directory where curtin is checked out
    source: curtin
    source-type: git
    # Update the below so it points to the commit ID within the curtin repository
    source-commit: 7c18bf6a24297ed465a341a1f53875b61c878d6b

Build and inject your changes into an ISO

  1. Build your changes into a snap:

    $ snapcraft pack --output subiquity_test.snap
    
  2. Grab the current version of the installer:

    $ urlbase=http://cdimage.ubuntu.com/ubuntu-server/daily-live/current
    $ isoname=$(distro-info -d)-live-server-$(dpkg --print-architecture).iso
    $ zsync ${urlbase}/${isoname}.zsync
    
  3. Run the provided script to make a copy of the downloaded installer that has your version of subiquity:

    $ sudo ./scripts/inject-subiquity-snap.sh ${isoname} subiquity_test.snap custom.iso
    
  4. Boot the new iso in KVM:

    $ qemu-img create -f raw target.img 10G
    $ kvm -m 1024 -boot d -cdrom custom.iso -hda target.img -serial stdio
    
  5. Finally, boot the installed image:

    $ kvm -m 1024 -hda target.img -serial stdio
    

The first three steps are bundled into the script ./scripts/test-this-branch.sh.

Contributing

Please see our contributing guidelines.

Documentation

Subiquity's documentation is hosted at https://canonical-subiquity.readthedocs-hosted.com/en/latest/.

The documentation source can be found in the doc/ folder, which contains instructions for building a local preview.