
1.Introduction
==============

Opengnsys is a free software application for managing and deploy operative
systems. Opengnsys has a webpage administration web interface. This file details
how to install the Opengnsys web interface.

2. Dependencies
===============

The Opengnsys web interface is based on the webpy framework and sqlalchemy and
is developed in python. You need to execute it in a unix-like operative system
like Linux which has support for bash.

By default we use sqlite as the database backend, but you can use other
databases webpy supports.

2.1 Arch Linux
==============

To install the dependencies of Opengnsys web interface in Arch Linux, execute
as root:

	# pacman -S community/python-sqlalchemy python-pip python-ldap
    # easy_install wsgilog
    # pip install formalchemy


2.2 Debian / Ubuntu
===================

To install the dependencies of Opengnsys web interface in Debian or Ubuntu,
execute as root:

	# apt-get install python-sqlalchemy python-pip python-ldap
    # easy_install wsgilog
    # pip install formalchemy

3. Setup
========

The web interface uses a database for storing the information. By default it
uses asqlite database, but you can change the configuration of the database
editing the file config.py. After doing this, you have to execute the setup
script which creates the tables in the database and generates the translations
for the support languages.

In order to know how to configure the database using mysql, postgres, oracle or
any other database we support, take a look at
http://www.sqlalchemy.org/docs/05/dbengine.html#create-engine-url-arguments

Execute the setup script:

	$ ./setup.sh

3.1 SSL Setup
=============

Opengnsys uses secure connections between server, repositories and clients.
This is done using SSL certificates certified by a CA (Certificate Authority).
Note that it only checks that the certificate is valid and the certificate is
trusted. You can see in ssslsockets_example how to create your own CA, create
certificates and sign them. Across the Opengnsys platform, the SSL connections
are always verified on both ends: both the client and the server.

You can configure in the config file (config.py) the path to the private key of
the server certificate, the path to the public key, and the path to the public
key of the CA certificate. By default we include example files for each of them
in the web/ssl directory, and those are the files configured to be used in the
default config file. This is done for convenience, but if you want security you
should create/use your own.

4. Launch the server
====================

To execute the web interface, execute:

	$ ./admin.py

The web server will be launched at http://localhost:8080. If you want to launch
the server at a different port, use:

	$ ./admin.py <port>

Note that any port less than 1024 will need superuser priviledges to be
executed.

4.1 Deployment using webserver
==============================

Instead of using the web.py script to launch the server, you can configure
Apache, Lighthttpd or any other web server with python support for serving the
Opengnsys web interface. At the moment we have only tested Lighthttpd.

4.1.1 Lighthttpd
================

Take a look at http://webpy.org/cookbook/fastcgi-lighttpd for details

4.1.2 Others
============

Take a look at the Deployment section of the webpy cookbook
http://webpy.org/cookbook .

