Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Installation for local development

Anders Markvardsen edited this page Jun 1, 2018 · 30 revisions

Autoreduction Installation

This a guide on how to install the Autoreduction service for local development.

You should be able to setup a local development environment using any of Linux, Windows and Mac.

If you prefer using Python virtual environments then note the name venv is in .gitignore.

External project requirements

  • Python 2.7 (the service has not been tried with Python 3 yet)
  • MySQL-server version 5.6
    • Currently we must use version 5.6 due to user creation code in test and production code
    • On Windows this is: MySqlServer version 5.6
      • During install and Type and Networking, optionally untick 'Open Windows Firewall port for network access'
  • mysql-python compatible, which for windows is mysql-python-1.2.5
    • pip install mysql-python (before accepting suggested pip install - check the version is correct)
    • Or Download and install the .whl file python-1.2.5.win-amd64-py2.7
      • After downloading this install it with <pip install name_of_wheel.whl>
  • ActiveMQ
    • Linux: Scripts/Build/install/activemq.sh
    • Windows: Scripts/Build/install/activemq.bat path\to\desired\install\location\
  • ICAT
    • Linux: Scripts/Build/install/icat.sh
    • Windows: Scripts/Build/install/icat.bat path\to\desired\install\location\

Setting up for development

  • Run the following lines of code:
# Clone repository, where you haven't already done this:
git clone https://github.com/ISISScientificComputing/autoreduce.git autoreduction

# Add the project to the python site packages
# From the directory one level up from the autoreduction code folder run
pip install -e autoreduction

cd autoreduction

# use pip to install project requirements
pip install -r requirements.txt

# This script will move the test_settings.py file to be the setting.py files.
# Note: on windows this can be run in git bash 
./Scripts/Build/project/migrate_test_settings.sh

WebApp setup

  • The settings.py will point towards the test services by default. If you wish to use the services running on the development node, update autoreduction/WebApp/autoreduce_webapp/autoreduce_webapp/settings.py.

  • Navigate to autoreduction/WebApp/autoreduce_webapp/ and run python manage.py runserver

  • Visit http://127.0.0.1:8000/ in a web browser to see the webapp locally.

  • If you make changes to the webapp, you will have to re-run python manage.py runserver for them to take affect

Clone this wiki locally