2017-09-13 23:08:33 +00:00
|
|
|
# subiquity & console-conf
|
|
|
|
> Ubuntu Server Installer & Snappy first boot experience
|
|
|
|
|
|
|
|
The repository contains the source for the new server installer (the
|
2017-10-06 08:58:44 +00:00
|
|
|
"subiquity" part, aka "ubiquity for servers") and for the snappy first
|
2017-09-13 23:08:33 +00:00
|
|
|
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.
|
2015-06-15 19:12:26 +00:00
|
|
|
|
2020-03-05 11:20:02 +00:00
|
|
|
Our localization platform is Launchpad, translations are managed at
|
|
|
|
https://translations.launchpad.net/subiquity
|
|
|
|
|
2017-01-25 22:29:32 +00:00
|
|
|
# Acquire subiquity from source
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-01-25 22:29:32 +00:00
|
|
|
`git clone https://github.com/CanonicalLtd/subiquity`
|
2015-09-30 19:01:17 +00:00
|
|
|
|
2017-01-25 22:29:32 +00:00
|
|
|
`cd subiquity && make install_deps`
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-09-13 23:08:33 +00:00
|
|
|
# Testing out the installer Text-UI (TUI)
|
2015-09-28 20:02:51 +00:00
|
|
|
SUbiquity's text UI is is available for testing without actually installing
|
|
|
|
anything to a system or a VM. Subiquity developers make use of this for rapid
|
2017-01-25 22:29:32 +00:00
|
|
|
development. After checking out subiquity you can start it:
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-01-25 22:29:32 +00:00
|
|
|
`make dryrun`
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-01-25 22:29:32 +00:00
|
|
|
All of the features are present in dry-run mode. The installer will emit its
|
2017-08-22 00:05:08 +00:00
|
|
|
backend configuration files to /tmp/subiquity-config-\* but it won't attempt to
|
2015-09-28 20:02:51 +00:00
|
|
|
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
|
2017-01-25 22:37:34 +00:00
|
|
|
profiles are available in the repository at ./examples/ and
|
2017-01-25 22:29:32 +00:00
|
|
|
can be loaded via the MACHINE make variable:
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2019-05-30 01:46:39 +00:00
|
|
|
`make dryrun MACHINE=examples/simple.json`
|
2015-09-28 20:02:51 +00:00
|
|
|
|
|
|
|
# Generating machine profiles
|
2017-01-25 22:29:32 +00:00
|
|
|
Machine profiles are generated from the probert tool. To collect a machine profile:
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-01-25 22:37:34 +00:00
|
|
|
`PYTHONPATH=probert ./probert/bin/probert --all > mymachine.json`
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-08-22 00:05:08 +00:00
|
|
|
# Testing changes in KVM
|
2015-09-28 20:02:51 +00:00
|
|
|
|
2017-08-22 00:12:45 +00:00
|
|
|
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:
|
|
|
|
|
|
|
|
1. Build your change into a snap:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ snapcraft snap --output subiquity_test.snap
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Grab the current version of the installer:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ urlbase=http://cdimage.ubuntu.com/ubuntu-server/daily-live/current
|
2018-02-15 00:29:59 +00:00
|
|
|
$ isoname=$(distro-info -d)-live-server-$(dpkg --print-architecture).iso
|
2017-08-22 00:12:45 +00:00
|
|
|
$ zsync ${urlbase}/${isoname}.zsync
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Run the provided script to make a copy of the downloaded installer
|
|
|
|
that has your version of subiquity:
|
|
|
|
|
|
|
|
```
|
2017-08-22 22:26:09 +00:00
|
|
|
$ sudo ./scripts/inject-subiquity-snap.sh ${isoname} subiquity_test.snap custom.iso
|
2017-08-22 00:12:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
4. Boot the new iso in KVM:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ qemu-img create -f raw target.img 10G
|
2017-09-13 23:12:45 +00:00
|
|
|
$ kvm -m 1024 -boot d -cdrom custom.iso -hda target.img -serial stdio
|
2017-08-22 00:12:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
5. Finally, boot the installed image:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ kvm -m 1024 -hda target.img -serial stdio
|
|
|
|
```
|
2017-08-22 22:20:44 +00:00
|
|
|
|
|
|
|
The first three steps are bundled into the script ./scripts/test-this-branch.sh.
|