Footprintless

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME

    Footprintless - A utility for managing systems with minimal installs

VERSION

    version 1.29

SYNOPSIS

        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();

DESCRIPTION

    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, Config::Entities are used to define the whole system
    <https://en.wikipedia.org/wiki/System>. 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 command options. Specifically:

        hostname
        ssh
        sudo_username
        username

    Each module will have its own entities structure, see them for more
    details.

ENTITIES

    An example system my consist of multiple environments, each defined in
    their own file:

        ./fooptintless
                      /entities
                               /foo
                                   /dev.pm
                                   /qa.pm
                                   /prod.pm

    Each one of them would likely be rather similar, perhaps a variation
    of:

        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'
            }
        }

    Then when you decide to perform an action, the environment is just part
    of the coordinate:

        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

    If using the framework instead, the story is the same:

README  view on Meta::CPAN

    Returns the command_options_factory used by this instance.

 command_runner()

    Returns the command_runner used by this instance.

 deployment($coordinate, %options)

    Returns a new instance of Footprintless::Deployment preconfigured to
    operate on the deployment at $coordinate. Supported options are

    command_options_factory

      A command_options_factory to use instead of that which is supplied by
      this footprintless instance.

    command_runner

      A command_runner to use instead of that which is supplied by this
      footprintless instance.

    localhost

      A localhost to use instead of that which is supplied by this
      footprintless instance.

    resource_manager

      A resource_manager to use instead of that which is supplied by this
      footprintless instance.

 entities()

    Returns the Config::Entities that were resolved by this footprintless
    instance.

 localhost()

    Returns the localhost resolver used by this instance.

 log($coordinate, %options)

    Returns a new instance of Footprintless::Log preconfigured to operate
    on the log at $coordinate. Supported options are

    command_options_factory

      A command_options_factory to use instead of that which is supplied by
      this footprintless instance.

    command_runner

      A command_runner to use instead of that which is supplied by this
      footprintless instance.

    localhost

      A localhost to use instead of that which is supplied by this
      footprintless instance.

 overlay($coordinate, %options)

    Returns a new instance of Footprintless::Overlay preconfigured to
    operate on the overlay at $coordinate. Supported options are

    command_options_factory

      A command_options_factory to use instead of that which is supplied by
      this footprintless instance.

    command_runner

      A command_runner to use instead of that which is supplied by this
      footprintless instance.

    localhost

      A localhost to use instead of that which is supplied by this
      footprintless instance.

    resource_manager

      A resource_manager to use instead of that which is supplied by this
      footprintless instance.

 plugins()

    Returns the registered plugins for this instance.

 resource_manager()

    Returns the resource_manager used by this instance.

 service($coordinate, %options)

    Returns a new instance of Footprintless::Service preconfigured to
    operate on the service at $coordinate. Supported options are

    command_options_factory

      A command_options_factory to use instead of that which is supplied by
      this footprintless instance.

    command_runner

      A command_runner to use instead of that which is supplied by this
      footprintless instance.

    localhost

      A localhost to use instead of that which is supplied by this
      footprintless instance.

 tunnel($coordinate, %options)

    Returns a new instance of Footprintless::Tunnel preconfigured for
    $coordinate.

AUTHOR

    Lucas Theisen <lucastheisen@pastdev.com>

COPYRIGHT AND LICENSE



( run in 0.506 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )