Giter Site home page Giter Site logo

unixorn / apt-multi-iam-s3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from castlabs/apt-s3

3.0 3.0 1.0 59 KB

additional "s3" protocol for apt so you can host your giant apt repository in s3 on the cheap!

License: GNU General Public License v3.0

Makefile 0.93% C 2.23% C++ 96.46% Shell 0.39%

apt-multi-iam-s3's Introduction

apt-multi-iam-s3

Additional "s3" protocol for apt so you can host your giant apt repository in s3 on the cheap!

We use this for pressflip.com to deploy and distribute all of our software. apt is a great packaging system and s3 is a great place to backup/store static files. apt-s3 is especially useful and fast if you are hosting your servers within EC2.

Original Author: Kyle Shank Contributors: Cliff Moon (@cliffmoon on GH), Jens Braeuer (@jbraeuer) Documenter: Susan Potter (@mbbx6spp on GH)

Building

docker build -t local/apt-multi-iam-s3:latest

will build the docker container for the build environment

docker run -v $(pwd)/output/:/output/ -v $(pwd):/code/ --rm -e VERSION=1.1.2 local/apt-multi-iam-s3:1 build

will build the deb and spit it into the ./output/ folder

Installing

Once compiled, the resulting s3 binary must be placed in /usr/lib/apt/methods/ along with the other protocol binaries.

Finally, this is how you add it to the /etc/apt/sources.list file if you want your credentials in the url:

deb s3://AWS_ACCESS_ID:[AWS_SECRET_KEY_IN_BRACKETS]@s3-ENDPOINT.amazonaws.com/BUCKETNAME prod main

otherwise leave off the credentials and it will draw them from the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_KEY_ID.

Simply upload all of your .deb packages and Packages.gz file into the s3 bucket you chose with the file key mapping that matches the file system layout.

Uploading repository to s3

Before synchronization, you need a s3cmd tool installed and configured:

[sudo] apt-get install s3cmd

s3cmd --configure

To synchronize local repository to s3 as read-only, execute:

s3cmd sync /srv/apt-repo-dir/dists s3://bucket_name
s3cmd sync /srv/apt-repo-dir/pool s3://bucket_name

Using GPG keys

If you're signing you repository with key, export it to server:

gpg --send-keys XXXXXXXX

then import it and install to apt:

gpg --recv-keys XXXXXXXX
gpg -a --export XXXXXXXX | [sudo] apt-key add -

apt-multi-iam-s3's People

Contributors

bpo avatar cpoole avatar jbraeuer avatar kyleshank avatar mbbx6spp avatar moonpolysoft avatar unixorn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cpoole

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.