- Notifications
You must be signed in to change notification settings - Fork1
Ruby wrapper for managing deb repos with Aptly (http://aptly.info)
License
ryanuber/ruby-aptly
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Ruby wrapper for managing deb repos withAptly.
This is currently awork in progress!ruby-aptly
does not wrap 100% of theaptly feature set yet, but most major things are working at this point.
ruby-aptly is currently tested against Aptly 0.5. It is possible that it willalso work fine on older or newer versions, but this is untested.
ruby-aptly should work on any Ruby >= 1.8.7.
Aptly is a great tool for managing Apt repositories. It is reliable, activelymaintained, and ridiculously fast.
Setting up Aptly is a snap - creating repositories, seeding them, takingsnapshots, and most other operations are pretty simple.
Orchestrating repository updates are a bit different. Typically this can be donewith a few simple shell scripts or similar, but where it really shines is whenyou start driving it with data. Having tooling that understands Aptly's state isnice for quickly funneling your hiera data or similar into usable repositorieswith just a few lines of code. This library aims to make that process simple.
API documentation available atrubydoc.info
require'rubygems'require'aptly'# Creates a new mirrormirror=Aptly.create_mirror('precise','http://us.archive.ubuntu.com/ubuntu','precise',:components=>['main','universe','multiverse'])# Performs a mirror updatemirror.update# List packages in the mirrormirror.list_packages# Create a snapshot of a mirrorsnap1=mirror.snapshot'snap1'# Creates a new reporepo=Aptly.create_repo'test_repo'# Import packages from a mirror into the reporepo.importmirror.name,:packages=>['linux-image','bash']# Create a snapshot from a reposnap2=repo.snap'snap2'# Merge two snapshots together, pulling in only latest packagesmerged=Aptly.merge_snapshotssnap1,snap2,:latest=>true# List packages in a merged snapshotmerged.list_packages# Publish a snapshotmerged.publish
About
Ruby wrapper for managing deb repos with Aptly (http://aptly.info)