.

BUILDING YOUR OWN CPAN WITH

PINTO

.

andrefs@andrefs.com
@about_andrefs
PTPW 2013
.

PRESENTATION
HIGHLIGHTS
.

⋆ LIVE ACTION ⋆

.

.
slides might be finished as we speak — or never at all
.
.
⋆ THRILLS AN...
.

WHO’S PINTO?

.
.

WHO’S PINTO?

.
.

WHO’S PINTO?
.
.

.

“an application for creating and
managing a custom CPAN-like
repository of Perl modules”
.
.

COMMON DEV
PROBLEMS

.

• how to distribute internally in-house
developed modules which are not on
CPAN? (e.g. confident...
.

COMMON DEV
PROBLEMS

.

• how to keep track of which versions of
your app’s dependencies are safe? (and
how to make the...
.

COMMON DEV
PROBLEMS

.

• how to quickly replicate the
production/testing/development
environment?
• how to efficiently e...
.

SO WHAT?
With Pinto you can:
• keep one or more instances of privates
CPAN-like repos
• distribute in-house modules usi...
.

PINTO ADVANTAGES

.

• supports multiple indexes
• helps manage incompatibilies between
dependencies
• has built-in ver...
.
.

USAGE
1. create a Pinto repository
2. pull CPAN modules, add your own, freeze
versions, …
3. point your /cpan(m|p)?/ ...
.

BASIC OPS
.
create a repo
.
pinto -r ~/repo init
.
.

.

pull a CPAN module

.
pinto -r ~/repo pull Dancer
.
.

add a m...
.

BASIC OPS
.

pinto -r repo list
. Acme::Magic::Pony
[rf-]
[rf-] Smart::Comments
[rf-] Data::Dump
[rf-] Data::Dump::Trac...
.

PINNING VERSIONS

.

• Control exactly which versions go into
your repo
• pinto -r ~/repo pin Data::Dump
.

pinto -r re...
.

PATCHES
• Build your own custom versions of CPAN
modules
• Add them to your repo
• pinto -r ~/repo add Data-Dump-

.

1...
.

STACKS

.

• Pinto seems nice, but what about:
• projects with distinct dependencies?
• projects with conflicting depend...
.

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_...
.
.

LOG

pinto -r repo log
.

revision eaddeea0-cdc3-46c1-996f-43d6bbddb03c
Date: Oct 24, 2013 10:30:40 AM
User: andrefs
...
.

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 ...
.

PINTO VS PAUSE

.

• Pinto does not promise to index exactly
like PAUSE does
• Pinto does not understand author
permiss...
.

USEFULL STUFF
•
•
•
•
•

.

Bash::Completion::Plugins::pinto
Dist::Zilla::Plugin::Pinto::Add
Pinto::Remote

Pinto::Acti...
.

MORE STUFF

.

• MyCPAN::App::DPAN
• Stratopan
•
.

WHAT’S LEFT?
.
.
A
. uthentication and authorization

.
.

WHAT’S LEFT?
.
.
A
. uthentication and authorization

.

• Who can create, modify or delete existing
stacks?
• Who can ...
.

REFERENCES
•
•
•
•
•
•
•

.

Pinto::Manual::Tutorial
Pinto::Manual::QuickStart
MyCPAN::App::DPAN

Pinto+Stratopan+Love ...
.

QUESTIONS?

.
.

THANK YOU

.
Upcoming SlideShare
Loading in …5
×

Building your own CPAN with Pinto

1,212 views
1,031 views

Published on

A quick introduction to Pinto, a Perl application to build private CPAN-like Perl modules repositories.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,212
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Building your own CPAN with Pinto

  1. 1. . BUILDING YOUR OWN CPAN WITH PINTO . andrefs@andrefs.com @about_andrefs PTPW 2013
  2. 2. . PRESENTATION HIGHLIGHTS . ⋆ 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 exercise for . the reader
  3. 3. . WHO’S PINTO? .
  4. 4. . WHO’S PINTO? .
  5. 5. . WHO’S PINTO? . . . “an application for creating and managing a custom CPAN-like repository of Perl modules” .
  6. 6. . COMMON DEV PROBLEMS . • how to distribute internally in-house developed modules which are not on CPAN? (e.g. confidential, too specific, …) • how to distribute internally a (temporarily) patched third-party module?
  7. 7. . COMMON DEV PROBLEMS . • how to keep track of which versions of your app’s dependencies are safe? (and how to make them available) • how to keep track of which versions break your app?
  8. 8. . COMMON DEV PROBLEMS . • how to quickly replicate the production/testing/development environment? • how to efficiently ensure that everybody is using the same versions of the dependencies?
  9. 9. . SO WHAT? With Pinto you can: • keep one or more instances of privates CPAN-like repos • distribute in-house modules using the standard tools from the CPAN ecosystem • simultaneously manage dependencies for multiple apps/projects • pin specific versions of module to fix broken dependencies .
  10. 10. . PINTO ADVANTAGES . • supports multiple indexes • helps manage incompatibilies between dependencies • has built-in version control • can pull archives from multiple remote repositories • supports team development
  11. 11. . . USAGE 1. create a Pinto repository 2. pull CPAN modules, add your own, freeze versions, … 3. point your /cpan(m|p)?/ to your Pinto repo when installing your app’s dependencies 4. repeat steps 2 and 3 throughout project’s lifecycle .
  12. 12. . 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 .
  13. 13. . BASIC OPS . pinto -r repo list . Acme::Magic::Pony [rf-] [rf-] Smart::Comments [rf-] Data::Dump [rf-] Data::Dump::Trace ... . 0.03 1.000005 1.23 0.02 . JLAVALLEE/Acme-Magic-Pony-0.03.tar.gz DCONWAY/Smart-Comments-1.000005.tar.gz GAAS/Data-Dump-1.22.tar.gz GAAS/Data-Dump-1.22.tar.gz
  14. 14. . PINNING VERSIONS . • Control exactly which versions go into your repo • pinto -r ~/repo pin Data::Dump . pinto -r repo list . ... [rl!] Data::Dump [rl!] Data::Dump::Trace ... . 1.22 GAAS/Data-Dump-1.22.tar.gz 0.02 GAAS/Data-Dump-1.22.tar.gz
  15. 15. . PATCHES • Build your own custom versions of CPAN modules • Add them to your repo • pinto -r ~/repo add Data-Dump- . 1.22_PATCHED.tar.gz . pinto -r repo list . ... [rl!] Data::Dump [rl!] Data::Dump::Trace ... . 1.23 ANDREFS/Data-Dump-1.22_PATCHED.tar.gz 0.02 ANDREFS/Data-Dump-1.22_PATCHED.tar.gz
  16. 16. . STACKS . • Pinto seems nice, but what about: • projects with distinct dependencies? • projects with conflicting dependencies versions? • dependencies for distinct environments? • Each stack is an isolated repository
  17. 17. . STACKS . . pinto -r repo stacks . . • sapo_noticias • sapo_desporto
  18. 18. . STACKS . . pinto -r repo stacks . . • • • • sapo_noticias_dev sapo_noticias_prod sapo_desporto_dev sapo_desporto_prod
  19. 19. . . LOG pinto -r repo log . revision eaddeea0-cdc3-46c1-996f-43d6bbddb03c Date: Oct 24, 2013 10:30:40 AM User: andrefs . Pin ANDREFS/Data-Dump-1.23_PATCHED.tar.gz revision bb3e6631-d087-4904-9cfd-475bde3b14f3 Date: Oct 22, 2013 10:23:28 PM User: andrefs Add ANDREFS/Data-Dump-1.23_PATCHED.tar.gz revision 1b7456ed-f3b1-43f8-8e08-830322272ca7 Date: Oct 22, 2013 10:22:50 PM User: andrefs . Pull GAAS/Data-Dump-1.22.tar.gz
  20. 20. . DOC . . App::Pinto::Command::doc . pinto -r ~/repo doc --out=docs .
  21. 21. . DOC .
  22. 22. . PINTOD • • • • . web API to a Pinto repository manage and inspect the repository use it with CPAN clients basic HTTP authentication, or other authentication schemes • PSGI compatible, by default runs under Plack::Runner using Starman
  23. 23. . PINTO VS PAUSE . • Pinto does not promise to index exactly like PAUSE does • Pinto does not understand author permissions • Pinto does not enforce security
  24. 24. . USEFULL STUFF • • • • • . Bash::Completion::Plugins::pinto Dist::Zilla::Plugin::Pinto::Add Pinto::Remote Pinto::Action::Statistics Pinto::Action::Clean
  25. 25. . MORE STUFF . • MyCPAN::App::DPAN • Stratopan •
  26. 26. . WHAT’S LEFT? . . A . uthentication and authorization .
  27. 27. . WHAT’S LEFT? . . A . uthentication and authorization . • Who can create, modify or delete existing stacks? • Who can pin or unpin modules in a given stack? • Who can make new releases to a stack? • people ↔ stacks ↔ modules
  28. 28. . 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
  29. 29. . QUESTIONS? .
  30. 30. . THANK YOU .

×