Git Product home page Git Product logo

captain's Introduction

cAPTain

Lightweight, standalone RESTful HTTP server for distributing Debian packages

cAPTain is a simple, lightweight HTTP server for storing and distributing custom Debian packages around your organisation. It is designed to make it as easy as possible to use Debian packages for code deployments and to ease other system administration tasks.

Each cAPTain instance is a HTTP APT repo - simpy point a /etc/apt/sources.list entry at your instance for instant package distribution!

Why use cAPTain?

  • Zero configuration -- just start uploading your packages using HTTP PUT.
  • Integrates better into the Debian system over dpkg -i, especially in automatically resolving dependencies and repository pinning.
  • Supports an arbitrary number of repositories - one cAPTain instance can keep your "live" and "staging" packages from each other, as well as separating your own backports or forks.
  • Older package versions are be automatically deleted/rotated, keeping repository size manageable whilst still allowing downgrades.
  • Packages are automatically GPG signed, improving security as well as preventing annoying warnings. Key distribution is built-in - no need to store your public key elsewhere.
  • No configuring heavyweight solutions such as dak , provisioning a separate HTTP server, and stringing together arcane dpkg commands.

Quick start

  1. Start the server with:

    $ ./captaind
    
  2. In another terminal, upload your package:

    $ curl --upload-file my-package.deb http://127.0.0.1:3333/reponame
    

    Tip

    reponame can any arbitrary repository name. If it doesn't exist, cAPTain will automatically create it for you.

  3. Configure your sources.list:

    $ echo 'deb http://127.0.0.1:3333 reponame main' >> /etc/apt/sources.list
    
  4. Save your cAPTain instance's GPG key:

    $ curl http://127.0.0.1:3333 > /etc/apt/trusted.gpg.d/server.gpg
    
  5. Install your packages:

    $ apt-get update
    $ apt-get install my-package
    

Miscellaneous

Uploading multiple files

Each upload will refresh the repository from scratch. However, you can save some processing time for large repos by skipping refreshing the repo until the end by POSTing to the repo URL:

for X in *.deb; do
    curl --upload-file ${X} http://127.0.0.1:3333/reponame?refresh_repo=0
done

curl -X POST http://127.0.0.1:3333/reponame

Removing versions

Versions are automatically rotated, but to manually remove a specific version, first just locate and remove that file:

$ rm /path/to/dists/reponame/.../python-bcrypt_0.4-1_amd64.deb

Then refresh that repository:

$ curl -X POST http://127.0.0.1:3333/reponame

Uploading via a pipe

To upload using curl from a pipe, ensure you use --data-binary:

$ curl -X PUT --data-binary @- http://127.0.0.1:3333/reponame < my-package.deb

Creating a new GPG key

cAPTain ships with a dummy key for getting started quickly. To create your own key, run:

$ gpg --homedir=/path/to/gpg-home --gen-key

Choose all the defaults, making sure not to specify a passphrase.

Links

Homepage/documentation:
https://apt-captain.readthedocs.org/
View/download code
https://github.com/thread/captain
File a bug
https://github.com/thread/captain/issues

captain's People

Contributors

lamby avatar rkday avatar szelcsanyi avatar tavva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

captain's Issues

Automatic rotation

"Older package versions are be automatically deleted/rotated, keeping repository size manageable whilst still allowing downgrades."

I can not find it, how does this work?

Installation instructions

Could you please provide installation instructions? What python version do I need, and how should I get the required packages like daemon? I've tried pip install daemon and python-daemon too but it misses pidlockfile:

$ ./captaind 
Traceback (most recent call last):
  File "./captaind", line 12, in <module>
    from daemon.pidlockfile import PIDLockFile
ImportError: No module named pidlockfile

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.