-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
28 lines (21 loc) · 879 Bytes
/
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
CONFIG_DIR := /tmp/cassaforte-data
CLUSTER_NAME := cassaforte_cluster
CASSANDRA_VERSION := binary:3.4
maybe_install_ccm:
which ccm || test -s ~/.local/bin/ccm || pip install --user ccm
prepare_tmp_dir:
rm -fr $(CONFIG_DIR) ;\
mkdir -p $(CONFIG_DIR)
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 prepare_tmp_dir
ccm create $(CLUSTER_NAME) -n 1 -s -i 127.0.0. -b -v $(CASSANDRA_VERSION) --config-dir=$(CONFIG_DIR)
start_three_node_cluster: maybe_install_ccm prepare_tmp_dir
ccm create $(CLUSTER_NAME) -n 3 -s -i 127.0.0. -b -v $(CASSANDRA_VERSION) --config-dir=$(CONFIG_DIR)
.PHONY: clean
stop_cluster:
ps ax | grep java | grep org.apache.cassandra.service.CassandraDaemon | grep -v grep | awk '{print $$1}' | xargs kill -9
.PHONY: clean
clean:
pip uninstall ccm