The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Task::Viral - Conquer hosts with a camel

DESCRIPTION

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.

WHAT IS AN HOST CHAIN?

Suppose you have the following topology.

    Internet <-- host-1 <-- host-2 <-- ... <-- host-N

where host-i are, for instance, under .example.org domain.

Here I call an host chain an array of hosts, where host-0 is some active CPAN mirror on Internet.

The host-(i+1) can connect to host-i and use it as CPAN mirror.

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.

SETUP FIRST HOST CHAIN

  1. Start from development, launch

        cpan Task::Viral
  2. Create folders for mcpani

        mkdir -p $HOME/.mcpani/local
        mkdir -p $HOME/.mcpani/private

    and write $HOME/.mcpani/config configuration

        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
  3. Configure cpan to install from local mirror

        cpan> o conf urllist file://home/user/.mcpani/local
        cpan> o conf commit

SETUP THE WHOLE HOST CHAIN

Start from development.

  1. Launch a cpanmirrorhttpd to serve installed packages to test, for instance on port 2000

        cpanmirrorhttpd --root $HOME/.cpan/sources  --port 2000
  2. 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

        cpan Task::Viral

and iterate steps on host-(i+1) until last element in the host chain, in this case production.

ADD YOUR PRIVATE DISTROS

Suppose you create some distro on development host, for instance My::Package. You may want to install it on test host as usual

    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

    mcpani  --add --module My::Package --authorid AUTHOR --modversion 0.01 --file ./My-Package-0.01.tar.gz

Inject your module

    mcpani --inject -v

STUFF INCLUDED

SEE ALSO

Private CPAN Distributions article by https://metacpan.org/author/BDFOY|BDFOY.

COPYRIGHT AND LICENSE

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.