Makefile 1.2 KB
Newer Older
P
peng.xu 已提交
1 2 3
HOST=$(or $(host),127.0.0.1)
PORT=$(or $(port),19530)

P
peng.xu 已提交
4 5 6 7 8 9
build:
	docker build --network=host -t milvusdb/mishards .
push:
	docker push milvusdb/mishards
pull:
	docker pull milvusdb/mishards
P
peng.xu 已提交
10
deploy: clean_deploy
P
peng.xu 已提交
11
	cd all_in_one && docker-compose -f all_in_one.yml up -d && cd -
P
peng.xu 已提交
12
clean_deploy:
P
peng.xu 已提交
13
	cd all_in_one && docker-compose -f all_in_one.yml down && cd -
P
peng.xu 已提交
14 15 16
probe_deploy:
	docker run --rm --name probe --net=host milvusdb/mishards /bin/bash -c "python all_in_one/probe_test.py"
cluster:
P
peng.xu 已提交
17
	cd kubernetes_demo;./start.sh baseup;sleep 10;./start.sh appup;cd -
P
peng.xu 已提交
18 19 20 21 22 23 24 25 26
clean_cluster:
	cd kubernetes_demo;./start.sh cleanup;cd -
cluster_status:
	kubectl get pods -n milvus -o wide
probe_cluster:
	@echo
	$(shell kubectl get service -n milvus | grep milvus-proxy-servers | awk {'print $$4,$$5'} | awk -F"[: ]" {'print "docker run --rm --name probe --net=host milvusdb/mishards /bin/bash -c \"python all_in_one/probe_test.py --port="$$2" --host="$$1"\""'})
probe:
	docker run --rm --name probe --net=host milvusdb/mishards /bin/bash -c "python all_in_one/probe_test.py --port=${PORT} --host=${HOST}"
P
peng.xu 已提交
27 28 29 30
clean_coverage:
	rm -rf cov_html
clean: clean_coverage clean_deploy
style:
P
peng.xu 已提交
31
	pycodestyle --config=.
P
peng.xu 已提交
32
coverage:
P
peng.xu 已提交
33
	pytest --cov-report html:cov_html --cov=mishards
P
peng.xu 已提交
34 35
test:
	pytest