Appie is an application maintenance tool
Shell Perl
Switch branches/tags
Nothing to show
Latest commit 014397d Mar 12, 2014 @ddokter ddokter fixes for 1.8.1
Failed to load latest commit information.
modules fixes for 1.8.1 Mar 12, 2014
CHANGES Made appie into deb package Feb 17, 2014
Makefile fixes for 1.8.1 Mar 12, 2014
README Made appie into deb package Feb 17, 2014
TODO Made appie into deb package Feb 17, 2014
VERSION fixes for 1.8.1 Mar 12, 2014
appie.conf Made appie into deb package Feb 17, 2014


*                                 APPIE!

0. Introduction
1. General application setup
2. Appie Modules
3. Usage

0. Introduction

Appie is the application maintenance tool for GW20E. Appie is a
framework for modules that can perform specific tasks, like setting up
and application environment, setting up a Plone instance, etc. Some
module/command pairs require root permissions, like configuring
Apache, but most tasks can be performed by common users, as long as
they are member of the appadmin group.

1. General application setup

Appie is based upon the notion of an application specific directory
structure, where an application and its (specific) software resides
in its own directory, and holds its own environment variables. The
application has its own user.

The structure for these application users is based upon idea that an
application may need a maximum of three different environments,
namely TST for testing, ACC for end user testing and PRD for
production. An environment may be distributed over two machines, when
clustered. Applications have a specific type, like for instance
'zope', 'plone', etc. The type can be used to provide grouped shares
for a type of application, for example shared sources.

The application environment will be structured as follows:


Per application/environment pair, a user is created with the id

Let's take an example. We have application appX.  We need an environment for
TST and PRD. We'll end up having:


	appX: appX-tst, appX-prd


All people in the group appadmin can switch to all environment (tst,
acc, ...) specific users.  This can be achieved with the 'appie
become' command, and the sudoers config file.

For all users that need to be able to manage an application, or just
one environment for an appliction add the visudo command):

<user id>  ALL = NOPASSWD: /bin/su <app id>-<env id>

You may use * instead of env id, to enable su to any environment.
All users need to be able to login on a machine as themselves.

Administrative users for Appie should be in the group appadmin, and
this group should have write permissions on the APP_BASE.

2. Appie Modules

A module for Appie is very simple: you'll need to add a directory to
the modules dir, provide a number of shell scripts in that directory,
with the default script named 'main'. Also, please provide the
necessary reading material.

A description of the module that can be displayed by appie, should be
available in a file called DESCR.

Any script should at least give some info when called with help as
argument, and bail out.

Modules preferrably should be able to do all necessary functionality
based on command line parameters, and may provide interactive use on
top of that.

To use another module from your own module, use $APPIE <module>. APPIE
 holds the global command for the appie interpreter.

For module specific info, check the README within that module
directory, if there is one...

2.1 Application ports

Some applications need one or more ports. Appie can assign one or more
ports to an application, and will set the following environment
setting, based on a port base, defined in appie.conf.


The first will contain the base port for this application, the second
will show the last of allocated ports.

3. Configuration

Appie configuration files are:

appie.conf	Main config file. Copy appie.conf.example to appie.conf
		and adjust settings to your personal needs.
hosts		List of appie enabled hosts

Apart from that, every module may hold extra configuration in a file
called <module id>.conf, within its own directory. All configuration
will be available as global environment variables.

4. Usage

Use Appie as follows:

	appie help | (<module[:command]> [module options])

For example to start a new application environment, type:

	appie app

or (equivalent):

	appie app:main

3. Exit codes

An exit code of 0 is considered to be good, anything else isn't...
Use codes like so:

0 user intervention or regular stop
1  Parameter problems
50 Permission problems

4. Prerequisites

Applications should conform to some rules, for appie to be able to
work. Applications normally should be self contained, that means: all
necessary stuff should be in the application directory. If this is not
the case, extra directories to be used should be listed in the profile