From 96d4374eb0e35b853fc3bf6e9976a731daef135a Mon Sep 17 00:00:00 2001
From: smarcet <smarcet@gmail.com>
Date: Tue, 28 Jan 2014 12:00:09 -0300
Subject: [PATCH] OpenstackID Documentation

Topics:

* Installation & Configuration

Implements: blueprint openid-oauth2-infra-implementation-documentation

Change-Id: I69916ac3ce80e8311c5479494680159fd8d0fa3b
---
 doc/source/openstackid.rst | 101 +++++++++++++++++++++++++++++++++++++
 doc/source/systems.rst     |   3 ++
 2 files changed, 104 insertions(+)
 create mode 100644 doc/source/openstackid.rst

diff --git a/doc/source/openstackid.rst b/doc/source/openstackid.rst
new file mode 100644
index 0000000000..95447a3836
--- /dev/null
+++ b/doc/source/openstackid.rst
@@ -0,0 +1,101 @@
+:title: OpenstackId
+==================
+OpenstackId Server
+==================
+
+OpenId Idp/ OAuth2.0 AS/RS
+
+At a Glance
+===========
+
+:Hosts:
+  * https://openstackid-dev.openstack.org
+:Puppet:
+  * :file:`modules/openstackid`
+  * :file:`modules/openstack_project/manifests/openstackid_dev.pp`
+:Projects:
+  * http://git.openstack.org/cgit/openstack-infra/openstackid/
+:Bugs:
+  * https://bugs.launchpad.net/openstackid
+:Resources:
+  * http://laravel.com/docs/installation
+  * http://laravel.com/docs/configuration
+
+Configuration
+=============
+
+Environment Configuration
+_________________________
+
+We need to instruct the Laravel Framework how to determine which environment it is running in. The default environment
+is always production. However, you may setup other environments within the *bootstrap/start.php* file at the root of
+your installation.
+
+It is include on folder bootstrap a file called bootstrap/environment.php.tpl
+you must make a copy and rename it to bootstrap/environment.php
+
+In this file you will find an **$app->detectEnvironment** call. The array passed to this method is
+used to determine the current environment. You may add other environments and machine names to the array as needed.
+
+.. code:: php
+
+<?php
+
+$env = $app->detectEnvironment(array(
+
+    'local' => array('your-machine-name'),
+
+));
+
+Database Configuration
+______________________
+
+It is often helpful to have different configuration values based on the environment the application is running in. For example, you may wish to use a different database configuration on your development machine than on the production server. It is easy to accomplish this using environment based configuration.
+Simply create a folder within the config directory that matches your environment name, such as **dev**. Next, create the configuration files you wish to override and specify the options for that environment. For example, to override the database configuration for the local environment, you would create a database.php file in app/config/dev.
+
+OpenstackId server makes use of two database connections:
+
+* openstackid
+* os_members
+
+**openstackid** is its own OpenstackId Server DB, where stores all related configuration to openid/oauth2 protocol.
+**os_members** is SS DB (http://www.openstack.org/).
+both configuration are living on config file **database.php**, which could be a set per environment as forementioned
+like app/config/dev/database.php
+
+
+Error Log Configuration
+_______________________
+
+Error log configuration is on file *app/config/log.php*  but could be overriden per environment
+such as *app/config/dev/log.php* , here you set two variables:
+
+* to_email : The receiver of the error log email.
+* from_email: The sender of the error log email.
+
+
+Recaptcha Configuration
+_______________________
+
+OpenstackId server uses recaptcha facility to discourage brute force attacks attempts on login page, so in order to work
+properly recaptcha plugin must be provided with a public and a private key (http://www.google.com/recaptcha).
+These keys are set on file *app/config/packages/greggilbert/recaptcha/config.php* , but also could be set per environment
+using following directory structure *app/config/packages/greggilbert/recaptcha/dev/config.php*.
+
+Installation
+____________
+
+OpenstackId Server uses composer utility in order to install all needed dependencies. After you get the source code from git,
+you must run following commands on application root directory:
+
+* curl -sS https://getcomposer.org/installer | php
+* php composer.phar install
+* php artisan migrate --env=YOUR ENVIRONMENT
+* php artisan db:seed --env=YOUR ENVIRONMENT
+
+** your virtual host must point to /public folder.
+
+Permissions
+___________
+
+Laravel may require one set of permissions to be configured: folders within app/storage require write access by the web server.
diff --git a/doc/source/systems.rst b/doc/source/systems.rst
index b191e086dd..c56297d9c0 100644
--- a/doc/source/systems.rst
+++ b/doc/source/systems.rst
@@ -24,3 +24,6 @@ Major Systems
    lists
    wiki
    git
+   openstackid
+
+