Giter Site home page Giter Site logo

appie's Introduction

******************************************************************************
*
*                                 APPIE!
*
******************************************************************************

Contents
--------
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:

$APP_BASE/<application>/<environment>.

Per application/environment pair, a user is created with the id
app-<application>-<environment>. 

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

Users:
	appX-tst
	appX-prd

Groups:
	appX: appX-tst, appX-prd

Directories:
	$APP_BASE/appX/tst
	             ./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.

APP_PORT_BASE
APP_PORT_LAST

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
variable ADDITIONAL_LOCATIONS.

appie's People

Contributors

huubbouma avatar

Stargazers

Artur Barseghyan avatar Douwe van der Meij avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

barseghyanartur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.