This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
71 lines (58 loc) · 1.79 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
GRAFANA_DIR := ./grafana/
STRESSER_DIR := ./graphite-stresser/
CLUSTER_NAME := cyanite_cluster
CASSANDRA_VERSION := binary:3.9
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) ;\
cd tokenizer ;\
lein uberjar ;\
cd .. ;\
cp tokenizer/target/tokenizer-0.0.1.jar ~/.ccm/repository/3.9/lib/ ;\
ccm populate -n 1 ;\
ccm start ;\
sleep 20 ;\
ccm node1 cqlsh < test/resources/schema.cql ;\
ccm node1 cqlsh < test/resources/schema_with_tokeniser.cql
reload_schema: maybe_install_ccm
ccm node1 cqlsh < test/resources/schema.cql
.PHONY: clean
stop_cluster:
ccm remove $(CLUSTER_NAME)
.PHONY: clean
clean:
pip uninstall ccm
#.PHONY: $(GRAFANA_DIR)
$(GRAFANA_DIR):
mkdir $(GRAFANA_DIR) ;\
cd $(GRAFANA_DIR) ;\
export GOPATH=`pwd` ;\
go get github.com/grafana/grafana ;\
cd $(GOPATH)/src/github.com/grafana/grafana ;\
go run build.go setup ;\
$(GOPATH)/bin/godep restore ;\
go run build.go build ;\
npm install grunt --save-dev ;\
npm install ;\
npm install -g grunt-cli ;\
grunt
grafana-server: $(GRAFANA_DIR)
cd $(GRAFANA_DIR) ;\
cd src/github.com/grafana/grafana/ ;\
./bin/grafana-server
$(STRESSER_DIR):
git clone [email protected]:feangulo/graphite-stresser.git ;\
cd graphite-stresser ;\
./gradlew uberjar
STRESS_HOSTS := 100
STRESS_TIMERS := 20
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