Download - Building your own CPAN with Pinto
.
.
.
PRESENTATIONHIGHLIGHTS
.⋆ LIVE ACTION ⋆........slides might be finished as we speak — or never at all
.⋆ THRILLS AND CHILLS ⋆........most of this stuff is stolen anyway — references at the end
.⋆ INTERACTIVE MEDIA ⋆..
......advanced features will be left as an exercisefor the reader
.
.
.
WHO’S PINTO?
.
.
.
WHO’S PINTO?
.
.
.
WHO’S PINTO?
...
......
“an application for creating andmanaging a custom CPAN-likerepository of Perl modules”
.
.
.
COMMON DEVPROBLEMS
• how to distribute internally in-housedeveloped modules which are not onCPAN? (e.g. confidential, too specific, …)
• how to distribute internally a(temporarily) patched third-partymodule?
.
.
.
COMMON DEVPROBLEMS
• how to keep track of which versions ofyour app’s dependencies are safe? (andhow to make them available)
• how to keep track of which versionsbreak your app?
.
.
.
COMMON DEVPROBLEMS
• how to quickly replicate theproduction/testing/developmentenvironment?
• how to efficiently ensure that everybodyis using the same versions of thedependencies?
.
.
.
SO WHAT?
With Pinto you can:• keep one or more instances of privatesCPAN-like repos
• distribute in-house modules using thestandard tools from the CPAN ecosystem
• simultaneously manage dependenciesfor multiple apps/projects
• pin specific versions of module to fixbroken dependencies
.
.
.
PINTO ADVANTAGES
• supports multiple indexes• helps manage incompatibilies betweendependencies
• has built-in version control• can pull archives from multiple remoterepositories
• supports team development
.
.
.
USAGE..
1. create a Pinto repository2. pull CPAN modules, add your own, freeze
versions, …3. point your /cpan(m|p)?/ to your Pinto
repo when installing your app’sdependencies
4. repeat steps 2 and 3 throughout project’slifecycle
.
.
.
BASIC OPS.create a repo........pinto -r ~/repo init.pull a CPAN module........pinto -r ~/repo pull Dancer.add a module of your own........pinto -r ~/repo add My-Module_01.tgz
.
.
.
BASIC OPS
.pinto -r repo list..
......
[rf-] Acme::Magic::Pony 0.03 JLAVALLEE/Acme-Magic-Pony-0.03.tar.gz[rf-] Smart::Comments 1.000005 DCONWAY/Smart-Comments-1.000005.tar.gz[rf-] Data::Dump 1.23 GAAS/Data-Dump-1.22.tar.gz[rf-] Data::Dump::Trace 0.02 GAAS/Data-Dump-1.22.tar.gz...
.
.
.
PINNING VERSIONS
• Control exactly which versions go intoyour repo
• pinto -r ~/repo pin Data::Dump.pinto -r repo list..
......
...[rl!] Data::Dump 1.22 GAAS/Data-Dump-1.22.tar.gz[rl!] Data::Dump::Trace 0.02 GAAS/Data-Dump-1.22.tar.gz...
.
.
.
PATCHES
• Build your own custom versions of CPANmodules
• Add them to your repo• pinto -r ~/repo add Data-Dump-1.22_PATCHED.tar.gz
.pinto -r repo list..
......
...[rl!] Data::Dump 1.23 ANDREFS/Data-Dump-1.22_PATCHED.tar.gz[rl!] Data::Dump::Trace 0.02 ANDREFS/Data-Dump-1.22_PATCHED.tar.gz...
.
.
.
STACKS
• Pinto seems nice, but what about:• projects with distinct dependencies?• projects with conflicting dependenciesversions?
• dependencies for distinct environments?
• Each stack is an isolated repository
.
.
.
STACKS
.pinto -r repo stacks..
......
• sapo_noticias• sapo_desporto
.
.
.
STACKS
.pinto -r repo stacks..
......
• sapo_noticias_dev• sapo_noticias_prod• sapo_desporto_dev• sapo_desporto_prod
.
.
.
LOG.pinto -r repo log..
......
revision eaddeea0-cdc3-46c1-996f-43d6bbddb03cDate: Oct 24, 2013 10:30:40 AMUser: andrefs
Pin ANDREFS/Data-Dump-1.23_PATCHED.tar.gz
revision bb3e6631-d087-4904-9cfd-475bde3b14f3Date: Oct 22, 2013 10:23:28 PMUser: andrefs
Add ANDREFS/Data-Dump-1.23_PATCHED.tar.gz
revision 1b7456ed-f3b1-43f8-8e08-830322272ca7Date: Oct 22, 2013 10:22:50 PMUser: andrefs
Pull GAAS/Data-Dump-1.22.tar.gz
.
.
.
DOC
.App::Pinto::Command::doc........pinto -r ~/repo doc --out=docs
.
.
.
DOC
.
.
.
PINTOD
• web API to a Pinto repository• manage and inspect the repository• use it with CPAN clients• basic HTTP authentication, or otherauthentication schemes
• PSGI compatible, by default runs underPlack::Runner using Starman
.
.
.
PINTO VS PAUSE
• Pinto does not promise to index exactlylike PAUSE does
• Pinto does not understand authorpermissions
• Pinto does not enforce security
.
.
.
USEFULL STUFF
• Bash::Completion::Plugins::pinto• Dist::Zilla::Plugin::Pinto::Add• Pinto::Remote• Pinto::Action::Statistics• Pinto::Action::Clean
.
.
.
MORE STUFF
• MyCPAN::App::DPAN• Stratopan•
.
.
.
WHAT’S LEFT?.........Authentication and authorization
• Who can create, modify or delete existingstacks?
• Who can pin or unpin modules in a givenstack?
• Who can make new releases to a stack?• people↔ stacks↔modules
.
.
.
WHAT’S LEFT?.........Authentication and authorization
• Who can create, modify or delete existingstacks?
• Who can pin or unpin modules in a givenstack?
• Who can make new releases to a stack?• people↔ stacks↔modules
.
.
.
REFERENCES
• Pinto::Manual::Tutorial• Pinto::Manual::QuickStart• MyCPAN::App::DPAN• Pinto+Stratopan+Love (presentation by Jeffrey Thalhammer)
• Saved by Pinto (blog post by Jeffrey Thalhammer)
• Santa Has Dependencies Too (Perl Advent Calendar 2012)
• i-might-have-missed-one.com
.
.
.
QUESTIONS?
.
.
.
THANK YOU