-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 1.37 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
ENV_FILE := .env
include ${ENV_FILE}
export $(shell sed 's/=.*//' ${ENV_FILE})
oc_login:
oc login ${OC_URL} -u ${OC_USER} -p ${OC_PASSWORD} --insecure-skip-tls-verify=true
build-image:
sh build.sh
docker build -t ${IMAGE} .
push-image:
@echo Push Image
docker push ${IMAGE}
delete-namespace:
oc delete project ${NAMESPACE} --ignore-not-found=true
create-namespace:
oc new-project ${NAMESPACE}
run-locally:
docker run --rm=true -e GUESSES=${GUESSES} -e SOCKET_ADDRESS=${SOCKET_ADDRESS} -e USERS=${USERS} -e PERCENT_BAD_GUESSES=${PERCENT_BAD_GUESSES} -e SIMULATION=${SIMULATION} -e WS_PROTOCOL=${WS_PROTOCOL} ${IMAGE}
deploy-load-test:
oc project ${NAMESPACE}
oc process -f openshift/template.yaml -p $ USERS=${USERS} NAMESPACE=${NAMESPACE} GUESSES=${GUESSES} PERCENT_BAD_GUESSES=${PERCENT_BAD_GUESSES} IMAGE=${IMAGE} REPLICAS=${REPLICAS} SOCKET_ADDRESS=${SOCKET_ADDRESS} SIMULATION=${SIMULATION} WS_PROTOCOL=${WS_PROTOCOL} | oc apply -f -
remove-load-test:
oc project ${NAMESPACE}
oc process -f openshift/template.yaml -p $ USERS=${USERS} NAMESPACE=${NAMESPACE} GUESSES=${GUESSES} PERCENT_BAD_GUESSES=${PERCENT_BAD_GUESSES} IMAGE=${IMAGE} REPLICAS=${REPLICAS} SOCKET_ADDRESS=${SOCKET_ADDRESS} SIMULATION=${SIMULATION} WS_PROTOCOL=${WS_PROTOCOL} | oc delete -f -
report:
oc project ${NAMESPACE}
oc get pods -o name | xargs -n 1 oc logs --tail=50 > logs/${NAMESPACE}.log