Chad Granum
and 1 contributors

NAME

RTDevSys - A development, deployment, and management system for RT installations.

EARLY VERSION WARNING

This is a very early version of RTDevSys. It is ready for use, and in fact is being used. However there may be some API changes in the future. As well there may be some missing, incomplete, or untested features. At the moment the database commands only support postgres not mysql.

DESCRIPTION

This module is the heart of RTDevSys. Through this class all other modules access information about the RT Project being developed or deployed. This module is not an object, it exports a couple functions, and provides a few class methods. In the future this class may be refactored into a singleton.

This class is your one stop shop for all important variables and paths. All key variables are defined in one of the ways. First if the matching environment variable is set than that is used, If no environment variable is defined then it will try to get the variable fromt he config file (RTDS_Config.pm). The third way is for the variable to be set by another library. This is most commonly done in commands via flags. (see RTDevSys::Cmd::Roles::Standard)

SYNOPSIS

Command line interface
    $ rtdevsys deploy --build stable
    $ rtdevsys help deploy
    $ rtdevsys help
    $ rtdevsys plugins --install RTx::MyExt
    $ rtdevsys database --dump mydump.psqlc

See rtdevsys help <command> for more details.

CLASS METHODS

config()

Returns the RTDevSys::Config object laoded from RTDS_Config.pm

deploy_tasks()

Returns the hash of deployment tasks.

    {
        taskA => { _sub => sub { ... }},
        taskB => { _sub => sub { ... }},
    }
rootdir()

Returns the project root directory.

ENVIRONMENT VARIABLES

All environment variables are class methods. They can be used like this:

    RTDevSys->RTHOME(); #retrive the RTHOME variable
    RTDevSys->RTHOME( '/opt/rt3' ); #Set the RTHOME variable.

The first time a variable is read, if it has not been set already, it will obtain a default value either through the envuironment variable, or the config file.

RTHOME

The RT installation destination. This matches RT's RTHOME variable.

BUILD

Which type of build to deploy: devel, demo, or stable. See RTDevSys.conf and RTDevSys::Build for details about builds.

VERSIONS_FILE

Path to a yaml file containing information about which module and plugin versions will be installed in which build. Default is ./versions.yaml

RT_CONF_PATH

Path where RT_SiteConfig.pm can be found, or should be installed upon deployment.

OTHER ENVIRONMENT VARIABLES

RT_DB, RT_DB_DRIVER, RT_DB_HOST, RT_DB_PORT, RT_DB_USER, RT_DB_PASSWORD, RT_USER, RT_GROUP, RT_WEB_USER, RT_WEB_GROUP, WEB_USER, WEB_GROUP

For the most part these should be self-explanitory. They also mostly line up with RT's recognised variables.

EXPORTED OR EXPORTABLE FUNCTIONS

stdout()

Returns a scalar filehandle for STDOUT. This is captured at module load time. This is useful if you have to init RT in a module usinf RTDevSys and want to write to STDOUT, which RT steals.

add_deploy_task()

Add tasks to the list of tasks that get run on deployment. Usually you call this in a custom RTDevSys::Cmd::Command:: class.

    add_deploy_task MyTask => sub { ... };

    # This form is supported, but currently the parameters are not used for
    # anything.
    add_deploy_task MyTask2 => (
        sub { ... },
        ParamA => 'value',
        ParamB => 'value2',
    );
local_env()

*Not exported by default*

returns a hash containing %ENV with all the RTDevSys environment variables added in. This is useful if you want to run a command with the environment variables present:

    {
        local %ENV = %{ local_env() };
        system( ... )
    }

AUTHORS

Chad Granum <chad@opensourcery.com>

COPYRIGHT

Copyright 2009 OpenSourcery, LLC.

This file is part of RTDevSys

RTDevSys is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

RTDevSys is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with RTDevSys. If not, see <http://www.gnu.org/licenses/>.