forked from ihcsim/routeguide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (46 loc) · 1.31 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
# server config
SERVER_PORT ?= 8080
FAULT_PERCENT ?= 0.3
# client config
SERVER_HOST ?= :$(SERVER_PORT)
GRPC_TIMEOUT ?= 20s
CLIENT_MODE ?= REPEATN
RPC_API ?= GetFeature
MAX_REPEAT ?= 15
ENABLE_LOAD_BALANCING ?= true
SERVER_IPV4 ?= 127.0.0.1:8080,127.0.0.1:8081,127.0.0.1:8082
WAIT_TIME ?= 250
server:
go build -o ./cmd/server/server ./cmd/server/
./cmd/server/server -port=$(SERVER_PORT)
client:
go build -o ./cmd/client/client ./cmd/client/
./cmd/client/client \
-server=$(SERVER_HOST) \
-timeout=$(GRPC_TIMEOUT) \
-mode=$(CLIENT_MODE) \
-api=$(RPC_API) \
-n=$(MAX_REPEAT) \
-enable-load-balancing=$(ENABLE_LOAD_BALANCING) \
-server-ipv4=$(SERVER_IPV4) \
-wait=$(WAIT_TIME)
l5d2:
linkerd install --tls=optional | kubectl apply -f -
deploy:
kubectl apply -f k8s-server.yaml
sleep 15s
kubectl apply -f k8s-client.yaml
mesh:
# linkerd inject --tls=optional k8s-server.yaml | kubectl apply -f -
linkerd inject k8s-server.yaml | kubectl apply -f -
sleep 15s
# linkerd inject --tls=optional k8s-client.yaml | kubectl apply -f -
linkerd inject k8s-client.yaml | kubectl apply -f -
image:
@eval $$(minikube docker-env) ; \
docker build --rm -t routeguide .
proto:
protoc -I proto/route_guide.proto --go_out=plugins=grpc:proto
clean:
kubectl delete -f k8s-server.yaml
kubectl delete -f k8s-client.yaml