Skip to content

Commit

Permalink
Changed Makefile to use OM2 (#58)
Browse files Browse the repository at this point in the history
* Changed Makefile to use OM2
Reverted integration test

* Longer timeout

* Updated local minikube command
  • Loading branch information
kemurayama authored Jan 14, 2025
1 parent 119a654 commit a7cc611
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 48 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
strategy:
matrix:
k8s_version:
- "v1.26.11"
- "v1.27.8"
- "v1.28.4"
- "v1.30.0"
- "v1.31.0"
- "v1.32.0"
runs-on: ubuntu-latest
steps:
- name: Pull repo
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: make build-local
- name: Install space-agon in minikube
run: make install-local
# - name: Run integration-test
# run: |
# nohup minikube tunnel &
# make integration-test
- name: Run integration-test
run: |
nohup minikube tunnel &
make integration-test
48 changes: 11 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,11 @@ gcloud-test-cluster:
.PHONY: helm-repo-add
helm-repo-add:
helm repo add $(AGONES_NS) https://agones.dev/chart/stable
helm repo add $(OM_NS) https://open-match.dev/chart/stable
helm repo update

.PHONY: helm-repo-remove
helm-repo-remove:
helm repo remove $(AGONES_NS)
helm repo remove $(OM_NS)

# install agones in local-cluster
.PHONY: agones-install-local
Expand Down Expand Up @@ -177,48 +175,20 @@ agones-uninstall:
# install open-match in local-cluster
.PHONY: openmatch-install-local
openmatch-install-local:
helm install $(OM_NS) \
--create-namespace --namespace $(OM_NS) $(OM_NS)/open-match \
--version $(OM_VER) \
--set open-match-customize.enabled=true \
--set open-match-customize.evaluator.enabled=true \
--set open-match-customize.evaluator.replicas=1 \
--set open-match-override.enabled=true \
--set open-match-core.swaggerui.enabled=false \
--set global.kubernetes.horizontalPodAutoScaler.frontend.maxReplicas=1 \
--set global.kubernetes.horizontalPodAutoScaler.backend.maxReplicas=1 \
--set global.kubernetes.horizontalPodAutoScaler.query.minReplicas=1 \
--set global.kubernetes.horizontalPodAutoScaler.query.maxReplicas=1 \
--set global.kubernetes.horizontalPodAutoScaler.evaluator.maxReplicas=1 \
--set query.replicas=1 \
--set frontend.replicas=1 \
--set backend.replicas=1 \
--set redis.master.resources.requests.cpu=0.1 \
--set redis.replica.replicaCount=0 \
--set redis.metrics.enabled=false
kubectl apply -f redis-config.yaml
kubectl apply -f om_install.yaml

# install open-match
.PHONY: openmatch-install
openmatch-install:
helm install ${OM_NS} --create-namespace --namespace \
${OM_NS} $(OM_NS)/open-match \
--version ${OM_VER} \
--set open-match-customize.enabled=true \
--set open-match-customize.evaluator.enabled=true \
--set open-match-customize.evaluator.replicas=1 \
--set open-match-override.enabled=true \
--set open-match-core.swaggerui.enabled=false \
--set redis.sentinel.enabled=false \
--set redis.master.resources.requests.cpu=0.1 \
--set redis.master.persistence.enabled=false \
--set redis.replica.replicaCount=0 \
--set redis.metrics.enabled=false
kubectl apply -f redis-config.yaml
kubectl apply -f om_install.yaml

# uninstall open-match
.PHONY: openmatch-uninstall
openmatch-uninstall:
helm uninstall -n ${OM_NS} ${OM_NS}
kubectl delete namespace ${OM_NS}
kubectl delete -f redis-config.yaml
kubectl delete -f om_install.yaml

.PHONY: skaffold-setup-local
skaffold-setup-local:
Expand Down Expand Up @@ -289,6 +259,10 @@ install-local:
--set dedicated.autoscaler.buffer.bufferSize=1 \
--set dedicated.autoscaler.buffer.minReplicas=0 \
--set dedicated.autoscaler.buffer.maxReplicas=1 \
--set frontend.imagePullPolicy=Never \
--set mmf.imagePullPolicy=Never \
--set director.imagePullPolicy=Never \
--set dedicated.imagePullPolicy=Never \
./install/helm/space-agon

# uninstall space-agon itself
Expand All @@ -309,4 +283,4 @@ test:
# integration test
.PHONY: integration-test
integration-test:
go test -count=1 -v -timeout 60s test/integration_test.go
go test -count=1 -v -timeout 120s test/integration_test.go
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ make openmatch-install
# Start minikube
# ref: https://minikube.sigs.k8s.io/docs/commands/start/
# Or you can other dirvers
minikube start --cpus="2" --memory="4096" --kubernetes-version=v1.25.15 --driver=hyperkit
minikube start --cpus="2" --memory="4096" --kubernetes-version=v1.31.0 --driver=hyperkit

# Add Helm Repositories
make helm-repo-add
Expand Down Expand Up @@ -119,7 +119,7 @@ make install
make build-local

# Deploy Space Agon for minikube cluster
make install
make install-local
```

## View and Play
Expand Down
2 changes: 1 addition & 1 deletion install/helm/space-agon/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
containers:
- name: {{ template "frontend.name" .}}
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
imagePullPolicy: {{ .Values.frontend.image.imagePullPolicy }}
imagePullPolicy: {{ .Values.frontend.imagePullPolicy }}
ports:
- containerPort: {{ .Values.frontend.containerPort }}
env:
Expand Down
2 changes: 1 addition & 1 deletion install/helm/space-agon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ frontend:
image:
repository: local/space-agon-frontend
tag: TAG
imagePullPolicy: Always
imagePullPolicy: Always
omCoreAddress: "http://open-match-service.default.svc.cluster.local:50504"

mmf:
Expand Down

0 comments on commit a7cc611

Please sign in to comment.