forked from pyr/cyanite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (45 loc) · 1.57 KB
/
Makefile
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
GRAFANA_DIR := ./grafana/
STRESSER_DIR := ./graphite-stresser/
CLUSTER_NAME := cyanite_cluster
CASSANDRA_VERSION := binary:3.5
maybe_install_ccm:
which ccm || test -s ~/.local/bin/ccm || pip install --user ccm
prepare_aliases:
sudo ifconfig lo0 alias 127.0.0.2 up ;\
sudo ifconfig lo0 alias 127.0.0.2 up
start_one_node_cluster: maybe_install_ccm
ccm create $(CLUSTER_NAME) -v $(CASSANDRA_VERSION) ;\
ccm populate -n 1 -i 127.0.0. ;\
ccm start ;\
ccm node1 cqlsh < test/resources/schema.cql
.PHONY: clean
stop_cluster:
ccm remove $(CLUSTER_NAME)
.PHONY: clean
clean:
pip uninstall ccm
$(GRAFANA_DIR):
go get github.com/grafana/grafana ;\
git clone git@github.com:grafana/grafana.git ;\
git checkout v3.0.2 ;\
cd grafana ;\
go run build.go setup ;\
go run build.go build ;\
npm install ;\
npm install grunt-cli ;\
node_modules/grunt-cli/bin/grunt build
grafana-server: $(GRAFANA_DIR)
cd grafana ;\
./bin/grafana-server
$(STRESSER_DIR):
git clone git@github.com:feangulo/graphite-stresser.git ;\
cd graphite-stresser ;\
./gradlew uberjar
STRESS_HOSTS := 5
STRESS_TIMERS := 2
STRESS_INTERVAL := 1
stress: $(STRESSER_DIR)
java -jar $(STRESSER_DIR)/build/libs/graphite-stresser-0.1.jar localhost 2003 $(STRESS_HOSTS) $(STRESS_TIMERS) $(STRESS_INTERVAL) true
.PHONY: dev
dev:
lein run --path ./dev/cyanite.yaml