GithubHelp home page GithubHelp logo

docker-opan_uploader's Introduction

Opan uploader

SYNOPSIS

run opan uploader

#manual
docker run -v /var/lib/opan:/opan -p8081:8081 avastsoftware/opan_uploader
#or as a service (only systemd linux)
cp opan_uploader.service /etc/systemd/system/
systemctl start opan_uploader.service

send a distribution to opan uploader

curl -XPOST --data-binary @Perl-Module-1.0.0.tar.gz upload.opan.server:8081/add?dist=Perl-Module-1.0.0.tar.gz
#or
wget --post-file Perl-Module-1.0.0.tar.gz upload.opan.server:8081/add?&dist=Perl-Module-1.0.0.tar.gz
#or
curl -F "[email protected]" upload.opan.server:8081/add

#for using in CI job - exit if service return no_success http code, but eat error message from server 
curl -sSf -F "[email protected]" upload.opan.server:8081/add
#or (this is maybe ogly, but print error message)
if [[$(curl -s -o /dev/stderr -w "%{http_code}" -F [email protected] 'upload.opan.server:8081/add') != 200]]; then exit 1; fi

use carton/cpanm with opan API

cpanm --mirror http://localhost:8081/combined/ --mirror-only --installdeps .
PERL_CARTON_MIRROR=http://localhost:8081/combined carton install

DESCRIPTION

App::opan is an awesome tool for managing internal repository of Perl distributions. avastsoftware/opan is docker container with opan API on entrypoint (and with opan tool inside). However, opan API 'only' has the same interface as CPAN, i.e. it only enables distributions to be fetched from it. This project avastsoftware/opan_uploader complements it. It enables to upload Perl distributions to the opan repository (e.g. a company-wide internal repository).

opan uploader do opan add and opan pull

MIGRATE FROM PINTO

this example migrate all pinto packages of user USER to opan

docker run -v /var/lib/pinto:/var/lib/pinto -v /var/lib/opan:/opan avastsoftware/opan find /var/lib/pinto/stacks/master/authors/id/U/US/USER -type f -name *.tar.gz -exec opan add {} \;

CAVEATS AND LIMITATIONS

There is no authorization / authentication implemented: everyone who can access the server is able to push a distribution into the repository. A possible solution is to put Basic access authentication on proxy http server before opan uploader.

SEE ALSO

opan uploader is a replacement for manual call of opan command on a opan server with avastsoftware/opan service.

scp Perl-Module-1.0.0.tar.gz opan.server:/tmp
ssh opan.server docker run -v/var/lib/opan:/opan avastsoftware/opan add /tmp/Perl-Module-1.0.0.tar.gz
ssh opan.server docker run -v/var/lib/opan:/opan avastsoftware/opan pull

docker-opan_uploader's People

Contributors

jasei avatar

Watchers

 avatar

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.