MO2.2.1 Install openIMIS backend

In this section, we will provide the install guide for the modular openIMIS backend (API) as services in Windows or standalone applications in Linux. Please follow the appropriate setup based on your server configuration.

Download modular openIMIS backend

  • Download and unzip the release from Github openimis-be_py into a new folder (e.g. C:\openIMIS\backend).

Install python and dependencies

  • Install Python 3 (recommended in a virtualenv)

  • Install pip

  • Within openimis-be_py directory

    • install openIMIS (external) dependencies: 

      pip install -r requirements.txt
    • generate the openIMIS modules dependencies file (from openimis.json config; adapt the list of modules if necessary): 

      python script\modules-requirements.py openimis.json > modules-requirements.txt
    • install openIMIS current modules: 

      pip install -r modules-requirements.txt

Configure the database connection

  • By default, openIMIS is connected to MS-SQL Server:

    • via ODBC (and pyodbc) driver

    • using TCP/IP protocol (with server DNS name as hostname or localhost) and fixed port (leave DB_PORT here below empty for dynamic port)

    • SQL Server (not Windows/AD) authentication (user name password managed in SQL Server admin). Download and install the ODBC that corresponds to your OS and MS-SQL Server version (https://docs.microsoft.com/en-us/sql/connect/odbc/)

  • Create an openimis-be_py/.env file to provide your database connection info:

  • Instead of .env file, you can use environment variables (e.g. provided as parameters in the docker-compose.yml).

  • Default used Django database 'engine' in openIMIS is sql_server.pyodbc. If you need to use another one, use the DB_ENGINE entry in the .env file.

  • Default 'options' in openIMIS are {'driver': 'ODBC Driver 17 for SQL Server','unicode_results': True}. If you need to provide other options, use the DB_OPTIONS entry in the .env file (be complete: the new JSON string will entirely replace the default one).

  • At this stage, you may (depends on the database you connect to) need to:

    • apply Django migrations, from openimis-be_py/openIMIS

    • create a superuser for Django admin console, from openimis-be_py/openIMIS

Run the modular openIMIS backend locally

Start openIMIS from within openimis-be_py/openIMISpython manage.py runserver

Run the modular openIMIS backend as a service

  •  

 

Previous step: MO2.2 Install openIMIS without using Docker

 

Did you encounter a problem or do you have a suggestion?

Please contact our Service Desk



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/