forked from kube-tarian/kad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 2.59 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
PREFIX := kad
SERVER_APP_NAME := server
AGENT_APP_NAME := agent
DEPLOYMENT_WORKER_APP_NAME := deployment-worker
CONFIG_WORKER_APP_NAME := config-worker
CLIMON_APP_NAME := climon
VAULTSERV_APP_NAME := vaultserv
BUILD := 0.1.1
gen-protoc:
mkdir -p integrator/agent/pkg/agentpb
mkdir -p integrator/agent/pkg/vaultservpb
mkdir -p server/pkg/pb/agentpb
mkdir -p server/pkg/pb/climonpb
mkdir -p vaultserv/pkg/pb/vaultservpb
cd proto && protoc --go_out=../integrator/agent/pkg/agentpb/ --go_opt=paths=source_relative \
--go-grpc_out=../integrator/agent/pkg/agentpb/ --go-grpc_opt=paths=source_relative \
./agent.proto
cd proto && protoc --go_out=../integrator/agent/pkg/vaultservpb/ --go_opt=paths=source_relative \
--go-grpc_out=../integrator/agent/pkg/vaultservpb/ --go-grpc_opt=paths=source_relative \
./agent-vault.proto
cd proto && protoc --go_out=../server/pkg/pb/agentpb --go_opt=paths=source_relative \
--go-grpc_out=../server/pkg/pb/agentpb --go-grpc_opt=paths=source_relative \
./agent.proto
cd proto && protoc --go_out=../integrator/capten-sdk/agentpb/ --go_opt=paths=source_relative \
--go-grpc_out=../integrator/capten-sdk/agentpb/ --go-grpc_opt=paths=source_relative \
./agent.proto
cd proto && protoc --go_out=../server/pkg/pb/climonpb --go_opt=paths=source_relative \
--go-grpc_out=../server/pkg/pb/climonpb --go-grpc_opt=paths=source_relative \
./climon.proto
cd proto && protoc --go_out=../vaultserv/pkg/pb/vaultservpb --go_opt=paths=source_relative \
--go-grpc_out=../vaultserv/pkg/pb/vaultservpb --go-grpc_opt=paths=source_relative \
./agent-vault.proto
docker-build-server:
# The prefix for server to changed either as server or intelops-kad-server
docker build --platform=linux/amd64 -f dockerfiles/server/Dockerfile -t ${PREFIX}-${SERVER_APP_NAME}:${BUILD} .
docker-build-kad: docker-build-agent docker-build-deployment docker-build-config
docker-build-agent:
docker build -f dockerfiles/agent/Dockerfile -t ${PREFIX}-${AGENT_APP_NAME}:${BUILD} .
docker-build-deployment:
docker build -f dockerfiles/deployment-worker/Dockerfile -t ${PREFIX}-${DEPLOYMENT_WORKER_APP_NAME}:${BUILD} .
docker-build-config:
docker build -f dockerfiles/config-worker/Dockerfile -t ${PREFIX}-${CONFIG_WORKER_APP_NAME}:${BUILD} .
docker-build-climon:
docker build -f dockerfiles/climon/Dockerfile -t ${PREFIX}-${CLIMON_APP_NAME}:${BUILD} .
docker-build-vaultserv:
docker build -f dockerfiles/vaultserv/Dockerfile -t ${PREFIX}-${VAULTSERV_APP_NAME}:${BUILD} .
docker-build: docker-build-kad docker-build-server docker-build-climon docker-build-vaultserv