You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is currently a work in progress! ruby-aptly does not wrap 100% of the
aptly feature set yet, but most major things are working at this point.
Compatibility
ruby-aptly is currently tested against Aptly 0.5. It is possible that it will
also 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, actively
maintained, and ridiculously fast.
Setting up Aptly is a snap - creating repositories, seeding them, taking
snapshots, and most other operations are pretty simple.
Orchestrating repository updates are a bit different. Typically this can be done
with a few simple shell scripts or similar, but where it really shines is when
you start driving it with data. Having tooling that understands Aptly's state is
nice for quickly funneling your hiera data or similar into usable repositories
with just a few lines of code. This library aims to make that process simple.
require'rubygems'require'aptly'# Creates a new mirrormirror=Aptly.create_mirror('precise','https://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