Footprintless
view release on metacpan or search on metacpan
docs/Footprintless.html view on Meta::CPAN
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:26 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(%5C%25entity%2C_%25options)'>new(\%entity, %options)</a>
</ul>
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#agent(%25options)'>agent(%options)</a>
<li class='indexItem indexItem2'><a href='#command_options_factory()'>command_options_factory()</a>
<li class='indexItem indexItem2'><a href='#command_runner()'>command_runner()</a>
<li class='indexItem indexItem2'><a href='#deployment(%24coordinate%2C_%25options)'>deployment($coordinate, %options)</a>
<li class='indexItem indexItem2'><a href='#entities()'>entities()</a>
<li class='indexItem indexItem2'><a href='#localhost()'>localhost()</a>
<li class='indexItem indexItem2'><a href='#log(%24coordinate%2C_%25options)'>log($coordinate, %options)</a>
<li class='indexItem indexItem2'><a href='#overlay(%24coordinate%2C_%25options)'>overlay($coordinate, %options)</a>
<li class='indexItem indexItem2'><a href='#plugins()'>plugins()</a>
<li class='indexItem indexItem2'><a href='#resource_manager()'>resource_manager()</a>
<li class='indexItem indexItem2'><a href='#service(%24coordinate%2C_%25options)'>service($coordinate, %options)</a>
<li class='indexItem indexItem2'><a href='#tunnel(%24coordinate%2C_%25options)'>tunnel($coordinate, %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 - A utility for managing systems with minimal installs</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> use Footprintless;
my $footprintless = Footprintless->new();
# Deploy initialize, start, and follow the log of the foo
$footprintless->overlay('dev.foo.overlay')->initialize();
$footprintless->service('dev.foo.service')->start();
$footprintless->log('dev.foo.logs.app')->follow();</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>Footprintless is an automation framework with an application frontend for managing diverse software stacks in a consistent fashion. It provides a minimally invasive approach to configuration management. At its core, <a href="http://search.cpan.org...
>Config::Entities</a> are used to define the whole <a href="https://en.wikipedia.org/wiki/System" class="podlinkurl"
>system</a>. Once defined, the entities are used by all of the Footprintless modules to decouple the environment from the action. The environment is defined by the entities used to create <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACom...
>command options</a>. Specifically:</p>
<pre> hostname
ssh
sudo_username
username</pre>
<p>Each module will have its own entities structure, see them for more details.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="ENTITIES"
>ENTITIES</a></h1>
<p>An example system my consist of multiple environments, each defined in their own file:</p>
<pre> ./fooptintless
/entities
/foo
/dev.pm
/qa.pm
/prod.pm</pre>
<p>Each one of them would likely be rather similar, perhaps a variation of:</p>
<pre> return {
app => {
deployment => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
clean => [
'/opt/foo/tomcat/conf/Catalina/localhost/',
'/opt/foo/tomcat/temp/',
'/opt/foo/tomcat/webapps/',
'/opt/foo/tomcat/work/'
],
resources => {
bar => 'com.pastdev:bar:war:1.0',
baz => 'com.pastdev:baz:war:1.0'
},
to_dir => '/opt/foo/tomcat/webapps'
},
hostname => 'app.pastdev.com',
logs => {
catalina => '/opt/foo/tomcat/logs/catalina.out'
},
overlay => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
base_dir => '/home/me/git/foo/base',
clean => [
'/opt/foo/tomcat/'
],
deployment_coordinate => 'foo.dev.app.deployment',
key => 'T',
os => 'linux',
resolver_coordinate => 'foo.dev',
template_dir => '/home/me/git/foo/template',
to_dir => '/opt/foo/tomcat'
},
sudo_username => 'tomcat',
tomcat => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
catalina_base => '/opt/foo/tomcat',
http => {
port => 20080
},
service => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
action => {
'kill' => { command_args => 'stop -force' },
'status' => { use_pid => 1 }
},
command => '/opt/foo/tomcat/bin/catalina.sh',
pid_file => '/opt/foo/tomcat/bin/.catalina.pid',
},
shutdown => {
port => 20005,
password => $properties->{'foo.dev.app.tomcat.shutdown.password'},
},
trust_store => {
'Config::Entities::inherit' => ['hostname', 'sudo_username'],
file => '/opt/foo/tomcat/certs/truststore.jks',
include_java_home_cacerts => 1,
password => $properties->{'foo.dev.app.tomcat.trust_store.password'},
}
}
}
web => {
hostname => 'web.pastdev.com',
logs => {
error => '/var/log/httpd/error_log',
access => '/var/log/httpd/access_log'
}
sudo_username => 'apache'
}
}</pre>
<p>Then when you decide to perform an action, the environment is just part of the coordinate:</p>
<pre> fpl log foo.dev.app.tomcat.logs.catalina follow
fpl service foo.qa.app.tomcat.service status
fpl deployment foo.prod.app.deployment deploy --clean</pre>
<p>If using the framework instead, the story is the same:</p>
docs/Footprintless.html view on Meta::CPAN
<dd>
<p>A <code>command_runner</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="localhost"
>localhost</a></dt>
<dd>
<p>A <code>localhost</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="resource_manager"
>resource_manager</a></dt>
<dd>
<p>A <code>resource_manager</code> to use instead of that which is supplied by this footprintless instance.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="entities()"
>entities()</a></h2>
<p>Returns the <a href="http://search.cpan.org/perldoc?Config%3A%3AEntities" class="podlinkpod"
>Config::Entities</a> that were resolved by this footprintless instance.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="localhost()"
>localhost()</a></h2>
<p>Returns the <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ALocalhost" class="podlinkpod"
>localhost</a> resolver used by this instance.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="log($coordinate,_%options)"
>log($coordinate, %options)</a></h2>
<p>Returns a new instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ALog" class="podlinkpod"
>Footprintless::Log</a> preconfigured to operate on the log at <code>$coordinate</code>. Supported options are</p>
<dl>
<dt><a name="command_options_factory"
>command_options_factory</a></dt>
<dd>
<p>A <code>command_options_factory</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="command_runner"
>command_runner</a></dt>
<dd>
<p>A <code>command_runner</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="localhost"
>localhost</a></dt>
<dd>
<p>A <code>localhost</code> to use instead of that which is supplied by this footprintless instance.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="overlay($coordinate,_%options)"
>overlay($coordinate, %options)</a></h2>
<p>Returns a new instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3AOverlay" class="podlinkpod"
>Footprintless::Overlay</a> preconfigured to operate on the overlay at <code>$coordinate</code>. Supported options are</p>
<dl>
<dt><a name="command_options_factory"
>command_options_factory</a></dt>
<dd>
<p>A <code>command_options_factory</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="command_runner"
>command_runner</a></dt>
<dd>
<p>A <code>command_runner</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="localhost"
>localhost</a></dt>
<dd>
<p>A <code>localhost</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="resource_manager"
>resource_manager</a></dt>
<dd>
<p>A <code>resource_manager</code> to use instead of that which is supplied by this footprintless instance.</p>
</dd>
</dl>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="plugins()"
>plugins()</a></h2>
<p>Returns the registered plugins for this instance.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="resource_manager()"
>resource_manager()</a></h2>
<p>Returns the <a href="http://search.cpan.org/perldoc?Footprintless%3A%3AResourceManager" class="podlinkpod"
>resource_manager</a> used by this instance.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="service($coordinate,_%options)"
>service($coordinate, %options)</a></h2>
<p>Returns a new instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3AService" class="podlinkpod"
>Footprintless::Service</a> preconfigured to operate on the service at <code>$coordinate</code>. Supported options are</p>
<dl>
<dt><a name="command_options_factory"
>command_options_factory</a></dt>
<dd>
<p>A <code>command_options_factory</code> to use instead of that which is supplied by this footprintless instance.</p>
<dt><a name="command_runner"
>command_runner</a></dt>
<dd>
<p>A <code>command_runner</code> to use instead of that which is supplied by this footprintless instance.</p>
( run in 0.977 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )