Created
August 8, 2017 09:46
-
-
Save arcolife/8cceeca6f0a051a6312442a35fd5ad70 to your computer and use it in GitHub Desktop.
sarjitsu backend conf sample (standalone runs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ElasticSearch] | |
host = 0.0.0.0 | |
port = 9200 | |
[Settings] | |
index_prefix = sarjitsu | |
index_version = 1 | |
bulk_action_count = 2000 | |
number_of_shards = 5 | |
number_of_replicas = 1 | |
[Grafana] | |
dashboard_url = 0.0.0.0:3000 | |
api_url = http://0.0.0.0:5000/ |
diff --git a/lib/backend/conf/sar-index.cfg.example b/lib/backend/conf/sar-index.cfg.example
index 9c961d3..97d1de5 100644
--- a/lib/backend/conf/sar-index.cfg.example
+++ b/lib/backend/conf/sar-index.cfg.example
@@ -1,5 +1,5 @@
[ElasticSearch]
-host =
+host = 0.0.0.0
port = 9200
[Settings]
@@ -10,5 +10,5 @@ number_of_shards = 5
number_of_replicas = 1
[Grafana]
-dashboard_url =
-api_url = http://middleware:80/
+dashboard_url = 0.0.0.0:3000
+api_url = http://0.0.0.0:5000/
diff --git a/lib/backend/src/app/__init__.py b/lib/backend/src/app/__init__.py
index 3faaec5..b31129e 100644
--- a/lib/backend/src/app/__init__.py
+++ b/lib/backend/src/app/__init__.py
@@ -35,7 +35,7 @@ app.logger.addHandler(handler)
# log.addHandler(handler)
# app.cache = redis.StrictRedis(**app.config.get('REDIS_CONFIG'))
-app.cache = Redis(host='redis', port=6379)
+app.cache = Redis(host='172.18.0.2', port=6379)
app.cache.set("saDir", SA_DIR)
app.cache.set("uid_track", 1)
diff --git a/lib/backend/src/config.py b/lib/backend/src/config.py
index 27b82df..e75c594 100644
--- a/lib/backend/src/config.py
+++ b/lib/backend/src/config.py
@@ -2,8 +2,8 @@
# -*- coding: utf-8 -*-
# Statement for enabling the development environment
-DEBUG = False
-# DEBUG = True
+# DEBUG = False
+DEBUG = True
import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
@@ -11,7 +11,8 @@ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
LOG_FILENAME = 'sarjitsu_app.log'
LOG_FILESIZE = 10000 # in Bytes
-CFG_PATH = "/opt/sarjitsu/conf/sar-index.cfg"
+# CFG_PATH = "/opt/sarjitsu/conf/sar-index.cfg"
+CFG_PATH = "/home/arco/workspace/sarjitsu/lib/backend/conf/sar-index.cfg.example"
# Application threads. A common general assumption is
# using 2 per available processor cores - to handle
diff --git a/lib/backend/src/upload_processor.py b/lib/backend/src/upload_processor.py
index 684b021..a0149a4 100644
--- a/lib/backend/src/upload_processor.py
+++ b/lib/backend/src/upload_processor.py
@@ -81,6 +81,7 @@ def begin(target, sessionID, form):
for j in t_list:
j.join()
+ import pdb; pdb.set_trace()
_valid_results_found = False
for filename in filename_list:
nodename, meta, sadf = q[filename]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then change config.py
Then copy
conf/sar-index.cfg.example
toconf/sar-index.cfg
and paste contents from above gist snippet.Then edit
/etc/hosts
and add0.0.0.0 redis
Then go to
src/
and run: