repositor.io - simple repository management
TRANSCRIPT
repositor.io
Simple Repository Management
Jürgen Brunk
München, 03/2015
repositor.io 2
1. Was ist repositor.io ?2. Praxis3. Installation4. Configuration5. Command Line Options6. CentOS Repository7. Debian Repository8. Ubuntu Repository9. RHEL Repository10.Custom Repository11.Docker private Registry12.Links
Agenda
Was ist repositor.io ?
repositor.io 4
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 5
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 [email protected] in Perl entwickelt
repositor.io 6
What you see is what you get
Fragen soweit ?
Praxis
Installation
repositor.io 10
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
Configuration
repositor.io 12
Configuration
/etc/rex/repositorio.conf:
RepositoryRoot = /var/www/repo/
<Log4perl> config = /etc/rex/log4perl.conf ← Loglevel</Log4perl>
<Repository repo-name> url = http://remote-mirror.org/debian/ local = repo-name/debian type = Apt|Yum arch = amd64[,...] dist = wheezy components = main[,...]</Repository>
Command Line Options
repositor.io 14
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
CentOSRepository
repositor.io 16
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/...
DebianRepository
repositor.io 18
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
UbuntuRepository
repositor.io 20
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
RHELRepository
repositor.io 22
RHEL Repository
/etc/rex/repositorio.conf:<Repository rhel-6-x86-64> url = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/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
CustomRepository
repositor.io 24
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
Docker private Registry
repositor.io 26
Docker private RegistrySetup
/etc/rex/repositorio.conf:
<Repository docker> local = docker type = Docker</Repository>
# repositorio --repo docker --init
# repositorio –repo docker --server prefork
repositor.io 27
Docker private RegistryDocker 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 28
Docker private RegistryUsage
# docker login -e [email protected] -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
Noch Fragen ?
repositor.io 30
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/
31
Vielen Dank !
Kontakt
Jürgen BrunkSystems Engineer
inovex GmbHOffice MünchenValentin-Linhof Str. 2D-81829 München
Mobil: 0173 3181 003Mail: [email protected]