Skip to main content

Repoman: a scalable apt server using Amazon SimpleDB and S3

Introduction

Back in 2011, a scrappy young startup called "Weatherbill" found itself with a conundrum: we were using Debian's dpkg and apt tools to package and serve binary software within our own infrastructure, but we were also starting to use Amazon's Elastic Mapreduce to create ephemeral Hadoop clusters for geospatial and weather data processing, and it turned out that spinning up a 2,000-node Hadoop cluster and downloading several dozen gigabytes of packages from our standalone apt server onto each Hadoop compute node at once was an excellent way to make the apt server vanish in a puff of smoke.

So with the optimism that comes from youth and too much caffiene, we wrote our own apt server, based on Amazon's Simple Storage Service (S3) and SimpleDB offerings. We called it "Repoman", because the life of a repo man, much like that of an engineer at a small startup, is always intense. And since then, Repoman has successfully served millions of packages to various servers and services here at The Climate Corporation (which Weatherbill became) and we're happy to finally get a chance to share it with you.

Requirements

In order to operate an apt repository with Repoman, you will need at a minimum:

  • A working Python 2.7 or 3.5 installation
  • An Amazon Web Services account
  • User credentials in that AWS account, either in your shell environment, a ~/.aws/Credentials file, or via an EC2 Instance Profile or ECS Task Role. In general if the AWS CLI runs successfully in your environment, Repoman should run.
  • An AWS SimpleDB Domain which Repoman will use to store metadata about your packages.
  • An AWS S3 Bucket which Repoman will use to store your actual .deb package files and also the generated metadata files that form an Apt repository.
  • Your user credentials must have sufficient permissions (via Amazon IAM) to manipulate both the SimpleDB domain and the S3 bucket: you will need at a minimum to be able to create and delete keys in both. A sample IAM security policy is provided in the docs folder

Some basic familiarity with the concepts and nomenclature of running an apt server is assumed: if you don't know what distributions, components and architectures are, you may want to review the apt documentation

Optional

  • Repoman can function with your own user credentials, or it can assume an IAM role before querying AWS APIs; see the installation section for details on how to use roles.
  • Repoman can sign your apt repository's metadata files in order to provide strong assurances that the packages in the repo come from their claimed source. You will need a working GPG keyring, and key management is not provided by Repoman.

Commands, flags and help

The repoman-cli cli tool offers the following commands:

  • setup -- initial setup of the repository
  • checkup -- check that SimpleDB and S3 are configured correctly
  • add -- add packages to the repository
  • rm -- delete packages from the repository
  • cp -- copy packages from one distribution or component in the repository to another distribution or complnent
  • query -- list packages in the repository based on filters
  • publish -- publish the current SimpleDB repository to state to S3
  • backup -- backup the current SimpleDB state to a JSON file
  • restore -- restore SimpleDB state from a JSON file
  • repo -- repository management sub-commands:
    • repo add-distribution -- add a distribution for the repo to serve
    • repo rm-distribution -- remove a distribution for the repo to serve
    • repo add-component -- add a component for the repo to serve
    • repo rm-component -- remove a component for the repo to serve
    • repo add-architecture -- add a architecture for the repo to serve
    • repo rm-architecture -- remove a architecture for the repo to serve
    • repo add-topic -- add an SNS topic to log notifications to
    • repo rm-topic -- remove any configured SNS topic
    • repo show-config -- show the current repository configuration
    • repo add-origin -- set an Origin string for the published repository
    • repo add-label -- set a Label string for the published repository

The repoman-cli utility itself and all of its commands and sub-commands will take a -h or --help flag to show help text and all locally relevant flags.

Most commands that mutate the repository will prompt for confirmation; this step can be bypassed by passing the -y or --confirm flag.

Some particularly dangerous commands (e.g. deleting an entire distribution's worth of packages) will prompt for an extra confirmation step; this too can be bypassed by passing in the --i-fear-no-evil flag but this is a strictly at-your-own-risk proposition.

To automatically publish the repository to s3 after adding, copying or removing packages, pass the --publish flag.

Further Documentation

Metadata

Release files for apt-repoman 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apt-repoman 1.0.7
File Size Uploaded Provenance
apt-repoman-1.0.7.tar.gz 34.5 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for apt-repoman 1.0.7
File Interpreter ABI Platform
apt_repoman-1.0.7-py3-none-any.whl Python 3 none any Details
apt_repoman-1.0.7-py2-none-any.whl Python 2 none any Details

Total release size: 104.5 kB

Release files / apt-repoman-1.0.7.tar.gz

Download URL apt-repoman-1.0.7.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
37ce32cd3dfca94c58a7a3b425a178ebe3eee1b4cb7f0f8663e426c82e057b62
BLAKE2b-256 checksum
How to use checksums
a2b9b3e5c169dce56e3f5564c1ea380d4e79af79e1d71a05d603f31326075e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release files / apt_repoman-1.0.7-py3-none-any.whl

Download URL apt_repoman-1.0.7-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f4f4297697148afe6a441aca2d544713f6196c5b4a55cfc0850d6a8a0c58517
BLAKE2b-256 checksum
How to use checksums
dc517ba4d1b3dda484105ebe67e1cd3ae6ac6ee6306bafb74fd9e8854ec2dd46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release files / apt_repoman-1.0.7-py2-none-any.whl

Download URL apt_repoman-1.0.7-py2-none-any.whl
Size 35.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1652adcc7665183730ec218384c71e8064247674e79ed98b0347811a168e3154
BLAKE2b-256 checksum
How to use checksums
a0f12989b9f517c7903adea062c91296e54b815396649ade2fdc67cce657e74f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Security for apt-repoman 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page