KnownodesInstall

(Tami Graph installation)


 * 1) adduser knownodes
 * 2) su knownodes
 * cd
 * 1) git clone https://github.com/CyberCRI/KnowNodes.git
 * 2) cd config
 * 3) copy all example config files to non example endings (DB.conf.js email.conf.js loggly.conf.js passport.conf.js  settings.js testacular.conf.js)
 * 4) edit them: mongodb can be run locally (tested on ubuntu 12.04)
 * 5) download neo4j community edition 1.8.3, unpack in home directory, no systemd file yet, just run bin/neo4j start (port 7474 - edit DB.conf)
 * 6) install node packages: npm install

Deployment - making sure site is visible from the outside world (this differs and is very tami specific)
 * 1) add a new subdomain tamigraph.tami.org.il (at our domain name service web interface)
 * 2) edit haproxy on the router to add a redirect from that domain to the internal service (running on host/port)

Fedora specific
 * 1) setup systemd unit files: neo4j, knownodes

Ubuntu specific
 * 1) neo4j 1.8.2 is packaged (use: apt-cache showpkg neo4j), install via apt-get install neo4j=1.8.2 (1.8.3 not packaged, but 1.8.2 supposed to work fine)
 * 2) downgrading neo4j: delete data directory or service fails to start (/etc/init.d/neo4j start, see /var/log/neo4j/console.log): rm -R /var/lib/neo4j/data/graph.db

= knownodes systemd unit file = (Needs work - doesn't say it depends on neo4j)

[Unit] Description=Knownodes [Service] Type=forking User=knownodes Group=knownodes WorkingDirectory=/home/knownodes/KnowNodes Environment=NODE_ENV=production ExecStart=/home/knownodes/node-v0.8.26-linux-x64/bin/node app ExecStop=/home/knownodes/node-v0.8.26-linux-x64/bin/npm stop [Install] WantedBy=multi-user.target

= neo4j systemd unit file = [Unit] Description=Neo4j

[Service] Type=forking User=knownodes Group=knownodes WorkingDirectory=/home/knownodes/neo4j-community-1.8.3 ExecStart=/home/knownodes/neo4j-community-1.8.3/bin/neo4j start ExecStop=/home/knownodes/neo4j-community-1.8.3/bin/neo4j stop [Install] WantedBy=multi-user.target

= Install on ubuntu = nice to have packages: tig ack tmux

knownodes requires packages: node-less (for lessc)

= Issues = User creation - when it failed had to use a different email, no way to remove the existing failed attempt to create a user.

Neo4JTroubleshooting

= TODO =
 * setup local mongodb
 * support nodejs 0.10 (latest)
 * current 0.8.26
 * support neo4j 2.0.0 (latest)
 * current 1.8.3
 * User email verification