Module: Webroar::Command

Defined in:
lib/installer.rb,
lib/command_runner.rb,
lib/webroar_command.rb

Defined Under Namespace

Classes: CommandRunner, Help, Installer, WebroarCommand

Constant Summary collapse

HELP =
%{
  Usage:
    webroar [-v | --version] [-h | --help] COMMAND [ARGS]

  The available webroar commands are:
    install       Install the server
    uninstall     Uninstall the server
    start         Start the server or an application
    stop          Stop the server or an application
    restart       Restart the server or an application
    add           Deploy an application on the server
    remove        Remove an application from the server
    test          Run the test suite

  For help on a particular command, use 'webroar help COMMAND'.
}
HELP_INSTALL =
%{
Usage:
  webroar install [-s] [ -L<library path>] [ -I<include path>] [-d] [ -i |
                  [ --no-import] [ -P<port>] [ -u<user>] [-p<password>] ]

Options:
  -L
      Additional library paths to be used for linking of the server

  -I
      Additional include paths to be used for linking of the server

  -s, --ssl-support
      Install the server with SSL support

  -d, --debug-build
      Compile the server as a debug build to output extremely verbose logs

The following options would make the install non-interactive by suppressing 
the questions prompted by the installer

  -P, --port
      Server port number

  -i, --import
      Import configuration, logs and admin panel data from the previous 
	installation

  --no-import
      Do not import configuration, logs and admin panel data from the previous 
	installation

  -u, --username
      Username for the administrator account of server's admin panel

  -p, --password
      Password for the administrator account of server\'s admin panel

Summary:
  Install the server
}
HELP_UNINSTALL =
%{
Usage:
  webroar uninstall

Summary:
  Uninstall the server
}
HELP_CLEAR =
%{
Usage:
  webroar clear

Summary:
  Clear the log files

Description:
  Clear the log files from '/var/log/webroar' directory.
}
HELP_START =
%{
Usage:
  webroar start [<app(s)>]

Arguments:
  <app(s)>
      Name of the application(s)

Summary:
  Start the server or an application

Description:
  'start' command without any arguments starts the server. One can start
  multiple applications together by passing multiple names.
}
HELP_STOP =
%{
Usage:
  webroar stop [<app(s)>]

Arguments:
  <app(s)>
      Name of the application(s)

Summary:
  Stop the server or an application

Description:
  'stop' command without any arguments stops the server. One can stop
  multiple applications together by passing multiple names.
}
HELP_RESTART =
%{
Usage:
  webroar restart [<app(s)>]

Arguments:
  <app(s)>
      Name of the application(s)

Summary:
  Restart the server or an application

Description:
  'restart' command without any arguments restarts the server. One can
  restart multiple applications together by passing multiple names.
}
HELP_TEST =
%{
Usage:
  webroar test [ -r<report dir>] [ -d] [ -l]

Options:
  -r, --report-dir
      Report directory

  -d, --debug-build
      Compile the server as a debug build to output extremely verbose logs

  -l, --load-test
      Also run the load tests

Summary:
  Run the test suite
}
HELP_REMOVE =
%{
  Usage:
    webroar remove [<app>]

  Arguments:
    <app>
        Name of the application

  Summary:
    Remove the specified application from the server.

  Description:
    If application name is not passed, it would look for 'config/environment.rb'
    or 'config.ru' file in the current directory. If any one of the files found,
    it passes name of the current directory as an application name.
    
}
HELP_ADD =
%{
  Usage:
    webroar add [<app>] [ -R] [ -D] [ -U] [ -T] [ -E] [ -A] [ -N] [ -X]

  Arguments:
    <app>
        Name of the application

  Options:
    The following parameters are mandatory, if the current directory would not
    be the Rails or Rack root directory

    -R, --resolver
        Resolver to identify the application. Set it to '/' if you would like
        to run the application on the root domain. e.g. http://yourserver:port/.
        (default: /<app>)

        Else set the relevant base URI with which you would like to access the
        application, e.g. '/app1' if you want the application to be accessible
        via http://yourserver:port/app1.

        If you would like to set a virtual host for your application e.g.
        www.company1.com, please specify it here. You can also host this
        application on a particular subdomain e.g. app1.company1.com. Wildcard
        '*' can also be used in defining the virtual host name, but it should
        only be used either at the start or the end. Prefix the virtual host
        name with tilde(~), if a wildcard is used in defining it.
        e.g. (i) ~*.server.com (ii) ~www.server.* (iii) ~*.server.*

    -D, --path
        Complete path for your application root directory: e.g. /home/someuser/webapps/app1
        (default: current directory)

    -U, --run-as-user
        Name of the user with whose privileges you would like to run the
        application (root can be dangerous!). This user should have all the
        necessary permissions to get your web application working properly
        (e.g. write access on required files and directories etc)
        (default: Owner of 'config/environment.rb' or 'config.ru' file)

    The following parameters are optional

    -T, --type
        Type of the application either rack or rails (default: rails)

    -E, --environment
        Environment in which you want to run the application (default: production)

    -A, --analytics
        Enable analytics to get detailed numbers about the run time performance
        of the application. This number gathering adds a very small overhead on
        your application

    -N, --min-workers
        Minimum number of worker processes that should run for this deployed
        application. Multiple worker instances help in processing a higher number 
        of concurrent user requests simultaneously. The server would always
        ensure at least these many worker processes run for this application
       (default: 4)

    -X, --max-workers
        Maximum number of worker processes that should run for this deployed
        application. Multiple worker instances help in processing a higher
        number of concurrent user requests simultaneously. The server would
        ensure that maximum only these many worker processes run for this
        application (default: 8)

  Summary:
    Deploy (and start) a new application on the server.

  Description:
    If application name is not passed, it would look for 'config/environment.rb'
    or 'config.ru' file in the current directory. If any one of the files found,
    it passes name of the current directory as an application name.
    
}