Newer
Older
Milho001
committed
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
.PHONY: all dep build test lint
lint: dep ## Lint the files
@golint -set_exit_status ./...
test: dep ## Run unittests
@go test -cover -coverprofile=coverage.txt -covermode count ./...
dep: login ## Get the dependencies
@go get -a -v ./...
@go get google.golang.org/grpc/internal/transport@v1.37.0
@go get google.golang.org/grpc@v1.37.0
@go get -u golang.org/x/lint/golint
@go get -u github.com/boumenot/gocover-cobertura
coverage: dep
@go test -v -coverpkg=./... -coverprofile=cover.out ./...
@go tool cover -func cover.out | grep total
@go tool cover -html=cover.out -o cover.html
windows:
$(eval export GOOS := windows)
@go build -o builds/main ./cmd/query-service/
macos:
$(eval export GOOS := darwin)
@go build -o builds/main ./cmd/query-service/
linux: # Build for linux
$(eval export GOOS := linux)
CGO_ENABLED=0 go build -o builds/main ./cmd/query-service/
run:
./builds/main
develop:
$(eval export MINIO_ADDRESS := localhost:9002)
$(eval export MINIO_ACCESSKEYID := minio)
$(eval export MINIO_ACCESSKEY := StrongPass2022)
$(eval export RABBIT_USER := rabbitmq)
$(eval export RABBIT_PASSWORD := StrongPass2022)
$(eval export RABBIT_HOST := localhost)
$(eval export RABBIT_PORT := 5672)
$(eval export REDIS_ADDRESS := localhost:6379)
$(eval export QUERY_EXECUTION := neo4j)
$(eval export QUERY_CONVERSION_LANGUAGE := cypher)
$(eval export LOG_MESSAGES := false)
$(eval export LOG_LEVEL := -1)
$(eval export DEV := true)
$(eval export USER_MANAGEMENT_SERVICE_RPC := localhost:9000)
@go run cmd/query-service/main.go
docker: linux
@rm -rf ./dependencies
@cp -r ../../dependencies ./dependencies
@docker build --progress plain -t graphpolaris/query-handler-service:latest -f ./Dockerfile .
@docker push graphpolaris/query-handler-service:latest
@rm -r ./dependencies
rollout: docker
kubectl rollout restart deployment arangodb-query-service
kubectl rollout restart deployment neo4j-query-service
log:
@kubectl get pods -o wide | grep Running | grep neo4j-query-service | cut -d " " -f1 | xargs kubectl logs -f
logarango:
@kubectl get pods -o wide | grep Running | grep arangodb-query-service | cut -d " " -f1 | xargs kubectl logs -f
staging: login
make linux
@docker build -t query-service-staging:latest .
@docker tag query-service-staging:latest datastropheregistry.azurecr.io/query-service-staging:latest
@docker push datastropheregistry.azurecr.io/query-service-staging:latest
login:
echo -e "machine git.science.uu.nl\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
documentation:
godoc -goroot ~/Developer/go
# wget -r -np -N -E -p -k http://localhost:6060/pkg/query-service?m=all