-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
124 lines (97 loc) · 2.16 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
ifneq ($(HTTPROXY),)
DPROXY="--build-arg HTTP_PROXY=$(HTTPROXY) --build-arg HTTPS_PROXY=$(HTTPROXY)"
endif
export DPROXY
ifeq ($(REGISTRY),)
REGISTRY = 10.209.224.13:10500/ffan/rds
endif
export REGISTRY
ifeq ($(VERSION),)
VERSION = latest
endif
export VERSION
null:
@echo "Please specify a specific target!"
build: pd tikv tidb migrator prom-server tidb-gc tidb-operator
.PHONY: build
push: push-pd push-tikv push-tidb push-migrator push-prom-server push-tidb-gc push-tidb-operator
.PHONY: push
# uninstall apps from k8s
clean: clean-grafana clean-tidb-operator
.PHONY: clean
# install apps to k8s
install: install-grafana install-tidb-operator
.PHONY: install
clean-grafana:
cd kubernetes/manager/prometheus; \
./deploy.sh -d
.PHONY: clean-prometheus
clean-tidb-gc:
cd kubernetes/manager; \
./gc-down.sh
.PHONY: clean-tidb-gc
clean-tidb-operator:
cd kubernetes/manager; \
./op-down.sh
.PHONY: clean-tidb-operator
install-grafana:
cd kubernetes/manager/prometheus; \
./deploy.sh -c
.PHONY: install-grafana
install-tidb-gc:
cd kubernetes/manager; \
./gc-up.sh
.PHONY: install-tidb-gc
install-tidb-operator:
cd kubernetes/manager; \
./op-up.sh
.PHONY: install-tidb-operator
migrator:
cd docker/migrator; \
./build.sh;
.PHONY: migrator
pd:
cd docker/pd; \
./build.sh;
.PHONY: pd
prom-server:
cd docker/prom-server; \
./build.sh;
.PHONY: prom-server
tidb:
cd docker/tidb; \
./build.sh;
.PHONY: tidb
tidb-gc:
cd docker/tidb-gc; \
./build.sh;
.PHONY: tidb-gc
tidb-operator:
cd docker/tidb-operator; \
./build.sh;
.PHONY: tidb-operator
tikv:
cd docker/tikv; \
./build.sh;
.PHONY: tikv
push-pd: docker/pd
docker push $(REGISTRY)/pd:$(VERSION)
.PHONY: push-pd
push-tikv:
docker push $(REGISTRY)/tikv:$(VERSION)
.PHONY: push-tikv
push-tidb:
docker push $(REGISTRY)/tidb:$(VERSION)
.PHONY: push-tidb
push-migrator: docker/migrator
docker push $(REGISTRY)/migrator:$(VERSION)
.PHONY: push-migrator
push-prom-server:
docker push $(REGISTRY)/prom-server:$(VERSION)
.PHONY: push-prom-server
push-tidb-gc:
docker push $(REGISTRY)/tidb-gc:$(VERSION)
.PHONY: push-tidb-gc
push-tidb-operator:
docker push $(REGISTRY)/tidb-operator:$(VERSION)
.PHONY: push-tidb-operator