<html><head><title>Footprintless::Deployment</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
BODY {
background: white;
color: black;
font-family: arial,sans-serif;
margin: 0;
padding: 1ex;
}
A:link, A:visited {
background: transparent;
color: #006699;
}
A[href="#POD_ERRORS"] {
background: transparent;
color: #FF0000;
}
DIV {
border-width: 0;
}
DT {
margin-top: 1em;
margin-left: 1em;
}
.pod { margin-right: 20ex; }
.pod PRE {
background: #eeeeee;
border: 1px solid #888888;
color: black;
padding: 1em;
white-space: pre;
}
.pod H1 {
background: transparent;
color: #006699;
font-size: large;
}
.pod H1 A { text-decoration: none; }
.pod H2 A { text-decoration: none; }
.pod H3 A { text-decoration: none; }
.pod H4 A { text-decoration: none; }
.pod H2 {
background: transparent;
color: #006699;
font-size: medium;
}
.pod H3 {
background: transparent;
color: #006699;
font-size: medium;
font-style: italic;
}
.pod H4 {
background: transparent;
color: #006699;
font-size: medium;
font-weight: normal;
}
.pod IMG {
vertical-align: top;
}
.pod .toc A {
text-decoration: none;
}
.pod .toc LI {
line-height: 1.2em;
list-style-type: none;
}
/*]]>*/-->
</style>
</head>
<body class='pod'>
<!--
generated by Pod::Simple::HTML v3.32,
using Pod::Simple::PullParser v3.32,
under Perl v5.025000 at Wed Aug 22 21:48:29 2018 GMT.
If you want to change this HTML document, you probably shouldn't do that
by changing it directly. Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
-->
<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#VERSION'>VERSION</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#ENTITIES'>ENTITIES</a>
<li class='indexItem indexItem1'><a href='#CONSTRUCTORS'>CONSTRUCTORS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#new(%24entity%2C_%24coordinate)'>new($entity, $coordinate)</a>
</ul>
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#clean(%25options)'>clean(%options)</a>
<li class='indexItem indexItem2'><a href='#deploy(%25options)'>deploy(%options)</a>
</ul>
<li class='indexItem indexItem1'><a href='#AUTHOR'>AUTHOR</a>
<li class='indexItem indexItem1'><a href='#COPYRIGHT_AND_LICENSE'>COPYRIGHT AND LICENSE</a>
<li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Footprintless::Deployment - A deployment manager</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="VERSION"
>VERSION</a></h1>
<p>version 1.29</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre> # Standard way of getting a deployment
use Footprintless;
my $deployment = Footprintless->new()->deployment('deployment');
# Standard deploy procedure
$deployment->clean();
$deployment->deploy();
# Deploy to temp instead of the entity configured location
my $rebase = {
from => '/opt/tomcat',
to => '/tmp/tomcat'
};
$deployment->clean(rebase => $rebase);
$deployment->deploy(rebase => $rebase);
# Only deploy selected resources
$deployment->deploy(names => ['bar']);</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>Manages deployments. A deployment is a set of files and directories that are all associated with a single component. For example, if you are using tomcat, a deployment might refer to all of the webapps deployed to the container, and the folders and files that are <i>NOT</i> part of the tomcat container itself.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="ENTITIES"
>ENTITIES</a></h1>
<p>A simple deployment:</p>
<pre> deployment => {
clean => ['/opt/app/'],
resources => {
foo => 'http://download.com/foo.exe',
bar => 'http://download.com/bar.exe'
},
to_dir => '/opt/app'
}</pre>
<p>A more complex situation, perhaps a tomcat instance:</p>
<pre> deployment => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
clean => [
'/opt/tomcat/conf/Catalina/localhost/',
'/opt/tomcat/temp/',
'/opt/tomcat/webapps/',
'/opt/tomcat/work/'
],
resources => {
bar => '/home/me/.m2/repository/com/pastdev/bar/1.2/bar-1.2.war',
baz => {
coordinate => 'com.pastdev:baz:war:1.0',
'as' => 'foo.war',
type => 'maven'
},
foo => {
url => 'http://pastdev.com/resources/foo.war',
extract_to => 'ROOT'
}
},
to_dir => '/opt/tomcat/webapps'
}</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTRUCTORS"
>CONSTRUCTORS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="new($entity,_$coordinate)"
>new($entity, $coordinate)</a></h2>
<p>Constructs a new deployment configured by <code>$entities</code> at <code>$coordinate</code>.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="clean(%options)"
>clean(%options)</a></h2>
<p>Cleans the deployment. Each path in the <code>configuration.clean</code> entity, will be removed from the destination. If the path ends in a <code>/</code>, then after being removed, the directory will be recreated. The supported options are:</p>
<dl>
<dt><a name="rebase"
>rebase</a></dt>
<dd>
<p>A hash containing <code>from</code> and <code>to</code> where the paths for each item in the clean entity will have the <code>from</code> portion of their path substituted by <code>to</code>. For example, if the path is <code>/foo/bar</code> and rebase is <code>{from =</code> '/foo', to => '/baz'}>, then the resulting path would be <code>/baz/bar</code>.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="deploy(%options)"
>deploy(%options)</a></h2>
<p>Deploys all the resources listed in the <code>resource</code> entity to the location specified in the <code>configuration.to_dir</code> entity. The supported options are:</p>
<dl>
<dt><a name="extra"
>extra</a></dt>
<dd>
<p>A subroutine that is called during deployment allowing you to add to what is deployed before it is pushed to its destination. This subroutine will be called with a single argument containing the (possibly temporary) directory that you can write additional files to.</p>
<dt><a name="names"
>names</a></dt>
<dd>
<p>A list of names of resources that should be deployed. If this option is provided, any names not in this list will be ignored.</p>
<dt><a name="rebase"
>rebase</a></dt>
<dd>
<p>A hash containing <code>from</code> and <code>to</code> where the paths for each item in the clean entity will have the <code>from</code> portion of their path substituted by <code>to</code>. For example, if the path is <code>/foo/bar</code> and rebase is <code>{from =</code> '/foo', to => '/baz'}>, then the resulting path would be <code>/baz/bar</code>.</p>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>
<p>Lucas Theisen <lucastheisen@pastdev.com></p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_AND_LICENSE"
>COPYRIGHT AND LICENSE</a></h1>
<p>This software is copyright (c) 2016 by Lucas Theisen.</p>
<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>
<p>Please see those modules/websites for more information related to this module.</p>
<ul>
<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>
<li><a href="http://search.cpan.org/perldoc?Config%3A%3AEntities" class="podlinkpod"
>Config::Entities</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3AMixins" class="podlinkpod"
>Footprintless::Mixins</a></li>
</ul>
<!-- end doc -->
</body></html>