Skip to content
Rewrite of the MirrorManager application in Flask and SQLAlchemy
Python HTML Perl CSS Shell TSQL Other
Branch: master
Clone or download
adrianreber Merge pull request #280 from adrianreber/prop
Fix typo in propagation URL
Latest commit 9aba522 Nov 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
alembic Added new columns to the host table Apr 9, 2015
client report_mirror: fix python3 errors May 11, 2019
devel/ansible added Vagrant setup for mirrormanager Sep 26, 2016
doc Release 0.11 Oct 4, 2019
fedmsg.d Fix example fedmsg config. Apr 23, 2015
mirrorlist mirrorlist: adapt weighted_shuffle to Python 3 Sep 20, 2019
mirrormanager2 Merge pull request #280 from adrianreber/prop Nov 26, 2019
testdata/pub/fedora/linux Fix tests to work with python3 Jan 10, 2019
tests Disallow users accessing other hosts and sites Nov 11, 2019
utility Merge pull request #278 from adrianreber/skip Nov 26, 2019
.gitignore Enable MirrorManager2 to be built using Python 3 for Fedora Jan 5, 2019
.travis.yml Enable MirrorManager2 to be built using Python 3 for Fedora Jan 5, 2019
LICENSE-GPLv2 use more recent copy of GPLv2 license text Sep 10, 2015
LICENSE-MIT-X11 Adjust the license and copyright in the LICENSE-MIT file Dec 6, 2014
MANIFEST.in Release 0.10 Oct 3, 2019
README.rst Add protbuf dependency Sep 20, 2019
Vagrantfile.example added Vagrant setup for mirrormanager Sep 26, 2016
createdb.py Enable MirrorManager2 to be built using Python 3 for Fedora Jan 5, 2019
mirrormanager.proto Added protobuf definition Sep 20, 2019
requirements.txt Add protbuf dependency Sep 20, 2019
requirements_mirrorlist.txt Add protbuf dependency Sep 20, 2019
runserver.py Enable MirrorManager2 to be built using Python 3 for Fedora Jan 5, 2019
runtests.sh Add protbuf dependency Sep 20, 2019
setup.py Enable MirrorManager2 to be built using Python 3 for Fedora Jan 5, 2019

README.rst

Fedora MirrorManager

MirrorManager2 is a rewrite of mirrormanager using flask and SQLAlchemy.

MirrorManager is the application that keeps track of the nearly 400 public mirrors, and over 300 private mirrors, that carry Fedora, EPEL, and RHEL content, and is used by rpmfusion.org, a third party repository. It automatically selects the "best" mirror for a given user based on a set of fallback heuristics.

Github mirror:https://github.com/fedora-infra/mirrormanager2
Mailing list for announcements and discussions:https://lists.fedoraproject.org/archives/list/mirror-admin@lists.fedoraproject.org/

Hacking

Hacking with Vagrant

Quickly start hacking on mirrormanager2 using the vagrant setup that is included in the repo is super simple.

First, make a copy of the Vagrantfile example:

$ cp Vagrantfile.example Vagrantfile

Next, install Ansible, Vagrant and the vagrant-libvirt plugin from the official Fedora repos:

$ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs

Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of mirrormanager2, run the vagrant up command to provision your dev environment:

$ vagrant up

When this command is completed (it may take a while) you will be able to the command to start the mirrormanager server:

$ vagrant ssh -c "pushd /vagrant/; python runserver.py --host '0.0.0.0'"

Once that is running, simply go to http://localhost:5000/ in your browser on your host to see your running mirrormanager test instance.

Manual Setup

Here are some preliminary instructions about how to stand up your own instance of mirrormanager2. All required packages for MirrorManager2 are part of Fedora or RHEL/CentOS/EPEL. In the following example we will, however use a virtualenv and a sqlite database and we will install our dependencies from the Python Package Index (PyPI).

First, set up a virtualenv:

$ sudo yum install python-virtualenv
$ virtualenv my-MirrorMan-env
$ source my-MirrorMan-env/bin/activate

Issuing that last command should change your prompt to indicate that you are operating in an active virtualenv.

Next, install your dependencies:

(my-MirrorMan-env)$ pip install -r requirements.txt

Now the protobuf deinition needs to be compiled to Python:

(my-MirrorMan-env)$ protoc --python_out=mirrorlist mirrormanager.proto
(my-MirrorMan-env)$ protoc --python_out=mirrormanager2/lib mirrormanager.proto

You should then create your own sqlite database for your development instance of mirrormanager2:

(my-MirrorMan-env)$ python createdb.py

If all goes well, you can start a development instance of the server by running:

(my-MirrorMan-env)$ python runserver.py

Open your browser and visit http://localhost:5000 to check it out.

Once you made your changes please run the test suite to verify that nothing covered by tests has been broken:

(my-MirrorMan-env)$ ./runtests.sh
You can’t perform that action at this time.