repositor.io Simple Repository Management Jürgen Brunk München, 03/2015
Agenda 1. Was ist repositor.io? 2. Praxis 3. Installation 4. Configuration 5. Command Line Options 6. CentOS Repository 7. Debian Repository 8. Ubuntu Repository 9. RHEL Repository 10.Custom Repository 11.Docker private Registry 12.Links repositor.io 2
Was ist repositor.io?
Was ist repositor.io? schlankes Management Tool zum Aufbau eines lokalen Linux Repository Mirrors spiegelt Online Repos um nicht jedes Mal ein Installations-Paket downloaden zu müssen Unterstützt YUM und APT Repos (RHEL, Fedora, CentOS, Debian, Ubuntu) Bereitstellen von Errata Informationen repositor.io 4
Was ist repositor.io? Erstellen von eigenen Custom Repositories Betrieb einer privaten Docker Registry Einfache plain ASCII Config Datei (/etc/rex/repositorio.conf) Built-in Webserver (empfohlen: externer Webserver für Linux Repositories) Von jan.gehring@inovex.de in Perl entwickelt repositor.io 5
What you see is what you get repositor.io 6
Fragen soweit?
Praxis
Installation
Installation # wget -O - http://get.repositor.io/ bash *) Der Installer Script wurde getestet unter: CentOS 6 + 7 Debian 7 Ubuntu 12.04 + 14.04 *) dient auch als Update Befehl repositor.io 10
Configuration
Configuration /etc/rex/repositorio.conf: RepositoryRoot = /var/www/repo/ <Log4perl> config = /etc/rex/log4perl.conf </Log4perl> Loglevel <Repository repo-name> url = http://remote-mirror.org/debian/ local = repo-name/debian type = Apt Yum arch = amd64[,...] dist = wheezy components = main[,...] </Repository> repositor.io 12
Command Line Options
Command Line Options # repositorio ------------------------------------------------------------------ --mirror mirror a configured repository (needs --repo) --tag=tagname tag a repository (needs --repo) --repo=reponame the name of the repository to use --update-metadata update the metadata of a repository --update-files download files even if they are already... --init initialize an empty repository --add-file=file add a file to a repository (needs --repo) --remove-file=file remove a file from a repository (needs --repo) --list list known repositories --server start a server for file delivery --update-errata updates the errata database for a repo... --errata query errata for a package (needs --repo, --package, --version, --arch) --package=pkg for which package the errata should be queries --version=ver for which version of a package the errata... --arch=arch for which architecture of a package the... --help display this help message repositor.io 14
CentOS Repository
Centos Repository /etc/rex/repositorio.conf: <Repository centos-6-x86-64> url = http://ftp.hosteurope.de/mirror/centos.org/6/ os/x86_64/ local = centos-6-x86-64/centos/6/os/x86_64/ type = Yum images = true </Repository> # repositorio --repo centos-6-x86-64 mirror URL http://myserver/repo/head/centos-6-x86-64/... repositor.io 16
Debian Repository
Debian Repository /etc/rex/repositorio.conf: <Repository debian-wheezy> url = http://ftp2.de.debian.org/debian/ local = debian-wheezy/debian type = Apt arch = amd64,i386,all dist = wheezy components = main,non-free,contrib images = true </Repository> # repositorio --repo debian-wheezy --mirror repositor.io 18
Ubuntu Repository
Ubuntu Repository /etc/rex/repositorio.conf: <Repository ubuntu-precise-amd64-main> url = http://de.archive.ubuntu.com/ubuntu/ local = ubuntu-precise-amd64- main/ubuntu type = Apt arch = amd64 dist = precise component = main </Repository> # repositorio --repo ubuntu-precise-amd64-main --mirror repositor.io 20
RHEL Repository
RHEL Repository /etc/rex/repositorio.conf: <Repository rhel-6-x86-64> url = https://cdn.redhat.com/content/dist/rhel/server/6/6ser ver/x86_64/os/ local = rhel-6-x86-64/rhel/server/6server/x86_64/os type = Yum key = /etc/rex/ssl/db15c9814abada2a014ab335f6fe3f8c.pem cert = /etc/rex/ssl/db15c9814abada2a014ab335f6fe3f8c.pem ca = /etc/rhsm/ca/redhat-uep.pem </Repository> Must register to RHN before, see http://repositor.io/#mirror_redhat_enterprise # repositorio --repo rhel-6-x86-64 --mirror repositor.io 22
Custom Repository
Custom Repository /etc/rex/repositorio.conf: <Repository custom-repo> local = custom-repo/debian type = Apt arch = amd64 dist = wheezy component = custom </Repository> # repositorio --repo custom-repo --init # repositorio --repo custom-repo --add-file foo-1.0.deb repositor.io 24
Docker private Registry
Docker private Registry Setup /etc/rex/repositorio.conf: <Repository docker> local = docker type = Docker </Repository> # repositorio --repo docker --init # repositorio repo docker --server prefork repositor.io 26
Docker private Registry Docker Sample Container # docker run -d -p 3000:3000 \ --name repositorio-docker \ jbrunk/repositorio-docker https://registry.hub.docker.com/u/jbrunk/repositorio-docker/ repositor.io 27
Docker private Registry Usage # docker login -e some@mail.tld -p password \ -u user myserver:3000 # docker pull debian # docker tag debian myserver:3000/debian # docker push myserver:3000/debian # docker pull myserver:3000/debian repositor.io 28
Noch Fragen?
Links Links: repositor.io Website: http://repositor.io Github: https://github.com/rexops/repositorio Docker Test Container: https://registry.hub.docker.com/u/jbrunk/repositorio-docker/ repositor.io 30
Vielen Dank! Kontakt Jürgen Brunk Systems Engineer inovex GmbH Office München Valentin-Linhof Str. 2 D-81829 München Mobil: 0173 3181 003 Mail: juergen.brunk@inovex.de 31