Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 15

5 RMT Tools and Configuration Files

This chapter describes the most important scripts, configuration files and certificates shipped with RMT.

5.1 Important Scripts and Tools

There are two important groups of RMT commands: The rmt-cli command and its sub-commands are used to manage the mirroring of updates, registration of clients, and reporting. The systemd rmt-server.service is used for starting, stopping, restarting the RMT service and for checking its status.

5.1.1 rmt-cli Commands

The key command to manage the RMT is rmt-cli (/usr/bin/rmt-cli). The rmt-cli command should be used together with the sub-commands described in this section. If the rmt-cli command is used alone, it prints a list of all available sub-commands. To get help for individual sub-commands, use man rmt-cli.

The following sub-commands are available:

rmt-cli sync

Synchronize database with SUSE Customer Center.

rmt-cli products

List and modify products.

rmt-cli repos

List and modify repositories.

rmt-cli mirror

Mirror repositories.

rmt-cli import

Import commands for the offline mode.

rmt-cli export

Export commands for the offline mode.

rmt-cli version

Show RMT version.

The following sections explain each sub-command in detail.

5.1.1.1 sync

This command triggers the synchronization with the SUSE Customer Center instantly. The command has no further options. The synchronization is also triggered each night by th systemd timer rmt-server-sync.timer.

5.1.1.2 products

List and modify products.

rmt-cli products list [--all] [--csv]

Lists the products that are enabled for mirroring. Use the --all flag to list all available products. Use the --csv flag to output the list in CSV format. ls can be used as a shortcut for list.

rmt-cli products enable [id | string]

Enables mandatory repositories of a product by its id or product string.

rmt-cli products disable [id | string]

Disables all repositories of a product by its id or product string.

5.1.1.3 repos

rmt-cli repos list [--all] [--csv]

Lists the repositories that are enabled for mirroring. Use the --all flag to list all available repositories. Use the --csv flag to output the list in CSV format. ls can be used as a shortcut for list.

rmt-cli repos enable [id]

Enables a single repository by its id.

5.1.1.4 repos custom

rmt-cli repos disable [id]

Disables a single repository by its id.

rmt-cli repos custom list [--csv]

Lists all your custom repositories. Use the --csv flag to output the list in CSV format. ls can be used as a shortcut for list.

rmt-cli repos custom add [url] [name]

Adds a new custom repository, for example: rmt-cli repos custom add https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP3/ Virtualization:Containers

rmt-cli repos custom enable [id]

Enables mirroring for a custom repository.

rmt-cli repos custom disable [id]

Disables mirroring for a custom repository.

rmt-cli repos custom remove [id]

Removes a custom repository.

rmt-cli repos custom products [id]

Lists the products attached to the custom repository with given id.

rmt-cli repos custom attach [id] [product id]

Attaches an existing custom repository to a product.

rmt-cli repos custom detach [id] [product id]

Detaches an existing custom repository from a product.

5.1.1.5 mirror

rmt-cli mirror

In its default configuration, RMT mirrors its enabled product repositories automatically once every night. This command starts the mirroring process manually.

When all enabled repositories are fully mirrored, you can register your client systems against RMT by running SUSEConnect --url https://RMT_HOSTNAME on the client machine. After successful registration the repositories from RMT will be used by zypper on the client machine.

5.1.1.6 import

This command is required for the offline mode. For details, see Section 3.7, “Exporting and Importing Repositories”.

rmt-cli import data [path]

Run this on the offline RMT to read the JSON files from given path and fill the local database with data.

rmt-cli import repos [path]

Run this on the offline RMT to import RPM packages.

5.1.1.7 export

This command is required for the offline mode. For details, see Section 3.7, “Exporting and Importing Repositories”.

rmt-cli export data [path]

Run this on an online RMT to get the latest data from SUSE Customer Center and save it as JSON files at the specified path.

rmt-cli export settings [path]

Run this on the offline RMT to save the settings for enabled repositories at given path as repos.json.

rmt-cli import repos [path]

Run this on the offline RMT to export RPM packages.

5.1.1.8 version

Display the version of rmt-cli.

5.1.2 RMT systemd Commands

You can manage RMT-related services with the standard systemd commands. The RMT server has the following services and timers:

rmt-server.target

A systemd target that starts all required RMT components.

rmt-server.service

The RMT server.

rmt-server-migration.service

This server migrates the database to the newest schema, if required. There is no need to manually interact with this service.

rmt-server-sync.timer

This timer is responsible for periodically synchronizing all repository product data from the SUSE Customer Center.

rmt-server-mirror.timer

This timer is responsible for periodically synchronizing all RPMs from the SUSE Customer Center.

Use systemctl to control the RMT services and timers.

5.2 RMT Configuration Files

The main RMT configuration file is /etc/rmt.conf. You can set most of the options with the YaST RMT Server module.

5.2.1 /etc/rmt.conf

The only supported way of doing the initial configuration is with yast2 rmt as described in Section 1.3, “RMT Configuration with YaST”. Only the proxy configuration has to be entered manually. The other configuration parameters are documented for reference.

All available configuration options can be found in the /etc/rmt.conf file.

5.2.1.1 Mirroring settings

The mirroring section lets you adjust mirroring behavior.

mirror_src

Decides whether to mirror source RPM packages (architecture is src).

verify_rpm_checksums

Decides whether to mirror source RPM packages (architecture is src).

dedup_method

Enables deduplication when set to hardlink. Possible values: hardlink, copy.

5.2.1.2 HTTP Client Settings

The http_client section defines the global HTTP connection settings of RMT.

verbose

Enables additional debug output to the systemd journal.

proxy

The proxy server URL.

proxy_auth

This setting determines the proxy authentication mechanism. Possible values are: none, basic, digest, gssnegotiate, ntlm, digest_ie, ntlm_wb.

proxy_user

The proxy server user name.

proxy_password

The proxy server password.

5.2.1.3 Settings for Accessing SUSE Repositories

The scc section contains your mirroring credentials for contacting the SUSE Customer Center. Your mirroring credentials can be obtained from the SUSE Customer Center at https://scc.suse.com/.

Valid configuration keys for the section are:

username

Mirroring credentials user name.

password

Mirroring credentials password.

5.2.2 SSL Certificates and HTTPS

By default access to API endpoints consumed by SUSEConnect is limited to HTTPS only. nginx is configured to use SSL certificate and private key from the following locations:

  • Certificate: /usr/share/rmt/ssl/rmt-server.crt

  • Private key: /usr/share/rmt/ssl/rmt-server.key

YaST RMT module generates a custom certificate authority which is used to sign HTTPS certificates, which means that to register, this certificate authority must be trusted by the client machines:

  • For registrations during installation from the media or with YaST Registration module, a message will appear, prompting to trust the server certificate.

  • For registering a client system on the command line, use the rmt-client-setup script. It is provided at the following URL: http://RMT_HOSTNAME/tools/rmt-client-setup

The script requires only the RMT server host name as a mandatory parameter, for example:

root # wget http://rmt.example.org/tools/rmt-client-setup
root # chmod +x ./rmt-client-setup
root # ./rmt-client-setup http://rmt.example.org

Executing this script will import the RMT CA´s certificate into the trusted store and after that, run SUSEConnect to register the client with the RMT.

Print this page