-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (34 loc) · 1.04 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
OS ?= ubuntu
DOCKER_IMAGE_NAME = mesos_cluster_node
PWD = $(shell pwd)
.PHONY: all clean start stop restart
all:
docker build -t ${DOCKER_IMAGE_NAME} -f ${PWD}/docker/Dockerfile.${OS} ${PWD}/docker
clean:
docker ps -a | grep mesos_cluster_ | awk '{print $$1}' | xargs -I {} docker rm -f {}
docker rmi -f ${DOCKER_IMAGE_NAME} | true
docker network rm mesoscluster_app_net | true
start: all
docker-compose -f ${PWD}/cluster.yml up -d
stop:
docker-compose -f ${PWD}/cluster.yml kill
docker-compose -f ${PWD}/cluster.yml rm -f --all
restart: stop start
test:
@echo Running basic cluster test
@echo
@echo -n Test zookeepers nodes...
@nc -z 172.16.200.11 2181
@nc -z 172.16.200.12 2181
@nc -z 172.16.200.13 2181
@echo ok
@echo -n Test mesos master nodes...
@curl http://172.16.200.21:5050/health
@curl http://172.16.200.22:5050/health
@curl http://172.16.200.23:5050/health
@echo ok
@echo -n Test mesos slave nodes...
@curl http://172.16.200.31:5051/health
@echo ok
@echo
@echo Cluster successfully passed tests