-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
78 lines (62 loc) · 2.51 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
SHELL := /bin/bash
tag := latest
workerTag := latest
runnerTag := latest
setup:
bash bin/setup.sh
make k3d-up runner worker gateway proxy
# helm install beta9 deploy/charts/beta9 --create-namespace --values deploy/charts/beta9/values.local.yaml
kustomize build --enable-helm manifests/kustomize/overlays/cluster-dev | kubectl apply -f-
setup-sdk:
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$$HOME/.local/bin:$$PATH"
poetry config virtualenvs.in-project true
poetry install -C sdk
poetry shell -C sdk
k3d-up:
bash bin/k3d.sh up
k3d-down:
bash bin/k3d.sh down
k3d-rebuild:
make k3d-down
make k3d-up
kustomize build --enable-helm manifests/kustomize/overlays/cluster-dev | kubectl apply -f-
gateway:
docker build . --target build -f ./docker/Dockerfile.gateway -t localhost:5001/beta9-gateway:$(tag)
docker push localhost:5001/beta9-gateway:$(tag)
worker:
docker build . --target final --build-arg BASE_STAGE=dev -f ./docker/Dockerfile.worker -t localhost:5001/beta9-worker:$(workerTag)
docker push localhost:5001/beta9-worker:$(workerTag)
bin/delete_workers.sh
proxy:
docker build . --target build -f ./docker/Dockerfile.proxy -t localhost:5001/beta9-proxy:$(tag)
docker push localhost:5001/beta9-proxy:$(tag)
runner:
for target in py312 py311 py310 py39 py38; do \
docker build . --target $$target --platform=linux/arm64 -f ./docker/Dockerfile.runner -t localhost:5001/beta9-runner:$$target-$(runnerTag); \
docker push localhost:5001/beta9-runner:$$target-$(runnerTag); \
done
for version in "3.12" "3.11" "3.10" "3.9" "3.8"; do \
docker build . --build-arg PYTHON_VERSION=$$version --target micromamba --platform=linux/arm64 -f ./docker/Dockerfile.runner -t localhost:5001/beta9-runner:micromamba$$version-$(runnerTag); \
docker push localhost:5001/beta9-runner:micromamba$$version-$(runnerTag); \
done
start:
cd hack && okteto up --file okteto.yaml
stop:
cd hack && okteto down --file okteto.yaml
protocol:
poetry install --directory ./sdk
poetry run --no-interaction --directory ./sdk bin/gen_proto.sh
verify-protocol:
./bin/verify_proto.sh
test-pkg:
go test -v ./pkg/... -bench=./pkg/..
# build-test can be run with "local" to run extra tests when pointing to your local
# dev setup. It will also exclude custom image tests due to arm64 issues on mac.
build-test:
poetry config virtualenvs.in-project true
poetry install -C sdk
poetry shell -C sdk
cd e2e/build_tests && python app.py $(MODE)
load-test:
cd e2e/load_tests && k6 run --env URL=$(URL) --env TOKEN=$(TOKEN) throughput.js