Disconnected Setup

When it is not possible to connect Uyuni to the internet, you can use it within a disconnected environment.

The repository mirroring tool (RMT) is available on SUSE Linux Enterprise 15 and later. RMT replaces the subscription management tool (SMT), which can be used on older SUSE Linux Enterprise installations.

In a disconnected Uyuni setup, RMT or SMT uses an external network to connect to SUSE Customer Center. All software channels and repositories are synchronized to a removable storage device. The storage device can then be used to update the disconnected Uyuni installation.

This setup allows your Uyuni installation to remain in an offline, disconnected environment.

Your RMT or SMT instance must be used to manage the Uyuni Server directly. It cannot be used to manage a second RMT or SMT instance, in a cascade.

1. Synchronize RMT

You can use RMT on SUSE Linux Enterprise 15 installations to manage clients running SUSE Linux Enterprise 12 or later.

We recommend you set up a dedicated RMT instance for each Uyuni installation.

Procedure: Setting up RMT
  1. On the RMT instance, install the RMT package:

    zypper in rmt-server
  2. Configure RMT using YaST:

    yast2 rmt
  3. Follow the prompts to complete installation.

For more information on setting up RMT, see https://documentation.suse.com/sles/15-SP4/html/SLES-all/book-rmt.html.

Procedure: Synchronizing RMT with SCC
  1. On the RMT instance, list all available products and repositories for your organization:

    rmt-cli products list --all
    rmt-cli repos list --all
  2. Synchronize all available updates for your organization:

    rmt-cli sync

    You can also configure RMT to synchronize regularly using systemd.

  3. Enable the products you require. For example, to enable SLES 15:

    rmt-cli product enable sles/15/x86_64
  4. Export the synchronized data to your removable storage. In this example, the storage medium is mounted at /mnt/usb:

    rmt-cli export data /mnt/usb
  5. Export the enabled repositories to your removable storage:

    rmt-cli export settings /mnt/usb
    rmt-cli export repos /mnt/usb

Ensure that the external storage is mounted to a directory that is writeable by the RMT user. You can change RMT user settings in the cli section of /etc/rmt.conf.

2. Synchronize SMT

SMT is included with SUSE Linux Enterprise 12, and can be used to manage clients running SUSE Linux Enterprise 10 or later.

SMT requires you to create a local mirror directory on the SMT instance to synchronize repositories and packages.

For more details on installing and configuring SMT, see https://documentation.suse.com/sles/12-SP5/html/SLES-all/book-smt.html.

Procedure: Synchronizing SMT with SCC
  1. On the SMT instance, create a database replacement file:

    smt-sync --createdbreplacementfile /tmp/dbrepl.xml
  2. Export the synchronized data to your removable storage. In this example, the storage medium is mounted at /mnt/usb:

    smt-sync --todir /mnt/usb
    smt-mirror --dbreplfile /tmp/dbrepl.xml --directory /mnt/usb \
               --fromlocalsmt -L /var/log/smt/smt-mirror-export.log
    curl https://scc.suse.com/suma/product_tree.json -o /mnt/usb/product_tree.json

Ensure that the external storage is mounted to a directory that is writeable by the RMT user. You can change SMT user settings in /etc/smt.conf.

3. Mandatory Channels

The corresponding Uyuni Client Tools Channels are required, for Uyuni to be able to synchronize a given channel. If these channels are not enabled, Uyuni may fail to detect that product.

Run the following command to enable these mandatory channels:

SLES 12 and products based on it such as SLES for SAP or SLE HPC

RMT: rmt-cli products enable sle-manager-tools/12/x86_64

SMT: smt repos -p sle-manager-tools,12,x86_64

SLES 15 and products based on it such as SLES for SAP or SLE HPC

RMT: rmt-cli products enable sle-manager-tools/15/x86_64

SMT: smt repos -p sle-manager-tools,15,x86_64

Then mirror the channels, and export.

Other distributions, or architectures, can be enabled. For more information about enabling product channels or repositories to be mirrored, see the documentation:

4. Synchronize a Disconnected Server

When you have removable media loaded with your SUSE Customer Center data, you can use it to synchronize your disconnected server.

Procedure: Synchronizing a Disconnected Server
  1. Mount your removable media device to the Uyuni server. In this example, the mount point is /media/disk.

  2. Open /etc/rhn/rhn.conf and define the mount point by adding or editing this line:

    server.susemanager.fromdir = /media/disk
  3. Restart the Tomcat service:

    systemctl restart tomcat
  4. Refresh the local data:

    mgr-sync refresh
  5. Perform a synchronization:

    mgr-sync list channels
    mgr-sync add channel channel-label

The removable disk that you use for synchronization must always be available at the same mount point. Do not trigger a synchronization, if the storage medium is not mounted. This results in data corruption.

Be aware that if server.susemanager.fromdir is set, Uyuni will not be able to check if SUSE Customer Center credentials are valid or not. Instead, a warning sign will be displayed and no SCC online check will be performed.