NAME

OrePAN2::S3 - Manage a DarkPAN CPAN mirror on Amazon S3

SYNOPSIS

# via the bash wrapper (recommended)
orepan2-s3 add My-Dist-1.0.tar.gz
orepan2-s3 index

# or directly via the modulino
orepan2-s3-index create --upload

# add and index a new distribution
orepan2-s3-index inject My-App-1.0.0.tar.gz

# upload artifacts listed in config file
orepan2-s3-index upload-artifacts

DESCRIPTION

This class is used to add distributions to your own DarkPAN repository housed on Amazon's S3 storage. It leverages OrePAN2 to create and maintain your own DarkPAN repository. You can read more about setting up a DarkPAN on Amazon using S3 + Cloudfront here.

You can read more about creating a secure static website using Amazon S3 here.

USAGE

orepan2-s3 options command

Perl script for maintaining a DarkPAN mirror using S3 + CloudFront.

NOTE: orepan2-s3 is the bash script that calls this Perl class that doubles as a modulino. The documentation here refers to the script (not the class).

Options

-h, --help           Display this help message
-b, --bucket-name    Overrides bucket in configuration
-c, --config-file    Name of the configuration file (default: ~/.orepan2-s3.json)
-o, --output         Name of the output file
-p, --profile        Your AWS profile if not provided in configuration
-n, --profile-name   Name of a profile inside the config file
-t, --template       Name of a template that will be used as the index.html page
-d, --distribution   Path to distribution tarball
-u, --upload         Upload files after processing (for create-index, create-docs)
-U, --url            Cloudfront URL

Commands

Notes

Configuration File

The configuration file for orepan2-s3 is a JSON file that can contain multiple profiles (or none). Each profile represents a DarkPAN S3 repository. The format should look something like this:

{
    "default" : "bedrock",
    "tbc" : {
        "author_path": "D/DU/DUMMY",
        "AWS": {
            "profile" : "prod",
            "region" : "us-east-1",
            "bucket" : "tbc-cpan-mirror",
            "prefix" : "orepan2"
        },
        "CloudFront" : {
            "DistributionId" : "E2ABCDEFGHIJK"
        }
    },
    "bedrock" : {
        "author_path": "D/DU/DUMMY",
        "index" : {
            "template" : "/path/to/template",
            "files": {
               "src" : "dest"
            }
        },
        "AWS": {
            "profile" : "prod",
            "region" : "us-east-1",
            "bucket" : "cpan.openbedrock.net",
            "prefix" : "orepan2"
        },
        "CloudFront" : {
            "DistributionId" : "E2JKLMNOPQRXYZ",
            "InvalidationPaths" : [],
            "url" : "https://cpan.openbedrock.net/orepan2"
        }
    }
}

Each profile can contain the keys described below. If you only have one profile you don't need to place it in a 'default' section.

The value for the 'default' key can be the name of a profile or a hash of the profile.

AUTHOR

Rob Lauer - rlauer@treasurersbriefcase.com

SEE ALSO

OrePAN2, Amazon::S3::Lite, DarkPAN::Utils, CLI::Simple, Template

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.