Scripts - digitalepidemiologylab/crowdbreaks-streamer-v1 GitHub Wiki

Running scripts

Scripts are defined in the scripts folder. Before running scripts make sure to install all python dependencies using pip install -r requirements.txt

Connecting to Elasticsearch

After running docker-compose up Elasticsearch should be available on localhost:9200. You can connect to elasticsearch from the project root directory using the python console:

from web.app.connections.elastic import Elastic
es = Elastic()
es.test_connection()   # True

If you would like to connect to the production Elasticsearch clusters, set the following ENV variables is secrets.list:

  • ELASTICSEARCH_HOST (search-XXX.eu-central-1.es.amazonaws.com)
  • ELASTICSEARCH_PORT (80)
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION

and run:

eval $(python ./scripts/set_env.py)

Afterwards you should be able to connect to the remote ES using the same syntax as above.