DataDog/deb-s3

Name: deb-s3

Owner: Datadog, Inc.

Description: Easily create and manage an APT repository on S3

Created: 2015-08-13 23:34:25.0

Updated: 2015-08-13 23:34:26.0

Pushed: 2016-03-07 22:03:59.0

Homepage: null

Size: 138

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

deb-s3

Build Status

deb-s3 is a simple utility to make creating and managing APT repositories on S3.

Most existing existing guides on using S3 to host an APT repository have you using something like reprepro to generate the repository file structure, and then s3cmd to sync the files to S3.

The annoying thing about this process is it requires you to maintain a local copy of the file tree for regenerating and syncing the next time. Personally, my process is to use one-off virtual machines with Vagrant, script out the build process, and then would prefer to just upload the final .deb from my Mac.

With deb-s3, there is no need for this. deb-s3 features:

Getting Started

You can simply install it from rubygems:

m install deb-s3

Or to run the code directly, just check out the repo and run Bundler to ensure all dependencies are installed:

t clone https://github.com/krobertson/deb-s3.git
 deb-s3
ndle install

Now to upload a package, simply use:

b-s3 upload --bucket my-bucket my-deb-package-1.0.0_amd64.deb
xamining package file my-deb-package-1.0.0_amd64.deb
etrieving existing package manifest
ploading package and new manifests to S3
- Transferring pool/m/my/my-deb-package-1.0.0_amd64.deb
- Transferring dists/stable/main/binary-amd64/Packages
- Transferring dists/stable/main/binary-amd64/Packages.gz
- Transferring dists/stable/Release
pdate complete.

e:
b-s3 upload FILES

ons:
, [--arch=ARCH]                     # The architecture of the package in the APT repository.
  [--sign=SIGN]                     # Sign the Release file. Use --sign with your key ID to use a specific key.
, [--preserve-versions]             # Whether to preserve other versions of a package in the repository when uploading one.
, [--bucket=BUCKET]                 # The name of the S3 bucket to upload to.
, [--codename=CODENAME]             # The codename of the APT repository.
                                    # Default: stable
, [--component=COMPONENT]           # The component of the APT repository.
                                    # Default: main
  [--access-key-id=ACCESS_KEY]      # The access key for connecting to S3.
  [--secret-access-key=SECRET_KEY]  # The secret key for connecting to S3.
, [--visibility=VISIBILITY]         # The access policy for the uploaded files. Can be public, private, or authenticated.
                                    # Default: public

ads the given files to a S3 bucket as an APT repository.

You can also delete packages from the APT repository. Please keep in mind that this does NOT delete the .deb file itself, it only removes it from the list of packages in the specified component, codename and architecture.

Now to delete the package:

b-s3 delete my-deb-package --arch amd64 --bucket my-bucket --versions 1.0.0
etrieving existing manifests
- Deleting my-deb-package version 1.0.0
ploading new manifests to S3
- Transferring dists/stable/main/binary-amd64/Packages
- Transferring dists/stable/main/binary-amd64/Packages.gz
- Transferring dists/stable/Release
pdate complete.

You can also verify an existing APT repository on S3 using the verify command:

s3 verify -b my-bucket
etrieving existing manifests
hecking for missing packages in: stable/main i386
hecking for missing packages in: stable/main amd64
hecking for missing packages in: stable/main all

e:
b-s3 verify

ons:
, [--fix-manifests]                 # Whether to fix problems in manifests when verifying.
  [--sign=SIGN]                     # Sign the Release file. Use --sign with your key ID to use a specific key.
, [--bucket=BUCKET]                 # The name of the S3 bucket to upload to.
, [--codename=CODENAME]             # The codename of the APT repository.
                                    # Default: stable
, [--component=COMPONENT]           # The component of the APT repository.
                                    # Default: main
  [--access-key-id=ACCESS_KEY]      # The access key for connecting to S3.
  [--secret-access-key=SECRET_KEY]  # The secret key for connecting to S3.
, [--visibility=VISIBILITY]         # The access policy for the uploaded files. Can be public, private, or authenticated.
                                    # Default: public

fies that the files in the package manifests exist

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.