Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Installation guide

Álvaro Alonso edited this page Aug 31, 2015 · 23 revisions

DEPRECATED - Important: This wiki documentation is deprecated. Please use the documentation included in the main README of this project

Installation

In this repository you can find a et of tools to help in developing, deploying and testing FIWARE's IdM KeyRock using Fabric. If you rather install it step by step on your own, please head to each component repository and follow their installation steps.

The IdM is made out of two components, the web-based front-end and the restful back-end. You can check specific documentation in their repos.

Back-end ging/keystone

Front-end ging/horizon

Tools installation

For the instructions on how to install the IdM using the tools scroll down to the next section. This section covers the tools installation.

Install python and python-dev sudo apt-get install python-dev

Clone the tools in your machine

git clone https://github.com/ging/fi-ware-idm idm && cd idm

Create a settings file

cp conf/settings.py.example conf/settings.py

Install virtualenvwrapper. Follow the instructions here https://virtualenvwrapper.readthedocs.org/en/latest/index.html

Create a virtualenv and activate it

mkvirtualenv idm_tools

Install python dependencies

pip install -r requirements.txt

Configuration
There is a configuration file template in /conf/settings.py.example. This provides as a good base configuration file that should be enough for a test/development installation. Some options you might have to pay some attention to are:

  • IDM_ROOT: if the location of the keystone and horizon components in your system is not directly inside the folder where you have cloned the tools you will have to set this accordingly.
  • HORIZON_DEV_ADDRESS: sets the address and port where the frontend will listen to. Default is localhost:8000, you might want to tweak it based on your set up.
  • KEYSTONE_ADMIN_PORT and KEYSTONE_PUBLIC_PORT: if you need to use different ports for the keystone back-end

Usage
To see all available commands use

fab --list

With the virtualenv activated (use workon) you can run the commands using fab task_name. For example:

fab keystone.populate

Some tasks accept arguments that override the defaults from conf/settings.py. It is recommended to use settings.py to configure the tasks but you can use this arguments in a per-task basis if you find you need it. Other tasks might need explicit arguments like the path to a file. The way to pass arguments to tasks is simple and documented here For example:

fab keystone.task:one_arg='this',another='that'

Steps to install the IdM using the tools

Front-end

fab horizon.install

You can check everything went OK running the development server, but you wont be able to log in until you install the backend.

fab horizon.dev_server

Back-end

fab keystone.install
fab keystone.database_create
fab keystone.dev_server

You will need to populate the database with some data needed for the IdM to work properly. In another console and keeping the server on run

fab keystone.populate

You can now log into the web using the administrative account (by default user idm pass idm). If you want some more data to play around run keystone.test_data. This will create some users and organizations to make it easier to try the IdM. Log in with [email protected] (default password test).

fab keystone.test_data

If at some point you want to clean up, run keystone.database_reset. It will delete the whole database, create it again and populate it.

fab keystone.database_reset

Finally, if you want to run the keystone backend in the backgroud you can install it as a service

fab keystone.set_up_as_service