AutomatedServerInstalls
4116
Comment:
|
4116
|
Deletions are marked like this. | Additions are marked like this. |
Line 69: | Line 69: |
` recipe:`<<BR>> | ` layout:`<<BR>> |
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 $TBD.
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: if there is any autoinstall config at all, the installer takes the default for any unanswered question
Providing the autoinstall file
The autoinstall file can be provided in the following ways:
- As /autoinstall.cfg in the initrd
- As /autoinstall.cfg on the install media (in any partition!)
- 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.cfg.
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 # edit existing autoinstall file $ autoinstall-editor autoinstall.cfg
The format of an autoinstall file
The autoinstall file is YAML. Here is an example file that shows off most features:
version: 1
early_commands:
- ping -c1 198.162.1.1
locale: en_US
keyboard:
layout: en
variant: uk
network:
version: 2
network:
eth0:
dhcp4: yes
proxy: http://squid.internal:3128/
mirror: http://repo.internal/
filesystem:
layout:
name: lvm
identity:
username: mwhudson
password: $crypted_pass
ssh:
authorized_keys:
- $key
allow_pw: no
snaps:
- go/stable
debconf_selections: |
bind9 bind9/run-resolvconf boolean false
packages:
- libreoffice
- dns-server^
late_commands:
- touch /target/autoinstalled
Many keys and values correspond straightforwardly to questions the installer asks (e.g. keyboard selection).
Filesystem configuration
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
Possibly the installer should support reporting progress to some endpoint.
FoundationsTeam/AutomatedServerInstalls (last edited 2020-06-11 04:19:11 by mwhudson)