Development Setup

For development we will be using the built in Flask server, no separate web server required. CouchDB will also be installed in admin party mode (every connection has admin rights).

Install CouchDB

  1. Run the installer
  2. Open a web browser and navigate to http://127.0.0.1:5984/_utils
  3. Create a database rcs_cache (navigate to Overview | Create Database)
  4. Create a second database rcs_auth

Configure Python Environment

  1. Ensure python is a 3.6.x release
  2. Install pip (https://pip.pypa.io/en/latest/installing.html)
  3. Install virtualenv pip install virtualenv
  4. Clone the repo git clone git@github.com:RAMP-PCAR/RCS.git rcs
  5. Create python virtual environment virtualenv rcs
  6. Switch to the project directory cd rcs
  7. Activate the virtualenv scripts\activate
  8. Install the project dependencies pip install -r requirements.txt
  9. Make any path changes necessary to config.py (if you followed the above there should be none)
  10. Test the installation python3.6 rcs.py (this will run a test server on localhost)
  11. Seed the database python3.6 seed_qa_keys.py

Set up Development Environment and run RCS locally

  1. Install Vagrant (https://www.vagrantup.com/downloads.html)
  2. Clone RCS repo git clone https://github.com/fgpv-vpgf/rcs.git
  3. Activate Vagrant vagrant up (Note: Please ensure a Vagrant file exits)
  4. Establish a connection vagrant ssh
  5. Change to the Vagrant folder cd /vagrant
  6. Activate the programmes required . bin/activate
  7. If vagrant failed at any point, run vagrant destroy then repeat the previous steps again
  8. Run RCS python3.6 run.py --listen-all
  9. Go to http://localhost:6101/static/test.html for testing (Note: The port number might be different)