An work-in-progress Onyx application to do useful things for Braid. Currently, its purpose is to monitor the Datomic log and send messages content to ElasticSearch to facilitate better search for Braid.
This is still a work-in-progress, instructions on use will be added when things are actually working.
The following instructions assume Ubuntu 16.04
-
install elasticsearch 2.x
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list sudo apt-get update sudo apt-get install elasticsearch
-
optionally, edit
/etc/elasticsearch/elasticsearch.yml
(e.g. in prod, probably should changecluster.name
) -
start elasticsearch running
sudo systemctl enable elasticsearch.service
lein run start-peers 10
lein run submit-job datomic-job
If elasticsearch is running on a different host, you'll need to set up the firewall to allow that.
- Make elasticsearch bind to the network interface by setting
http.host: _eth0_
in elasticsearch.yml - Allow connections from the braid app server:
sudo ufw allow from $BRAID_IP to any port 9200
If the datomic is running on another machine, you'll need to make sure the interface is available. If Datomic is using Postgresql as the backing store, you'll need to do the following:
- Edit
/etc/postgresql/9.5/main/postgresql.conf
and changelisten_address
fromlocalhost
to*
- Allow the datomic user to connect over TCP: Edit
/etc/postgresql/9.5/main/pg_hba.conf
and add the following line:host datomic all 159.203.33.218/32 md5
- Allow connections from the onyx server to postgres:
sudo ufw allow from $ONYX_IP to any port 5432
- Edit the datomic config file to set
host
to0.0.0.0
andalt-host
to the public IP of the braid server - Allow connections from the onyx server to datomic:
sudo ufw allow from $ONYX_IP to any port 4334