Skip to content
This repository was archived by the owner on Nov 13, 2019. It is now read-only.

Demonstration v1.0

Oliver Schmitz edited this page Nov 19, 2013 · 1 revision

This describes Yum-Repo-Server v1.0, the original single node python implementation, which is now deprecated.

Feature tour on an ubuntu machine

Get a copy of the yum repo server

git clone https://github.com/ImmobilienScout24/yum-repo-server.git

Install the yum-repo-server

cd yum-repo-server sudo ./setup.py install ## Install the yum-repo-client for more comfort `cd client` `sudo ./setup.py install` ### Restart a bash to enable autocompletion features `bash` ## Run a development server to try out the features `cd yum-repo-server && ./manage.py runserver` ## Set the yum-repo-client defaults for autocompletion cat /etc/yum-repo-client.yaml DEFAULT_HOST : localhost DEFAULT_PORT : 8000 ## Play around ### Create a repository `repoclient create repo1` ### Tag it `repoclient tag repo1 'hello from the yum-repo-server wiki!'` ### Read the tags `repoclient taglist repo1` ### Upload a RPM into the repository `repoclient uploadto repo1 myrpm.rpm` where myrpm.rpm is *an actual RPM* (*this is important*, because the server won't accept bad or corrupt RPMs). ### Create a virtual repository pointing to your new repository `repoclient linktostatic myvirtualrepo repo1` ### Create another repository `repoclient create repo2` ### Propagate your rpm to the new repository `repoclient propagate repo1 NOARCH/myrpm.rpm repo2` ### Check repo1, repo2 and myvirtualrepo Open http://localhost:8000/repo/repo1/ (it is empty, since you propagated the sole rpm package in it) Open http://localhost:8000/repo/virtual/myvirtualrepo/ (it is empty, because repo1 is empty too) Open http://localhost:8000/repo/repo2/ (it contains the propagate rpm package) ### Create another virtual repository `repoclient linktovirtual myvirtualrepo2 myvirtualrepo` (the repository is empty, because myvirtualrepo is also empty) ### Relink the virtual repository `repoclient linktostatic myvirtualrepo1 repo2` (myvirtualrepo now contains an rpm since it was relinked). Note that myvirtualrepo2 is *still empty* because it is linked to repo1, as was myvirtualrepo as we created the link. ### Invoke createrepo on a repository `repoclient generatemetadata repo2` repo2 can now be used as a real yum repository! ### Create a virtual repository redirect `repoclient redirectto myvirtualrepo2 http://foo.com/repo` ### Setup periodic metadata generation on repo2 Create a file called `metadata-generation.yaml` in the repo2. Since you are using the development server, the repository is in `yum-repo-server/target/static/repo2`. If you are not, you'll have to look in the settings.py file wich contains a line like so : `REPO_CONFIG = {'REPO_DIR' : '/var/yum-repos', ... }` (the default is `/var/yum-repos`) Put 'generation_type' : 'scheduled' 'generation_interval' : '40' in the file. A createrepo will now be invoked on repo2 every 40 seconds.
Clone this wiki locally