Deployment

RCS uses Python and CouchDB and should be deployable on any platform that supports both. Currently deployment notes are provided only for Windows (and tested with 2008r2 and 2012).

Windows via IIS and FastCGI

Install [CouchDB](http://couchdb.apache.org/)

  1. Run the installer

  2. Open a web browser and navigate to http://127.0.0.1:5984/_utils

  3. Setup the admin account (see link in bottom left of the window)

  4. Update the configuration to listen on the correct network address (Tools | Configuration | bind_addr)

  5. Create a database rcs_cache (navigate to Overview | Create Database)

  6. Update the security for the rcs_cache database set Admin Roles: ["rcs"] and Member Roles: ["rcs"]

  7. Create a second database rcs_sync with the same permissions

  8. Add a new user to the _users database (Overview | _users | Create Document)

  9. Select source and enter the following then save document
    {
        "_id": "org.couchdb.user:rcs",
        "name": "rcs",
        "roles": ["rcs"],
        "type": "user",
        "password": "changeme"
    }
    
  10. Logout and attempt to login as user rcs to test the setup

  11. Confirm that access to _users is restricted and access to rcs_cache and rcs_sync is enabled

Configure Python Environment

  1. Ensure python is a 2.7.x release

  2. Get an RCS release package rcs-X.Y.Z.zip

  3. Extract the release package, it should be somewhere IIS can be configured to read from c:\inetpub\rcs-X.Y.Z

  4. [Optional] Get prepackaged dependencies (should be a directory full of .whl files)

  5. Install pip (https://pip.pypa.io/en/latest/installing.html)

  6. Install virtualenv pip install virtualenv

  7. Create python virtual environment in the release location and activate it
    cd c:\inetpub\rcs-X.Y.Z
    virtualenv .
    scripts\activate
    
  8. Install the project dependencies:

    • via internet pip install -r requirements.txt
    • via local wheel cache pip install --use-wheel --no-index --find-links=c:\path\to\wheel\dir -r requirements.txt
  9. Update the configuration in config.py or set the environment variable RCS_CONFIG to point to a config which overrides the defaults set in config.py

  10. Update the configuration variable for REG_SCHEMA to an absolute path (e.g. c:\\inetpub\\rcs-X.Y.Z – use double backslashes to avoid string escape codes)

  11. Ensure the DB_CONN variable in the config matches the account, password and other settings from the CouchDB installation

  12. Test the installation python rcs.py (this will run a test server on localhost)

IIS Integration

  1. Ensure IIS has CGI support (http://www.iis.net/configreference/system.webserver/cgi)

  2. Create a website in IIS and point it to the Python virtual environment

  3. Go to the website | Handler Mappings | Add Module Mapping ...
    Request Path: *
    Module: FastCgiModule
    Executable: C:\inetpub\rcs-X.Y.Z\Scripts\python.exe|C:\inetpub\rcs-X.Y.Z\wfastcgi.py
    Name: (name)
    
  4. Go back to the server settings | FastCgi Settings | Right click Edit

  5. Select Environment variables and add the following:
    PYTHONPATH: C:\inetpub\rcs\
    WSGI_HANDLER: rcs.app
    

Table Of Contents

Previous topic

Administrator’s Guide

Next topic

RAMP Deployment with RCS

This Page