-
Notifications
You must be signed in to change notification settings - Fork 2
/
HACKING
70 lines (46 loc) · 2.03 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Notes
=====
This file just contains some notes. These should eventually make it into a
README of some sort.
Running Tests
-------------
To test the SHA512 and HMAC-SHA512 implementation:
CPPFLAGS=-DTEST make sha && ./sha
The complicated Javascript (like the BoardCode parser / evaluator) is all
tested via QUnit, which can be found in api/qunit. We use blanket.js to
instrument each source javascript with counters, for gathering code
coverage statistics.
Running The System
------------------
The easiest way to run right now is probbly docker.
To build the images locally, run:
make docker
That should create the following images:
REPOSITORY TAG IMAGE ID CREATED SIZE
bolo/web latest 1b9916f1bc1e 10 hours ago 15.6MB
bolo/core latest 34cf06a8d71d 2 days ago 2.39MB
Your image IDs and creation dates will vary.
To spin these images without losing data, you'll need a volume, which you
can create with the `docker volume` commands:
docker volume create -d local bolodb
docker volume ls
(You may have lots of other volumes, especially if you've done a lot of work
with docker-compose and, like me, haven't cleaned up after yourself in a
while.)
The main bolo daemon is in the `bolo/core` image, which you really ought to
give a volume mount to:
docker run -it -v bolodb:/db bolo/core
The bolo core listens on port TCP/2001 (for metric submission), and TCP/2002
(for web UI queries).
The web interface is in `bolo/web`. It also needs a persistent volume
mount, as well as the `$BOLO_ENDPOINT` environment variable. Here, my bolo
core is spinning on 172.17.0.2, default ports:
docker run -it -e BOLO_CORE=172.17.0.2:2001 -v bolodb:/db bolo/web
Both `bolo/core` and `bolo/web` can share a mount; the former stores data in
`/db/main.db` and the latter in `/db/web.db`.
To make life a bit easier, you can just do this:
./dev/core
./dev/web
./dev/agent
Assuming you have no other containers running, and core comes up on
172.17.0.2, this Just Works (TM).