Skip to content
RPM repository mirroring tool and registration proxy for SUSE Customer Center.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bundle use bundler parallel jobs Oct 10, 2017
.github Update reflect latest ideas Mar 19, 2018
app Don't create product.service automagically May 10, 2019
bin Set ruid; set GPG homedir Jul 8, 2019
config Refactor the i18n initializers Apr 8, 2019
db Added unique constraint & validation on systems.login Mar 20, 2019
docs Add plugin development doc Jan 22, 2019
engines Don't create product.service automagically May 10, 2019
features Change compose and runscript to update the working dir at startup Jun 19, 2019
integration Bump up the version; fix integration tests Jul 8, 2019
lib Abort mirroring if errors were encountered during data download Jul 9, 2019
locale Translated using Weblate (Swedish) Apr 4, 2019
log Create new Rails API app May 31, 2017
nginx Update Dockerfile Jan 26, 2018
package Abort mirroring if errors were encountered during data download Jul 9, 2019
public Added tests for suma product tree mirroring Mar 19, 2019
spec Abort mirroring if errors were encountered during data download Jul 9, 2019
support Add headers to CSV files Apr 17, 2019
tmp Create new Rails API app May 31, 2017
vendor Create new Rails API app May 31, 2017
.codeclimate.yml Add specs for RMT -> RMT controller Nov 26, 2018
.dockerignore Implement integration tests running inside Docker container Aug 23, 2018
.env.example Pass the external port to nginx Jan 29, 2018
.gitignore Advice from @ikapelyukhin to further cleanup the packages directory Mar 29, 2019
.rubocop.yml Some missing changes in the package refactoring Mar 29, 2019
.rubocop_todo.yml Improve handling of errors during GPG signature downloads Jul 8, 2019
.ruby-version use 2.5.0 Feb 15, 2018
.simplecov Rake test should fail on error Mar 29, 2019
.travis.yml skip danger run in forks Feb 15, 2019
CONTRIBUTORS Update readme, license, contributors, etc. Aug 31, 2017
COPYING Update readme, license, contributors, etc. Aug 31, 2017
Dangerfile Some missing changes in the package refactoring Mar 29, 2019
Dockerfile Remove gcc and make from zypper install in dockerfile Feb 21, 2018
Gemfile Remove outdated comments from Gemfile May 21, 2019
Gemfile.lock Update shoulda-matchers to version 4.1.1 (#444) Jul 17, 2019
Guardfile Enable Guard Mar 21, 2018
Jenkinsfile Fixed deploy of rmt with mysql Sep 18, 2017
LICENSE update year Jan 22, 2019
MANUAL.md Pick up all changes to repo mirroring settings; update MANUAL.md May 16, 2019
MIGRATE.md Update README, MIGRATION and MANUAL with new configuration file path Aug 14, 2018
Makefile Fixed Makefile Apr 24, 2019
PACKAGE.md Update PACKAGE.md Jul 8, 2019
README.md Update OBS repos mentioned in readme Jul 2, 2019
Rakefile Create new Rails API app May 31, 2017
config.ru Create new Rails API app May 31, 2017
docker-compose-base.yml Update Dockerfile Jan 26, 2018
docker-compose-test.yml Remove trailing empty line. Jun 19, 2019
docker-compose.yml Use bundle.ruby2.5 instead of bundle in docker image Feb 21, 2018

README.md

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_15_SP1, openSUSE_Leap_15.0, openSUSE_Leap_15.1, 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 libmariadb-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!

You can’t perform that action at this time.