-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
98 lines (94 loc) · 3.94 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
#!make
SHELL:=/bin/bash
deploy.lock-manager:
bash -c '\
cd lock-manager; \
set -o allexport; source .env; set +o allexport; \
echo "Deploying $$SERVICE_NAME".; \
CHART_PACKAGE="$$SERVICE_NAME-0.1.0.tgz"; \
helm package ./deployment/helm --debug --app-version=$$IMAGE_TAG; \
helm upgrade --install \
--atomic \
--timeout 60s \
--namespace $$K8S_NAMESPACE \
--set CONTAINER_PORT=$$CONTAINER_PORT \
--set ENABLE_INGRESS=$$ENABLE_INGRESS \
--set EXTERNAL_SECRET_DB_PATH=$$EXTERNAL_SECRET_DB_PATH \
--set SECRET_STORE_NAME=$$SECRET_STORE_NAME \
--set IMAGE_TAG=$$IMAGE_TAG \
--set SERVICE_NAME=$$SERVICE_NAME \
--set PG_MIN_POOL_SIZE=$$PG_MIN_POOL_SIZE \
--set PGDATABASE=$$PGDATABASE \
--set PGHOST=$$PGHOST \
--set PGPORT=$$PGPORT \
--set PGUSER=$$PGUSER \
--set PGPASSWORD=$$PGPASSWORD \
--set PIT_LOCK_MANAGER_DEPLOY_DEV_SECRET_STORE=$$PIT_LOCK_MANAGER_DEPLOY_DEV_SECRET_STORE \
--set pod.repository=$$REGISTRY_URL/$$SERVICE_NAME \
--set webApp.contextRoot=$$K8S_NAMESPACE.$$WEB_APP_CONTEXT_ROOT \
$$SERVICE_NAME ./$$CHART_PACKAGE; \
rm $$CHART_PACKAGE; \
kubectl -n $$K8S_NAMESPACE port-forward service/$$SERVICE_NAME $$SERVICE_PORT:http'
deploy.node-1:
bash -c '\
cd examples/node-1; \
set -o allexport; source .env; set +o allexport; \
echo "Deploying $$SERVICE_NAME".; \
CHART_PACKAGE="$$SERVICE_NAME-0.1.0.tgz"; \
helm package ./deployment/helm --debug --app-version=$$IMAGE_TAG; \
helm upgrade --install \
--atomic \
--timeout 60s \
--namespace $$K8S_NAMESPACE \
--set image.tag=$$IMAGE_TAG \
--set pod.repository=$$REGISTRY_URL/$$SERVICE_NAME \
--set service.port=$$SERVICE_PORT \
$$SERVICE_NAME ./$$CHART_PACKAGE; \
rm $$CHART_PACKAGE; \
kubectl -n $$K8S_NAMESPACE port-forward service/$$SERVICE_NAME $$SERVICE_PORT:http'
deploy.node-1-test-app:
bash -c '\
cd examples/node-1/pit-test-app; \
set -o allexport; source ../.env; set +o allexport; \
echo "Deploying $$TEST_APP_SERVICE_NAME".; \
CHART_PACKAGE="$$TEST_APP_SERVICE_NAME-0.1.0.tgz"; \
helm package ./deployment/helm --debug --app-version=$$IMAGE_TAG; \
helm upgrade --install \
--atomic \
--timeout 60s \
--namespace $$K8S_NAMESPACE \
--set image.tag=$$IMAGE_TAG \
--set pod.repository=$$REGISTRY_URL/$$TEST_APP_SERVICE_NAME \
--set service.port=$$TEST_APP_SERVICE_PORT \
--set container.port=$$TEST_APP_CONTAINER_PORT \
--set environment.TARGET_SERVICE_URL="http://$$SERVICE_NAME:$$SERVICE_PORT" \
--set webApp.contextRoot="$$K8S_NAMESPACE.$$TEST_APP_SERVICE_NAME" \
$$TEST_APP_SERVICE_NAME ./$$CHART_PACKAGE; \
rm $$CHART_PACKAGE; \
echo ""; \
echo "Test app is available on http://localhost:80/$$K8S_NAMESPACE.$$TEST_APP_SERVICE_NAME"'
#kubectl -n $$K8S_NAMESPACE port-forward service/$$TEST_APP_SERVICE_NAME $$TEST_APP_SERVICE_PORT:http'
deploy.graph-perf-test-app:
bash -c '\
cd examples/graph-perf-test-app; \
cat .env > .env-tmp; echo "" >> .env-tmp; \
cat ../node-1/.env | sed s/=/_NODE_1=/ | grep -e "^SERVICE_NAME_NODE_1.*" >> .env-tmp; \
cat ../node-1/.env | sed s/=/_NODE_1=/ | grep -e "^SERVICE_PORT_NODE_1.*" >> .env-tmp; \
cat .env-tmp; \
set -o allexport; source .env-tmp; set +o allexport; rm .env-tmp; \
echo "Deploying $$SERVICE_NAME".; \
CHART_PACKAGE="$$SERVICE_NAME-0.1.0.tgz"; \
helm package ./deployment/helm --debug --app-version=$$IMAGE_TAG; \
helm upgrade --install \
--timeout 60s \
--namespace $$K8S_NAMESPACE \
--set image.tag=$$IMAGE_TAG \
--set pod.repository=$$REGISTRY_URL/$$SERVICE_NAME \
--set service.port=$$SERVICE_PORT \
--set environment.TARGET_SERVICE_URL="http://$$SERVICE_NAME_NODE_1:$$SERVICE_PORT_NODE_1" \
--set webApp.contextRoot=$$K8S_NAMESPACE.$$SERVICE_NAME \
$$SERVICE_NAME ./$$CHART_PACKAGE; \
rm $$CHART_PACKAGE; \
echo ""; \
echo "Test app is available on http://localhost:80/$$K8S_NAMESPACE.$$SERVICE_NAME"'
#kubectl -n $$K8S_NAMESPACE port-forward service/$$SERVICE_NAME $$SERVICE_PORT:http'