Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Div
style.tab-content { display: none; } .tab-content:target { display: block; }
idtab1
classtab-content

Windows test

Div
style.tab-content { display: none; } .tab-content:target { display: block; }
idtab2
classtab-content
Linux testDownload 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: 

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

      Code Block
      python modules-requirements.py openimis.json > modules-requirements.txt
    • install openIMIS current modules: 

      Code Block
      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:

    Code Block
    DB_HOST=mssql-host-server
    DB_PORT=mssql-port
    DB_NAME=database-name
    DB_USER=database-user
    DB_PASSWORD=database-password
  • 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

      Code Block
      python manage.py migrate
    • create a superuser for Django admin console, from openimis-be_py/openIMIS

      Code Block
      python manage.py createsuperuser

Expand
titleWindows setup
Expand
titleLinux setup