forked from retaildevcrews/ngsa-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.69 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
SHELL=/bin/bash
.PHONY: build-ngsa-app create delete
all: create deploy-ngsa-memory
delete:
@k3d cluster delete ngsa-app
create: delete
@k3d cluster create ngsa-app --registry-use k3d-registry.localhost:5000 --config deploy/k3d.yaml --k3s-arg "--no-deploy=traefik@server:0"
@kubectl wait node --for condition=ready --all --timeout=60s
@sleep 5
@kubectl wait pod -A --all --for condition=ready --timeout=60s
@istioctl install -y --set profile=demo -f deploy/istio-operator.yaml
@kubectl create namespace ngsa
@kubectl label namespace ngsa istio-injection=enabled --overwrite
build-ngsa-app:
docker build . -t localhost:5000/ngsa-app:local
docker push localhost:5000/ngsa-app:local
delete-ngsa-deploys:
-@kubectl delete --ignore-not-found -f deploy/ngsa-memory.yaml
-@kubectl delete --ignore-not-found -f deploy/ngsa-cosmos.yaml
-@kubectl delete --ignore-not-found secret ngsa-secrets -n ngsa
deploy-ngsa-cosmos: build-ngsa-app delete-ngsa-deploys
@kubectl create secret generic ngsa-secrets -n ngsa \
--from-file=CosmosDatabase=secrets/CosmosDatabase \
--from-file=CosmosCollection=secrets/CosmosCollection \
--from-file=CosmosKey=secrets/CosmosKey \
--from-file=CosmosUrl=secrets/CosmosUrl
@kubectl apply -f deploy/ngsa-cosmos.yaml
deploy-ngsa-memory: build-ngsa-app delete-ngsa-deploys
@kubectl apply -f deploy/ngsa-memory.yaml
check:
@http http://localhost:30000/version
@http http://localhost:30080/version
test-baseline:
@docker run -it --rm --net=host ghcr.io/retaildevcrews/ngsa-lr:beta --server localhost:30080 --files baseline.json
test-benchmark:
@docker run -it --rm --net=host ghcr.io/retaildevcrews/ngsa-lr:beta --server localhost:30080 --files benchmark.json