RPM repository mirroring tool and registration proxy for SUSE Customer Center.
Clone or download
Latest commit 1c007c5 Nov 19, 2018
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 Merge branch 'master' into enable-multiple-products Nov 15, 2018
bin Use indent method for strings Nov 8, 2018
config Added nginx subrequest endpoint; updated CI with coverage reports mer… Oct 31, 2018
db Import migration_extra attribute from SCC API Oct 30, 2018
docs/rfc Refactor according to PR comments Oct 5, 2017
engines/strict_authentication Add credentials parameter to repo URLs; don't package unneeded files Nov 8, 2018
features Small specs cleanup Aug 23, 2018
integration Cleanup Dockerfile.test Sep 12, 2018
lib Added comment and missing tests Nov 15, 2018
locale add .keep file Oct 10, 2017
log Create new Rails API app May 31, 2017
nginx Update Dockerfile Jan 26, 2018
package Merge branch 'master' into enable-multiple-products Nov 15, 2018
public Don't error on absent repo keys on server Jun 29, 2018
spec Added test with mixed spaces and commas Nov 16, 2018
support Merge branch 'master' into refactor_repos_custom_list May 9, 2018
tmp Create new Rails API app May 31, 2017
vendor Create new Rails API app May 31, 2017
.codeclimate.yml Create .codeclimate.yml Jul 31, 2017
.dockerignore Implement integration tests running inside Docker container Aug 23, 2018
.env.example Pass the external port to nginx Jan 29, 2018
.gitignore split off usage instruction into manual.md May 17, 2018
.rubocop.yml Rubocop target ruby 2.5 Nov 8, 2018
.rubocop_todo.yml Rubocop target ruby 2.5 Nov 8, 2018
.ruby-version use 2.5.0 Feb 15, 2018
.simplecov Added nginx subrequest endpoint; updated CI with coverage reports mer… Oct 31, 2018
.travis.yml Added nginx subrequest endpoint; updated CI with coverage reports mer… Oct 31, 2018
CONTRIBUTORS Update readme, license, contributors, etc. Aug 31, 2017
COPYING Update readme, license, contributors, etc. Aug 31, 2017
Dangerfile Remove Makefile version check from Dangerfile Jul 6, 2018
Dockerfile Remove gcc and make from zypper install in dockerfile Feb 21, 2018
Dockerfile.test Fix docker cache issue in integrations tests Sep 12, 2018
Gemfile Integration tests cleanup Aug 23, 2018
Gemfile.lock Update fakefs to version 0.18.0 Nov 14, 2018
Guardfile Enable Guard Mar 21, 2018
Jenkinsfile Fixed deploy of rmt with mysql Sep 18, 2017
LICENSE Update readme, license, contributors, etc. Aug 31, 2017
MANUAL.md Update MANUAL.md and README.md to reflect reverted location of rmt.conf Aug 22, 2018
MIGRATE.md Update README, MIGRATION and MANUAL with new configuration file path Aug 14, 2018
Makefile Add credentials parameter to repo URLs; don't package unneeded files Nov 8, 2018
PACKAGE.md Missing 'n' Oct 5, 2018
README.md Link to new Swagger SCC API docs Nov 16, 2018
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 Cleanup Dockerfile.test Sep 12, 2018
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_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!