Install with Yomi

Yomi (yet one more installer) is an installer for SUSE and openSUSE operating systems. Yomi is designed as a Salt state, and can be used for installing SUSE operating systems on new systems.

In Uyuni, Yomi can be used as part of provisioning new clients, as an alternative to AutoYaST.

Yomi consists of two components:

  • The Yomi formula, which contains the Salt states and modules required to perform the installation.

  • The operating system image, which includes the `pre-configured salt-minion service.

Both components can be used independently of Uyuni, or integrated with it. This section describes how to use it with Uyuni. For more information about using Yomi independently, see https://github.com/openSUSE/yomi. For build assets, see https://build.opensuse.org/project/show/systemsmanagement:yomi.

To use Yomi for installing a client operating system, follow this process:

  • Install the Yomi formula package.

  • Prepare the Salt pillar for the new installation.

  • Boot the new client using the PXE boot image for Yomi.

Install the yomi-formula

Before you begin, you need to install the yomi-formula, which is available as a package in Uyuni.

The yomi-formula package contains the Salt states and modules that describe the Yomi state, and the formulas with forms to create the pillar. It also contains documentation about the different sections of the pillar, and some examples about how to parameterize installations based on openSUSE, MicroOS or SLE.

The formula package performs these actions:

  • Adds a new configuration file called yomi-formula.conf in the /etc/salt/master.d/ directory. This configuration file defines the Python module and Salt states required by Yomi.

  • Installs the Yomi Salt states in the /usr/share/salt-formulas/states/ directory.

  • Provides some example configuration files in the /usr/share/yomi/ directory.

  • Installs the required forms and sub-forms in the /usr/share/salt-formulas/metadata/ directory.

  • Provides some pillar examples in the /usr/share/yomi/pillar/ directory.

Procedure: Installing yomi-formula
  1. On the Uyuni Server, at the command prompt, as root, install the yomi-formula package:

    zypper in yomi-formula
  2. Restart services:

    systemctl restart salt-master.service

Install the PXE Image

To provision a new client, you need an operating system image to boot from. You can use any image that contains a salt-minion service enabled, together with a minimal set of tools that are required during the installation, like parted, btrfstools` among others.

Yomi provides an already prepared image, based on openSUSE Tumbleweed, openSUSE Leap (for Uyuni), or SLE (for SUSE Manager). For Uyuni, the image is pre-packaged as an RPM. This is done in a similar way to how pxe-default-image is distributed.

The package installs a standard PXE OEM image generated by Kiwi, the initial kernel and initrd in the /srv/pxe-yomi-image/ directory, and the second stage kernel, initrd and image in the /srv/pxe-yomi-image/image directory.

Procedure: Installing the PXE Image
  1. On the Uyuni Server, at the command prompt, as root, install the pxe-yomi-image service:

    zypper in pxe-yomi-image-opensuse15
  2. Follow the prompts to complete the installation.

Register Yomi in Cobbler

Uyuni uses Cobbler to manage the PXE boot service, so you will need to register the image in Cobbler.

Procedure: Registering the Yomi Image in Cobbler
  1. On the Uyuni Server, at the command prompt, as root, create a directory for the Yomi image:

    mkdir /srv/tftpboot/pxe-yomi-image
  2. Define a distribution in Cobbler, including the path to install the second stage kernel and initrd, the location of the full image, and any further kernel options. Adjust this command to include the correct version of the product, and the TFTP server address:

    cobbler distro add \
      --name=pxe-yomi-image \
      --kernel=/srv/pxe-yomi-image/linux \
      --initrd=/srv/pxe-yomi-image/initrd \
      --boot-files='/srv/tftpboot/pxe-yomi-image/image.initrd=/srv/pxe-yomi-image/image/pxe-yomi-image-opensuse15.x86_64-1.0.0.initrd /srv/tftpboot/pxe-yomi-image/image.kernel=/srv/pxe-yomi-image/image/pxe-yomi-image-opensuse15.x86_64-1.0.0.kernel /srv/tftpboot/pxe-yomi-image/image.md5=/srv/pxe-yomi-image/image/pxe-yomi-image-opensuse15.x86_64-1.0.0.md5 /srv/tftpboot/pxe-yomi-image/image.xz=/srv/pxe-yomi-image/image/pxe-yomi-image-opensuse15.x86_64-1.0.0.xz' \
      --kernel-options='rd.kiwi.install.pxe rd.kiwi.install.image=tftp://server-address/pxe-yomi-image/image.xz rd.kiwi.ramdisk ramdisk_size=1572864 net.ifnames=1'
Procedure: Registering the Yomi Profile in Cobbler
  1. On the Uyuni Server, at the command prompt, as root, define a profile in Cobbler based on the image.

    cobbler profile add \
      --name pxe-yomi-profile \
      --distro=pxe-yomi-image
  2. OPTIONAL: Create a system in Cobbler. If you know the MAC address for the new client to be provisioned, you can have it boot directly from the Yomi image.

    cobbler system add \
       --name=yomi \
       --mac=00:11:22:33:44:55 \
       --profile=pxe-yomi-profile
  3. When the new node has been provisioned, remove the temporary Cobbler system:

    cobbler system remove --name=yomi

Example Salt Pillar Preparation

The parameters of the new installation are defined with a Salt pillar. The pillar includes parameters that the Yomi state requires during the installation, including the partitions, file systems, repositories, packages installed, and services enabled.

The pillar is defined using the formulas with forms. In this example, we prepare the pillar for a minimal openSUSE Tumbleweed installation. You can find examples for MicroOS or SLES in the example directory /usr/share/yomi/pillar/.

To begin, boot the client that you want to provision using the Yomi PXE boot image, using the Cobbler procedures described earlier in this section.

When the salt-minion service is running on the new client, accept the key by navigating to Salt  Keys. When the key is accepted, you can view and manage the client by navigating to Systems  Overview. Navigate to the Formulas tab, and add all the Yomi Installer formulas to the client. When you have added all the formulas, complete the forms and sub-forms. This section outlines each form and provides example settings for a minimal installation. For a detailed explanation of every option, see https://github.com/openSUSE/yomi.

Yomi

The Yomi form contains some general configuration options. For example, the keyboard language and layout, the locale information, and the option to perform a full reset of the system after provisioning.

For this example, set the Reboot parameter to yes.

Yomi Storage

This sub-form provides information about the devices, partitioning, file system (including the BtrFS subvolumes, for example), and LVM and RAID configuration.

For this example, we assume that the new client has a single device named /dev/sda, and that it belongs to a non-UEFI system. In this case, we have only three partitions: one for the boot loader, one for swap and one for the system. We also expect to have an ext4 file system for the root directory.

Device 1:

  • Device: /dev/sda

  • Label: GPT

  • Initial Gap: 1MB

Create three partitions:

  • Partition 1:

    • Partition Number: 1

    • Partition Size: 1MB

    • Partition Type: boot

  • Partition 2:

    • Partition Number: 2

    • Partition Size: 1024MB

    • Partition Type: swap

  • Partition 3:

    • Partition Number: 3

    • Partition Size: rest

    • Partition Type: linux

Create two file systems:

  • Filesystem 1:

    • Partition: /dev/sda2

    • Filesystem: swap

  • Filesystem 2:

    • Partition: /dev/sda3

    • Filesystem: ext4

    • Mountpoint: /

      Yomi Bootloader

      This sub-form provides details required for GRUB.

Set these parameters:

  • Device: /dev/sda

  • Theme: selected

The Kernel parameter can be used for the GRUB append section.

Yomi Software

This form provides the different repositories and packages to install. You can also register the product in this form, using SUSEConnect, and install the different modules after registering.

For this example we are going to install a very minimal openSUSE Tumbleweed distribution, using publicly available repositories. For production deployments, you will need to provide a local repository.

Add a new repository: * Repository Name: repo-oss * Repository URL: http://download.opensuse.org/tumbleweed/repo/oss/

Add these packages: * pattern:enhanced_base * glibc-locale * kernel-default

You can also add patterns and products, together with packages, by using the correct prefix.

Yomi Services

By default Yomi is installed with the salt-minion service, but you must enable it.

Add a new enabled service:

  • Service 1:

    • Service: salt-minion

      Yomi Users

      This form sets out the system users. In this example, we have a single root user. To provide a password, you must use the hashed version of the password, not the plain text. This behavior is set to be changed in future versions of Yomi.

  • User 1:

    • Username: root

    • Password Hash: $1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0

Monitor the Installation

You can monitor the installation as it progresses, using the monitor tool from Yomi. You can continue monitoring as the highstate is applied to the new client. To use the tool, you will need to have enabled Events in the Yomi formula, and have the salt-api service activated.

For more information about the salt-api service, and how to use the monitor tool, see https://github.com/openSUSE/yomi.