AutomatedServerInstalls
Size: 6290
Comment:
|
Size: 5929
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 24: | Line 24: |
* when the answer to a question is not present in a preseed, d-i stops and asks the user for input. autoinstalls are not like this: if there is any autoinstall config at all, the installer takes the default for any unanswered question (and fails if there is no default). | * when the answer to a question is not present in a preseed, d-i stops and asks the user for input. autoinstalls are not like this: by default, if there is any autoinstall config at all, the installer takes the default for any unanswered question (and fails if there is no default). You can designate particular sections in the config as "interactive", which means the installer will still stop and ask about those. |
Line 58: | Line 58: |
identity: | |
Line 112: | Line 113: |
[[/ConfigReference#cloud-init|cloud-init]]`:`<<BR>> ` disable_root: false`<<BR>> |
|
Line 124: | Line 127: |
Possibly the installer should support reporting progress to some endpoint. We could add syntax to indicate that the user should still be asked for the answer to some question or other. |
|
Line 135: | Line 134: |
We could allow the config to contain verbatim cloud-init config for the new system. Several of the keys in the current syntax are actually used to produce cloud-init config, but we could document that these are ignored if you supply your own config. (Although some of cloud-init’s default behaviours are a bit unhelpful for a bare metal install so maybe some kind of merging of configs is needed anyway...) |
This document is entirely a description of something that does not yet exist |
Automated Server Installs for 20.04 (and maybe 18.04.4?)
This document is entirely a description of something that does not yet exist |
Please direct feedback on this proposal to community.ubuntu.com or the ubuntu-server mailing list.
Contents
Introduction
The server installer for 20.04 supports a new mode of operation: automated installation, autoinstallation for short. You might also know this feature as unattended or handsoff or preseeded installation.
Autoinstallation lets you answer all those configuration questions ahead of time in an autoinstall file and lets the installation process run without any interaction.
Differences from debian-installer preseeding
preseeds are the way to automate an installer based on debian-installer (aka d-i).
autoinstalls for the new server installer differ from preseeds in the following main ways:
- the file format is completely different (yaml vs debconf-set-selections format)
- when the answer to a question is not present in a preseed, d-i stops and asks the user for input. autoinstalls are not like this: by default, if there is any autoinstall config at all, the installer takes the default for any unanswered question (and fails if there is no default). You can designate particular sections in the config as "interactive", which means the installer will still stop and ask about those.
Providing the autoinstall file
The autoinstall file can be provided in the following ways:
As /autoinstall.yaml in the initrd
As /autoinstall.yaml on the install media
As /autoinstall.yaml on a filesystem with label "autoinstall"
- Via a http or https (or maybe tftp) URL on the kernel command line
Creating an autoinstall file
When any system is installed using the server installer, an autoinstall file for repeating the install is created at /var/log/installer/autoinstall.yaml.
Alternatively there is a snap, autoinstall-editor, that can be used to either edit or create from scratch an autoinstall file (it is actually mostly the same code as that that runs the installation in interactive mode).
# start editing new config file $ autoinstall-editor # dump out to stdout a complete autoinstall config file with default answers everywhere $ autoinstall-editor --create > my-autoinstall.yaml # edit existing autoinstall file $ autoinstall-editor my-autoinstall.yaml
The format of an autoinstall file
The autoinstall file is YAML and has full documentation.
A minimal config (for a single disk system) is:
version: 1 identity: username: mwhudson password: $crypted_pass
Here is an example file that shows off most features:
version: 1
reporting:
hook:
type: webhook
endpoint: http://example.com/endpoint/path
early_commands:
- ping -c1 198.162.1.1
locale: en_US
keyboard:
layout: en
variant: uk
network:
version: 2
network:
ethernets:
enp0s25:
dhcp4: yes
enp3s0:
enp4s0:
bonds:
bond0:
dhcp4: yes
interfaces:
- enp3s0
- enp4s0
parameters:
mode: active-backup
primary: enp3s0
proxy: http://squid.internal:3128/
mirror: http://repo.internal/
filesystem:
layout:
name: lvm
identity:
username: mwhudson
password: $crypted_pass
ssh:
install_server: yes
authorized_keys:
- $key
allow_pw: no
snaps:
- go/stable
debconf_selections: |
bind9 bind9/run-resolvconf boolean false
packages:
- libreoffice
- dns-server^
cloud-init:
disable_root: false
error_commands:
- tar c /var/log/installer | nc 192.168.0.1 1000
Many keys and values correspond straightforwardly to questions the installer asks (e.g. keyboard selection). See the reference for details of those that do not.
Possible future directions
There are other places we could put the autoinstall config:
- As a b64encoded gzipped blob on the kernel command line
- Given as a URL via DHCP
We might want to extend the 'match specs' for disks to cover other ways of selecting disks.
We might want to add some way of customizing the apt sources (adding a PPA, etc). Possibly just by accepting more of the curtin syntax for this.
There are other things we could do by default in a system with multiple disks (create an LVM VG incorporating all of them, just install on one disk picked at random, install on the largest disk, etc etc).
We could support kickstart compatibility as in kickseed.
FoundationsTeam/AutomatedServerInstalls (last edited 2020-06-11 04:19:11 by mwhudson)