-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (48 loc) · 2.55 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
gen_proto:
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative settlement.proto
docker_build:
docker build -t merpay-ms-dev/bff:0.1 ./application/bff;\
docker build -t merpay-ms-dev/settlement:0.1 ./application/settlement;\
docker build -t merpay-ms-dev/settlement-db:0.1 ./application/settlement-db;\
docker build -t merpay-ms-dev/balance:0.1 ./application/balance;\
docker build -t merpay-ms-dev/balance-db:0.1 ./application/balance-db
kind_load_image:
kind load docker-image merpay-ms-dev/bff:0.1;\
kind load docker-image merpay-ms-dev/settlement:0.1;\
kind load docker-image merpay-ms-dev/settlement-db:0.1;\
kind load docker-image merpay-ms-dev/balance:0.1;\
kind load docker-image merpay-ms-dev/balance-db:0.1
kube_deploy:
kubectl apply -f ./application/infra/bff/k8s/bff.yaml;\
kubectl apply -f ./application/infra/settlement/k8s/settlement.yaml;\
kubectl apply -f ./application/infra/settlement/k8s/settlement-db.yaml;\
kubectl apply -f ./application/infra/balance/k8s/balance.yaml;\
kubectl apply -f ./application/infra/balance/k8s/balance-db.yaml;\
kubectl apply -f ./application/infra/rabbitmq/k8s/rabbitmq.yaml
istio_deploy:
kubectl apply -f ./application/infra/bff/istio/virtualservice.yaml;\
kubectl apply -f ./application/infra/common/istio/ingress-gateway.yaml
delete_istio_security:
kubectl delete -f ./application/infra/common/istio/request-authentication-keycloak.yaml;\
kubectl delete -f ./application/infra/common/istio/authorization-policy-keycloak.yaml
deploy_istio_security:
kubectl apply -f ./application/infra/common/istio/request-authentication-keycloak.yaml;\
kubectl apply -f ./application/infra/common/istio/authorization-policy-keycloak.yaml
deploy_gw:
kubectl apply -f ./application/infra/common/istio/ingress-gateway.yaml
deploy_vs:
kubectl apply -f ./application/infra/bff/istio/virtualservice.yaml
deploy_dr:
kubectl apply -f application/infra/bff/istio/destinationrule.yaml
delete_all:
kubectl delete -f ./application/infra/bff/k8s/bff.yaml;\
kubectl delete -f ./application/infra/settlement/k8s/settlement.yaml;\
kubectl delete -f ./application/infra/settlement/k8s/settlement-db.yaml;\
kubectl delete -f ./application/infra/balance/k8s/balance.yaml;\
kubectl delete -f ./application/infra/balance/k8s/balance-db.yaml;\
kubectl delete -f ./application/infra/rabbitmq/k8s/rabbitmq.yaml
# TODO: deploy script ref:https://gitlab.com/gihyo-ms-dev-book/handson/sec3/3.4-auth/bookshop-demo/-/tree/main/scripts?ref_type=heads
deploy:
make docker_build;\
make kind_load_image;\
make kube_deploy