Skip to content
/ rmt Public
forked from SUSE/rmt

RPM repository mirroring tool and registration proxy for SUSE Customer Center.

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
Notifications You must be signed in to change notification settings

s-leon/rmt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository Mirroring Tool

Build Status Code Climate Coverage Status

This tool allows you to mirror RPM repositories in your own private network. Organization (mirroring) credentials are required to mirror SUSE repositories.

End-user documentation can be found in RMT Guide. man pages for rmt-cli can be found here.

Installation on SLE15

  1. Activate your instance of SLE15 via SUSEConnect -r <regcode>
  2. Activate Server Applications module SUSEConnect -p sle-module-server-applications/15/x86_64
  3. Install RMT with YaST installation wizard zypper in rmt-server yast2-rmt
  4. Run installation wizard for RMT yast2 rmt and configure your instance

Installation on OpenSUSE Leap 15

  1. Install RMT with YaST installation wizard zypper in rmt-server yast2-rmt
  2. Run installation wizard for RMT yast2 rmt and configure your instance

Manual installation and configuration

RMT currently gets built for these distributions: SLE_15, SLE_12_SP2, SLE_12_SP3, openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed. To add the repository, call: (replace <dist> with your distribution)

zypper ar -f https://download.opensuse.org/repositories/systemsmanagement:/SCC:/RMT/<dist>/systemsmanagement:SCC:RMT.repo

To install RMT, run: zypper in rmt-server

After installation configure your RMT instance:

  • Prepare the database:
    • Start MySQL/MariaDB by running systemctl start mysql
    • Set database root user password by running mysqladmin -u root password
    • Make sure you can access to the database console as root user by running mysql -u root -p
    • Create a MySQL/MariaDB user with the following command:
    mysql -u root -p <<EOFF
    GRANT ALL PRIVILEGES ON \`rmt\`.* TO rmt@localhost IDENTIFIED BY 'rmt';
    FLUSH PRIVILEGES;
    EOFF
    
  • See RMT Configuration Files in the official RMT documentation for information about /etc/rmt.conf.
  • Start RMT by running systemctl start rmt-server. This will start the RMT server at http://localhost:4224.
  • By default, mirrored repositories are saved under /usr/share/rmt/public, which is a symlink that points to /var/lib/rmt/public. In order to change destination directory, recreate /usr/share/rmt/public symlink to point to the desired location.

Dependencies

Supported Ruby versions are 2.5.0 and newer.

Development setup

  • Install the dependencies:

    • sudo zypper in libxml2-devel libxslt-devel
    • bundle install
  • Copy the file config/rmt.yml to config/rmt.local.yml to override the default settings:

    • Add your organization credentials to scc section
    • Add your MySQL credentials
  • Setup MySQL/MariaDB:

  • Grant the just configured database user access to your database. The following command will grant access to the default user rmt with password rmt (run it as root):

mysql -u root <<EOFF
GRANT ALL PRIVILEGES ON \`rmt%\`.* TO rmt@localhost IDENTIFIED BY 'rmt';
FLUSH PRIVILEGES;
EOFF
  • Create databases by running rails db:create db:migrate
  • Run rails server to run the web-server

Running with docker-compose

In order to run the application locally using docker-compose:

  1. Copy .env.example file to .env;
  2. Add your organization credentials to .env file. Mirroring credentials can be obtained from the SUSE Customer Center;
  3. Start the containers by running docker-compose up. Running docker-compose up -d will start the containers in the background;
  4. Execute commands in the container, e.g.:
    docker-compose exec rmt rmt-cli repos --help
    Alternatively, running docker-compose exec rmt bash will start the shell inside the container.
  5. The web server will be accessible at http://localhost:8080/, this URL can be used for registering clients.

Is it any good?

Yes.

RMT and SMT

RMT is replacing some functionality of SMT. Following table outlines differences and similarities between the two tools. Last SLE version where SMT is available is 12. From version 15 onward only RMT is offered.

Feature/Tech SMT RMT
Available on SLES11 ✔️
Available on SLES12 ✔️
Available on SLES15 ✔️
Sync products data from SCC ✔️ ✔️
Mirror RPMs from repositories ✔️ ✔️
Selective mirroring(which products to mirror) ✔️ ✔️
Serve RPMs via http ✔️ ✔️
Registration of SLE 15 systems ✔️ ✔️
Registration of SLE 12 systems ✔️ ✔️
Registration of SLE 11 systems ✔️
Migration support SLE 12 > 15 ✔️ ✔️
Staging repositories ✔️ 1
Air gap sync/mirroring for secure environments ✔️ ✔️
NTLM Proxy support ✔️ ✔️
Custom repositories ✔️ ✔️
YaST installation wizard ✔️ ✔️
YaST management wizard ✔️
Client management ✔️
Red Hat support (Expanded Support) ✔️ 2
Files deduplication ✔️ ✔️
Data transfer from SMT to RMT - ✔️
Transfer registration data to SCC ✔️ 3
Reporting ✔️
Custom TLS certificates for web-server ✔️ ✔️
Webserver Apache2 Nginx
Database MariaDB MariaDB
Platform Perl Ruby

1: Functionality is offered by SUSE Manager
2: RES support is planned for SLES15 SP1
3: Registration data transfer to SCC is planned for SLES15 SP2

API documentation

RMT partially implements the SUSE Customer Center API. You can read the details of each endpoint to find out whether they are supported by RMT.

Feedback

Do you have suggestions for improvement? Let us know!

Go to Issues, create a new issue and describe what you think could be improved.

Feedback is always welcome!

About

RPM repository mirroring tool and registration proxy for SUSE Customer Center.

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 95.5%
  • Shell 3.4%
  • Other 1.1%