Install

  1. Install Dependencies

    You will need the following packages:

    • Python 3.7 or later

    • Python3 headers
      • python3-dev on Debian/Ubuntu

      • python-devel on Fedora/Centos/

    • pip
      • python3-pip

    • Libevent headers

      libevent-devel on Fedora/Centos

    • postgresql
      • postgresql-server

      • postgresql-contrib

      • postgresql

    • RabbitMQ
  2. Ensure Postgres and RabbitMQ are running

#. Create Database In a ``psql` shell run

create user dnstats with password ‘changeme!’; create database dnstats owner dnstats;

See the Postgres doc for more details on how to configure Postgres.

  1. Clone the repo:

    git clone git@git.assignitapp.com:dnstats/dnstats.git
    
  2. Change into the repo:

    cd dnstats
    
  3. Copy config:

    cp dnstats.src.env dnstats.env
    
  4. Edit dnstats.src.env

    Update AMQP, `DB`, and CELERY_BACKEND

  5. Install virtualenv:

    pip3 install virtualenv --user
    
  6. Create virtualenv:

    virtualenv -p python3 venv
    
  7. Active venv:

    source venv/bin/activate
    
  8. Install Python Dependencies:

    pip install -r requirements.txt
    
  9. Load config:

    source sendgrid.env
    
  10. Seed Database:

    python -m dnstats.db.seed
    
  11. Start celery:

    celery -A dnstats.celery worker
    
  12. Run Task for seeding sites