March 15, 2016

Push DEB packages from CI jobs to aptly repo

Now that we got aptly up and running, we can use it to upload packages. Practical example would be building packages in some CI (Jenkins, Gitlab, Travis, Drone, you-name-it, …), probably add some tests and then upload the package to a repo. Example can be found here in file Take notice of some variables being sourced inside .gitlab-ci.yml before ($PACKAGE_FILE, $ARCH, $DIST).

March 14, 2016

aptly CLI tool

As the Aptly API is well documented, you can implement your own client using curl/python/ruby/go/whatever or just use this one written in Ruby. Installation gem install aptly_cli Simply as that. If you want to read further and use your API with basic authentication, you can check if my pull request has been accepted or just build the gem on your own. Basic Authentication UPDATE 2016-03-16: PR accepted, just pull the official gem Read more

March 14, 2016

Protect aptly API with basic authentication

You should really protect your aptly API with at least basic authentication. This is easy to achive with a reverse proxy webserver like nginx or Apache. As you are going to transfer credentials then, you should also protect the whole thing with SSL. nginx Example snippet (most of this is misc. nginx and ssl setup, interesting bits tagged with ###): server { listen 80; server_name ; ### rewrite all non https traffic location /api/ { rewrite ^/(. Read more

March 13, 2016

Setup aptly on Ubuntu

aptly is a swiss army knife for Debian repository management: it allows you to mirror remote repositories, manage local package repositories, take snapshots, pull new versions of packages along with dependencies, publish as Debian repository. You can try it right now just for free. aptly is available both as CLI tool and HTTP REST service. Nuff said, we want this ☺ Installation Aptly provides a repo (with an outdated key, do not wonder) to install the single binary (written in Go). Read more