Skip to content

zalf-rdm/zalf-dq-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DQ Kit

Installation Instructions

Linux Installation (Ubuntu 16.04 and Above)

1. Set Up a Virtual Environment

Before installing any packages, activate your virtual environment:

# Activate your virtual environment (example command)
source /path/to/your/venv/bin/activate

2. Install Required Packages

Install the required packages listed in requirements.txt using pip:

pip install -r requirements.txt

3. FontAwesome Hotfix

Due to lack of support for Django 3.1.3, apply the following hotfix:

sed -i 's/from django.contrib.staticfiles.templatetags.staticfiles import static/from django.templatetags.static import static/g' "/path/to/your/venv/lib/python3.10/site-packages/fontawesome/templatetags/fontawesome.py"

4. Install Redis Server

Follow these steps to install Redis:

  1. Download and Build Redis:

    wget https://download.redis.io/redis-stable.tar.gz
    tar xzvf redis-stable.tar.gz
    cd redis-stable
    make
    make install
    • For shared hosting, use:
    PREFIX=$HOME/.local make
    PREFIX=$HOME/.local make install
  2. Add Redis to your Bash Configuration:

    echo "alias redis-server=$HOME/.local/bin/redis-server" >> ~/.bashrc
    source ~/.bashrc
  3. Create a Configuration File: Create a file named 6379.conf with the following content:

    port              6379
    daemonize         yes
    save              60 1
    bind              127.0.0.1
    tcp-keepalive     300
    dir               /home/username/my-path/my-folder
    dbfilename        dump.rdb
    rdbcompression    yes
    pidfile           redis.pid
    logfile           "redis.log"
    
    • Parameters Explained:

      • port: The port Redis will use (default is 6379).
      • daemonize: Use this option to run Redis in the background.
      • bind: The address the Redis server will bind to.
      • dir: Directory to store Redis files.
      • dbfilename: Name of the Redis database file.
      • pidfile: File to store the Redis server process ID.
      • logfile: File to store Redis logs.
    • Start Redis:

    redis-server /path/to/conf/6379.conf
    • Check Redis Logs:
    head -20 /home/username/my-path/my-folder/redis.log
  4. Install the Redis Python Connector: With your virtual environment activated, run:

    pip install redis
  5. Start a New Celery Worker: Make sure you are in the src folder and execute:

    python -m celery -A app_dq_kit worker --loglevel=INFO --concurrency=1

5. Set Required Environment Variables

Define the following environment variables:

export REDIS_ADDR=
export REDIS_PORT=

6. Start the DQ Kit Toolbox

Start the Django application:

python src/manage.py runserver

Windows Installation (Windows 10)

1. System Dependencies

2. Set Up a Virtual Environment

Make sure to use a virtual environment.

3. Install Required Packages

Install the required packages listed in requirements.txt:

pip install -r requirements.txt

4. FontAwesome Fix

Manually change a line in the FontAwesome package. Open the file:

PATH_TO_VENV/Lib/site-packages/fontawesome/templatetags/fontawesome.py

and change:

from django.contrib.staticfiles.templatetags.staticfiles import static

to:

from django.templatetags.static import static

5. Install Redis Server

Since Windows doesn't support the official Redis build, follow the instructions at: Install Redis on Windows.

6. Start a New Celery Worker

Make sure you are in the src folder and run:

python -m celery -A app_dq_kit worker --loglevel=INFO --concurrency=1

7. Create a Runner

Set the following script path and parameters:

  • Script path: src/manage.py
  • Parameter: runserver

8. Set Environment Variables

You need to set some environment variables. Open the system settings on Windows, navigate to User Accounts, and change your personal environment settings without admin privileges.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published