NAME

Conan::Deploy - A package for deploying images using the Conan deployment system.

SYNOPSIS

use Conan::Deploy;
my $d = Conan::Deploy->new(
        srcimagebase => '/tmp/base/qa',
        targetimagebase => '/tmp/base/prod',
);

$d->promote_image( 'foo-0.1' );

This will look for the directory foo-0.1 within the /tmp/base/qa base directory and copy it into the /tmp/base/prod directory via rsync. A checksum is made on the entire file contents of both directories to ensure that the integrity of the copy was maintained.

DESCRIPTION

USAGE

new

The new method accepts a series of configuration overrides. If left without the given overrides, the new method calls the __config function to parse the config files for default variable initialization.

promote_image

This method is responsible for copying the source image directory to the target space and subsequently executing an md5 checksum on the entirety of the file structure to ensure that the copy was successful.

md5

This is called by the promote_image method and recursively checks both the source and target directories to ensure that each file was copied properly. It can also be used later to ensure the file integrity of the directory structure, to detect if an image has been altered.

__config

This function is not a method of the class, but is called by the new method to fulfil the default configuration settings during instance initialization.

This function searches the /etc/conan.cfg and ~/.conanrc files, looking for regexes that satisfy the (\S+?)=(\S+) pattern, setting the key/val pairs from each line.