JSONBlasterSetup
- Install opendiamond.
- If installing from source, you will need Tornado, SockJS-tornado, the Python Imaging Library, python-dateutil, python-magic, simplejson, M2Crypto, PycURL, validictory, and TCP Wrappers.
- If installing from RPM, you will need the opendiamond-blaster package.
-
Edit
.diamond/blaster_config
in the home directory of the user that will run the JSON Blaster.blaster_config
uses Python syntax andblaster --help
lists the available settings. At a minimum, you need to setbaseurl
. For example:baseurl = 'http://blaster.example.com:8080/' # Disable the example web interface (recommended for production servers) enable_testui = False
-
If you will be running the Blaster behind nginx, configure nginx to pass through the request scheme and remote IP address using the
X-Scheme
andX-Real-IP
request headers:proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme;
Then configure the Blaster accordingly:
listen = 'localhost:8080'
reverse_proxy = True
To prevent nginx from timing out evaluation requests when expensive filters are run, you should also increase the nginx proxy timeout:
proxy_read_timeout 3600s;
-
Use TCP Wrappers to configure the set of web applications that can create new searches through the Blaster. For example, to allow only localhost to create searches, add the following to
/etc/hosts.deny
:blaster: ALL EXCEPT 127.0.0.1
Listing hostnames in hosts.allow
or hosts.deny
will cause a DNS lookup for every incoming connection, so IP addresses are preferred.
- Start the Blaster by executing
blaster
.