Task::Viral - Conquer hosts with a camel
This bundle includes all the stuff you need to build a chain of hosts with Perl installed and CPAN modules you need updated, including your private packages.
Suppose you have the following topology.
Internet <-- host-1 <-- host-2 <-- ... <-- host-N
where host-i are, for instance, under .example.org domain.
host-i
.example.org
Here I call an host chain an array of hosts, where host-0 is some active CPAN mirror on Internet.
host-0
The host-(i+1) can connect to host-i and use it as CPAN mirror.
host-(i+1)
For example, an host chain could be
www.cpan.org <-- development.example.org <-- test.example.org <-- production.example.org
where test and production hosts perhaps could not connect to Internet.
Start from development, launch
development
cpan Task::Viral
Create folders for mcpani
mkdir -p $HOME/.mcpani/local mkdir -p $HOME/.mcpani/private
and write $HOME/.mcpani/config configuration
$HOME/.mcpani/config
cat <<EOF > $HOME/.mcpani/config local: $HOME/.mcpani/local remote: http://www.cpan.org repository: $HOME/.mcpani/private passive: yes dirmode: 0755 EOF
Create your mirror
mcpani --mirror -v
Configure cpan to install from local mirror
cpan> o conf urllist file://home/user/.mcpani/local cpan> o conf commit
Start from development.
Launch a cpanmirrorhttpd to serve installed packages to test, for instance on port 2000
test
2000
cpanmirrorhttpd --root $HOME/.cpan/sources --port 2000
Login into test and configure cpan to install packages from development.
cpan> o conf urllist http://development.example.org:2000 cpan> o conf commit
Now you can launch
and iterate steps on host-(i+1) until last element in the host chain, in this case production.
host chain
production
Suppose you create some distro on development host, for instance My::Package. You may want to install it on test host as usual
My::Package
cpan My::Package
To add your private distros to your host chain,
Create your distro tarball, for instance My-Package-0.01.tar.gz, and inject it in your local CPAN
My-Package-0.01.tar.gz
mcpani --add --module My::Package --authorid AUTHOR --modversion 0.01 --file ./My-Package-0.01.tar.gz
Inject your module
mcpani --inject -v
CPAN
CPAN::Mirror::Server::HTTP
CPAN::Mini::Inject
Private CPAN Distributions article by https://metacpan.org/author/BDFOY|BDFOY.
This software is copyright © III Millenium by G. Casati.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Task::Viral, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Task::Viral
CPAN shell
perl -MCPAN -e shell install Task::Viral
For more information on module installation, please visit the detailed CPAN module installation guide.