63 lines
2.0 KiB
Markdown
63 lines
2.0 KiB
Markdown
# Deployment
|
|
|
|
Linux systems are generally deployed using PXE and Kickstart. We use iPXE, which
|
|
can retrieve its configuration via HTTP(S) and therefore gives us a lot of
|
|
flexibility, because the iPXE configuration can be generated on the fly with the
|
|
specific settings needed by the booting client. In the same way the Kickstart
|
|
configuration for the RHEL installer is auto-generated.
|
|
|
|
The information used for generating the iPXE and Kickstart configurations is
|
|
stored in the sysdb (see below). The sysdb is accessible through a web api, and
|
|
a command line client is available.
|
|
|
|
When PXE boot is not an option, e.g. in restricted networks, it is possible to
|
|
start iPXE from a USB stick or other media.
|
|
|
|
The general process for a deployment/installation is:
|
|
|
|
1. Register the system with sysdb (only for new systems).
|
|
2. Tell sysdb to perform an installation on the next boot.
|
|
3. Reboot the system and trigger a PXE boot (usually by pressing F12 during
|
|
POST).
|
|
|
|
The easiest way to interact with sysdb is to use `bob`, a command-line client, set up ready to use on `lxsup.psi.ch`.
|
|
Alternatively it is possible to use the web API directly.
|
|
|
|
First, add the new node:
|
|
```bash
|
|
bob node add $FQDN $ENV netboot
|
|
```
|
|
|
|
|
|
To be able to PXE boot we need to configure at least one MAC address for the new
|
|
node:
|
|
```bash
|
|
bob node add-mac $FQDN 00:50:56:aa:fe:9b
|
|
```
|
|
|
|
|
|
Finally we need to configure the installer to use, and the Puppet-related
|
|
parameters:
|
|
```bash
|
|
bob node set-attr $FQDN ipxe_installer=rhel8install
|
|
bob node set-attr $FQDN puppet_role=role::server
|
|
```
|
|
|
|
and optional:
|
|
```bash
|
|
bob node set-attr $FQDN puppet_group=cluster
|
|
bob node set-attr $FQDN puppet_subgroup=compute
|
|
bob node set-attr $FQDN network=static
|
|
bob node set-attr $FQDN puppet_env=prod
|
|
```
|
|
|
|
## Redeployment
|
|
|
|
After the initial installation the boot mode has been reset from netboot to local so it will then always boot from the local disk. For a redeployment the netboot needs to be set anew (on UEFI based systems netboot also needs to be always selected by the UEFI menu)):
|
|
```
|
|
bob node netboot $FQDN
|
|
```
|
|
|
|
```{tableofcontents}
|
|
```
|