# Installing Rucio server

## Prerequisites

Rucio server runs on Python 2.6, 2.7.

Platforms: Rucio should run on any Unix-like platform.

## Python Dependencies

Rucio server needs the following python modules:

    # pip==9.0.1                # PyPA recommended tool for installing Python packages
    SQLAlchemy==1.1.11          # db backend
    alembic==0.9.2              # Lightweight database migration tool for SQLAlchemy
    Mako==1.0.6                 # Templating language
    python-editor==1.0.3        # Programmatically open an editor, capture the result
    flup==1.0.2                 # Needed to deploy web.py in lighthttpd

All Dependencies are automatically installed with pip.

## Install via puppet

puppet is an open and widely configuration management and automation system, for managing the infrastructure.

1. On the target node: start with a clean slate:

       $> rm -rf /opt/rucio

2. On the puppet master: install with puppet

   do something like this in /etc/puppet/manifests/nodes.pp:

       node '<hostname>' inherits basenode
       {
         include 'rucio::lighttpd'
         include 'rucio::server-dev'
       }

> then execute and wait:

>     $> puppet kick <hostname>

3. back to the target node: configure:

       $> cd /opt/rucio/etc
       $> cp rucio.cfg.template rucio.cfg
       $> cd web
       $> cp lighttpd.conf.template lighttpd.conf

4. startup lighttpd:

       $> cd /opt/rucio
       $> bin/venv_lighttpd.sh

5. test:

       $> curl -vvv -X GET -H "Rucio-Account: ddmlab" -H "Rucio-Username: xxxxx" -H "Rucio-Password: xxxx" https://localhost/auth/userpass

you should get back an HTTP OK with a X-Rucio-Auth-Token in the HTTP header