Skip to main content

Simple Debian repository manager using S3

Project description

A simple Debian repository using S3

sthreepo (read ess-three-p-oh) is an extremely simple (and far FAR from complete) Debian repository manager using AWS S3 for storage and AWS KMS for signature keys.

Signature Keys

Signature keys are managed in AWS KMS, using the pgpkms library. Read its documentation to better understand how to create and manage those keys.

Creating a Repository

A repository can be created by simply invoking sthreepo with a bucket name, default index and (optional) origin and label:

$ python3 -m sthreepo \
  --bucket=my-repo-bucket \
  --default-index=buster:main \
  --origin=Juit \
  --label=Juit

Adding Packages

Once the repository is created (and its state stored in S3) adding packages should be as easy as calling:

$ python3 -m sthreepo -b=my-repo-bucket ./my-package.deb

HTTPS and Authentication

As with any S3-based website, HTTPs and authentication support can be added using CloudFront.

The terraform/ directory contains a basic Terraform setup to create such an environment.

Further Help

Look at the command line help for more information:

$ ./bin/sthreepo -h

Usage: ./bin/sthreepo [options] <package.deb>

Options:
  -b, --bucket=<name>   The AWS bucket name of the repository.
  -c, --create-index=distribution:component
                        Create a new index in the repository.
  -d, --default-index=distribution:component
                        Set the default index for the repository.
  -i, --index=distribution:component
                        Use the specified index for the new package.
  -k, --key=<id>        The ID, ARN, or alias of the key to use.
  -l, --label=<label>   Set the label for the repository.
  -n, --name=<name>     The name of the repository (default: "repository").
  -o, --origin=<origin> Set the origin for the repository.
  -v, --verbose         Be more verbose.
      --invalidate-cloudfront=<distribution-id>
                        Invalidate all CloudFront caches for the distribution
                        with the specified ID.

Environment Variables:
  STHREEPO_BUCKET         The AWS bucket name of the repository.
  STHREEPO_KEY            The default ID, ARN or alias of the KMS key to use.
  STHREEPO_CLOUDFRONT_ID  The CloudFront Distribution ID for invalidating caches.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sthreepo-0.0.3.tar.gz (20.3 kB view details)

Uploaded Source

File details

Details for the file sthreepo-0.0.3.tar.gz.

File metadata

  • Download URL: sthreepo-0.0.3.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.4

File hashes

Hashes for sthreepo-0.0.3.tar.gz
Algorithm Hash digest
SHA256 844f2823b3bcd05bda7231403ed6fd06f803f7df7be3a6f40c1d2e90bd094b15
MD5 b43f5a71c4543499879c31f02b9e6b6a
BLAKE2b-256 96bee12a0cc8d583add9a6630448652f7089b544414df5fd48be75aa96bf11ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page