Bootstrap Repository

A bootstrap repository contains packages for installing Salt on clients, as well as the required packages for registering Salt or traditional clients during bootstrapping. When products are synchronized, bootstrap repositories are automatically created and regenerated on the Uyuni Server.

Prepare to Create a Bootstrap Repository

When you select a product for synchronization, the bootstrap repository is automatically created as soon as all mandatory channels are fully mirrored.

Procedure: Checking Synchronization Progress
  1. In the Uyuni Web UI, navigate to Software  Manage  Channels, then click the channel associated to the repository.

  2. Navigate to the Repositories tab, then click Sync and check Sync Status.

Procedure: Checking Synchronization Progress from the Command Prompt
  1. At the command prompt on the Uyuni Server, as root, use the tail command to check the synchronization log file:

    tail -f /var/log/rhn/reposync/<channel-label>.log
  2. Each child channel generates its own log during the synchronization progress. You need to check all the base and child channel log files to be sure that the synchronization is complete.

Options for Automatic Mode

You can change how the automated bootstrap repository creation works. This section details the various settings.

Flush Mode

By default, existing repositories are updated only with the latest packages. You can configure it to always start with an empty repository instead. To enable this behavior, add or edit this value in /etc/rhn/rhn.conf:

server.susemanager.bootstrap_repo_flush = 1
Automatic Mode

By default, automated regeneration of the bootstrap repositories is enabled. To disable it, add or edit this value in /etc/rhn/rhn.conf:

server.susemanager.auto_generate_bootstrap_repo = 0

Configure Bootstrap Data File

The tool uses a data file with information about which packages are required for each distribution. The data file is stored at /usr/share/susemanager/mgr_bootstrap_data.py. SUSE updates this file regularly. If you want to makes changes to this file, do not edit it directly. Instead, create a copy in the same directory and edit your copy:

cd /usr/share/susemanager/
cp mgr_bootstrap_data.py my_data.py

When you have made your changes, configure Uyuni to use the new file. Add or edit this value in /etc/rhn/rhn.conf:

server.susemanager.bootstrap_repo_datamodule = my_data

On the next update, the new data from SUSE overwrites the original data file, not the new one. You need to keep the new file up to date with changes provided by SUSE.

Manually Generate a Bootstrap Repository

By default, bootstrap repositories are regenerated daily. You can manually create the bootstrap repository from the command prompt:

Procedure: Generating the Bootstrap Repository for SUSE Linux Enterprise
  1. At the command prompt on the Uyuni Server, as root, list the available bootstrap repositories:

    mgr-create-bootstrap-repo -l
  2. Create the bootstrap repository, using the appropriate repository name as the product label:

    mgr-create-bootstrap-repo -c SLE-version-x86_64

The client repository is located in /srv/www/htdocs/pub/repositories/.

Procedure: Specifying a Parent Channel for a Bootstrap Repository

If you have mirrored more than one product (for example, SLES and SLES for SAP), or if you use custom channels, you need to specify the parent channel to use when creating the bootstrap repository.

  1. Check which parent channels you have available:

    mgr-create-bootstrap-repo -c SLE-15-x86_64
    Multiple options for parent channel found. Please use option
    --with-parent-channel <label> and choose one of:
    - sle-product-sles15-pool-x86_64
    - sle-product-sles_sap15-pool-x86_64
    - sle-product-sled15-pool-x86_64
  2. Specify the appropriate parent channel:

    mgr-create-bootstrap-repo -c SLE-15-x86_64 --with-parent-channel sle-product-sled15-pool-x86_64

Repositories with Multiple Architectures

If you are creating bootstrap repositories that include multiple different architectures, you need to be careful that all architectures are updated correctly. For example, the x86-64 and IBM Z architectures for SLE use the same bootstrap repository URL at /srv/www/htdocs/pub/repositories/sle/15/2/bootstrap/.

When the flush option is enabled, and you attempt to generate the bootstrap repository for multiple architectures, only one architecture is generated. To avoid this, use the --no-flush option at the command prompt when creating additional architectures. For example:

mgr-create-bootstrap-repo -c SLE-15-SP2-x86_64
mgr-create-bootstrap-repo --no-flush -c SLE-15-SP2-s390x

Bootstrap and Custom Channels

If you are using custom channels, you can use the --with-custom-channels option with the mgr-create-bootstrap-repo command. In this case, you also need to specify the parent channel to use.

Automatic creation of a bootstrap repository might fail if you are using custom channels. In this case, you need to create the repository manually.

For more information about custom channels, see administration:custom-channels.adoc.