mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-25 13:24:18 +00:00
Merge demo chart into open-match chart. Also create a open-match repository. (#565)
This commit is contained in:
1
.github/ISSUE_TEMPLATE/release.md
vendored
1
.github/ISSUE_TEMPLATE/release.md
vendored
@ -138,7 +138,6 @@ TODO: Add guidelines for labeling issues.
|
||||
- [ ] Run `./docs/governance/templates/release.sh {source version tag} {version}` to copy the images to open-match-public-images.
|
||||
- [ ] If this is a new minor version in the newest major version then run `./docs/governance/templates/release.sh {source version tag} latest`.
|
||||
- [ ] Copy the files from `build/release/` generated from `make release` to the release draft you created. You can drag and drop the files using the Github UI.
|
||||
- [ ] Run `make REGISTRY=gcr.io/open-match-public-images TAG={version} delete-gke-cluster create-gke-cluster push-helm sleep-10 install-chart install-demo-chart` and verify that the demo runs correctly.
|
||||
- [ ] Run `make delete-gke-cluster create-gke-cluster` and run through the instructions under the [README](readme-deploy), verify the pods are healthy. You'll need to adjust the path to the `build/release/install.yaml` and `build/release/install-demo.yaml` in your local clone since you haven't published them yet.
|
||||
- [ ] Open the [`README.md`](readme-deploy) update the version references and submit. (Release candidates can ignore this step.)
|
||||
- [ ] Publish the [Release](om-release) in Github.
|
||||
|
93
Makefile
93
Makefile
@ -71,7 +71,8 @@ HTMLTEST_VERSION = 0.10.3
|
||||
GOLANGCI_VERSION = 1.17.1
|
||||
KIND_VERSION = 0.3.0
|
||||
SWAGGERUI_VERSION = 3.22.3
|
||||
TERRAFORM_VERSION = 0.12.1
|
||||
TERRAFORM_VERSION = 0.12.2
|
||||
CHART_TESTING_VERSION = 2.3.3
|
||||
|
||||
ENABLE_SECURITY_HARDENING = 0
|
||||
GO = GO111MODULE=on go
|
||||
@ -119,10 +120,10 @@ TERRAFORM = $(TOOLCHAIN_BIN)/terraform$(EXE_EXTENSION)
|
||||
SKAFFOLD = $(TOOLCHAIN_BIN)/skaffold$(EXE_EXTENSION)
|
||||
CERTGEN = $(TOOLCHAIN_BIN)/certgen$(EXE_EXTENSION)
|
||||
GOLANGCI = $(TOOLCHAIN_BIN)/golangci-lint$(EXE_EXTENSION)
|
||||
CHART_TESTING = $(TOOLCHAIN_BIN)/ct$(EXE_EXTENSION)
|
||||
GCLOUD = gcloud --quiet
|
||||
OPEN_MATCH_CHART_NAME = open-match
|
||||
OPEN_MATCH_KUBERNETES_NAMESPACE = open-match
|
||||
OPEN_MATCH_DEMO_CHART_NAME = open-match-demo
|
||||
OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE = open-match
|
||||
OPEN_MATCH_SECRETS_DIR = $(REPOSITORY_ROOT)/install/helm/open-match/secrets
|
||||
REDIS_NAME = om-redis
|
||||
@ -173,6 +174,7 @@ ifeq ($(OS),Windows_NT)
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-windows-amd64.zip
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-windows-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_windows_amd64.zip
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_windows_amd64.zip
|
||||
SED_REPLACE = sed -i
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
@ -187,6 +189,7 @@ else
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-linux-amd64.tar.gz
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-linux-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_linux_amd64.zip
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_linux_amd64.tar.gz
|
||||
SED_REPLACE = sed -i
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
@ -200,6 +203,7 @@ else
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-darwin-amd64.tar.gz
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-darwin-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_darwin_amd64.zip
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_darwin_amd64.tar.gz
|
||||
SED_REPLACE = sed -i ''
|
||||
endif
|
||||
endif
|
||||
@ -298,11 +302,26 @@ install-redis: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
update-chart-deps: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm/open-match; $(HELM) repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com; $(HELM) dependency update)
|
||||
|
||||
lint-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) lint $(OPEN_MATCH_CHART_NAME); $(HELM) lint $(OPEN_MATCH_DEMO_CHART_NAME))
|
||||
lint-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/ct$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) lint $(OPEN_MATCH_CHART_NAME))
|
||||
$(CHART_TESTING) lint --all --chart-yaml-schema $(TOOLCHAIN_BIN)/etc/chart_schema.yaml --lint-conf $(TOOLCHAIN_BIN)/etc/lintconf.yaml --chart-dirs $(REPOSITORY_ROOT)/install/helm/
|
||||
$(CHART_TESTING) lint-and-install --all --chart-yaml-schema $(TOOLCHAIN_BIN)/etc/chart_schema.yaml --lint-conf $(TOOLCHAIN_BIN)/etc/lintconf.yaml --chart-dirs $(REPOSITORY_ROOT)/install/helm/
|
||||
|
||||
print-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) install --name $(OPEN_MATCH_CHART_NAME) --dry-run --debug $(OPEN_MATCH_CHART_NAME); $(HELM) install --name $(OPEN_MATCH_DEMO_CHART_NAME) --dry-run --debug $(OPEN_MATCH_DEMO_CHART_NAME))
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) install --name $(OPEN_MATCH_CHART_NAME) --dry-run --debug $(OPEN_MATCH_CHART_NAME))
|
||||
build/chart/open-match-$(BASE_VERSION).tgz: build/toolchain/bin/helm$(EXE_EXTENSION) lint-chart
|
||||
mkdir -p $(BUILD_DIR)/chart/
|
||||
$(HELM) init --client-only
|
||||
$(HELM) package -d $(BUILD_DIR)/chart/ --version $(BASE_VERSION) $(REPOSITORY_ROOT)/install/helm/open-match
|
||||
|
||||
build/chart/index.yaml: build/toolchain/bin/helm$(EXE_EXTENSION) gcloud build/chart/open-match-$(BASE_VERSION).tgz
|
||||
-gsutil cp gs://open-match-chart/chart/index.yaml $(BUILD_DIR)/chart-index/
|
||||
$(HELM) repo index --merge $(BUILD_DIR)/chart/index.yaml $(BUILD_DIR)/chart/
|
||||
|
||||
build/chart/index.yaml.$(YEAR_MONTH_DAY): build/chart/index.yaml
|
||||
cp $(BUILD_DIR)/chart/index.yaml $(BUILD_DIR)/chart/index.yaml.$(YEAR_MONTH_DAY)
|
||||
|
||||
build/chart/: build/chart/index.yaml build/chart/index.yaml.$(YEAR_MONTH_DAY)
|
||||
|
||||
install-large-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) upgrade $(OPEN_MATCH_CHART_NAME) --install --wait --debug install/helm/open-match \
|
||||
@ -330,15 +349,6 @@ install-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set openmatch.monitoring.stackdriver.enabled=true \
|
||||
--set openmatch.monitoring.stackdriver.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
|
||||
install-demo-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) upgrade $(OPEN_MATCH_DEMO_CHART_NAME) --install --wait --debug install/helm/open-match-demo \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG)
|
||||
|
||||
delete-demo-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
-$(HELM) delete --purge $(OPEN_MATCH_DEMO_CHART_NAME)
|
||||
|
||||
dry-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) upgrade --install --wait --debug --dry-run $(OPEN_MATCH_CHART_NAME) install/helm/open-match \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
@ -363,6 +373,8 @@ install/yaml/01-redis-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=true \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
@ -391,6 +403,8 @@ install/yaml/03-prometheus-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=true \
|
||||
--set grafana.enabled=false \
|
||||
@ -407,6 +421,8 @@ install/yaml/04-grafana-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=true \
|
||||
@ -423,6 +439,8 @@ install/yaml/05-jaeger-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
@ -434,6 +452,8 @@ install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=true \
|
||||
--set prometheus.enabled=true \
|
||||
--set grafana.enabled=true \
|
||||
@ -442,10 +462,22 @@ install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
|
||||
install/yaml/install-demo.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_DEMO_CHART_NAME) --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) \
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
install/helm/open-match-demo > install/yaml/install-demo.yaml
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demo.install=true \
|
||||
--set openmatch.demofunction.install=true \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
install/helm/open-match > install/yaml/install-demo.yaml
|
||||
|
||||
set-redis-password:
|
||||
@stty -echo; \
|
||||
@ -472,6 +504,17 @@ endif
|
||||
mv $(TOOLCHAIN_DIR)/temp-helm/tiller$(EXE_EXTENSION) $(TILLER)
|
||||
rm -rf $(TOOLCHAIN_DIR)/temp-helm/
|
||||
|
||||
build/toolchain/bin/ct$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
mkdir -p $(TOOLCHAIN_DIR)/temp-charttesting
|
||||
ifeq ($(suffix $(CHART_TESTING_PACKAGE)),.zip)
|
||||
cd $(TOOLCHAIN_DIR)/temp-charttesting && curl -Lo charttesting.zip $(CHART_TESTING_PACKAGE) && unzip -j -q -o charttesting.zip
|
||||
else
|
||||
cd $(TOOLCHAIN_DIR)/temp-charttesting && curl -Lo charttesting.tar.gz $(CHART_TESTING_PACKAGE) && tar xzf charttesting.tar.gz
|
||||
endif
|
||||
mv $(TOOLCHAIN_DIR)/temp-charttesting/* $(TOOLCHAIN_BIN)
|
||||
rm -rf $(TOOLCHAIN_DIR)/temp-charttesting/
|
||||
|
||||
build/toolchain/bin/minikube$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
curl -Lo $(MINIKUBE) $(MINIKUBE_PACKAGE)
|
||||
@ -697,7 +740,7 @@ golangci: build/toolchain/bin/golangci-lint$(EXE_EXTENSION)
|
||||
|
||||
lint: fmt vet golangci lint-chart
|
||||
|
||||
assets: all-protos tls-certs third_party/
|
||||
assets: all-protos tls-certs third_party/ build/chart/
|
||||
|
||||
all: service-binaries example-binaries tools-binaries
|
||||
|
||||
@ -776,12 +819,15 @@ build/certificates/: build/toolchain/bin/certgen$(EXE_EXTENSION)
|
||||
md-test: docker
|
||||
docker run -t --rm -v $(CURDIR):/mnt:ro dkhamsing/awesome_bot --white-list "localhost,github.com/googleforgames/open-match/tree/release-,github.com/googleforgames/open-match/blob/release-,github.com/googleforgames/open-match/releases/download/v" --allow-dupe --allow-redirect --skip-save-results `find . -type f -name '*.md' -not -path './build/*' -not -path './.git*'`
|
||||
|
||||
ci-deploy-artifacts: install/yaml/ swagger-json-docs gcloud
|
||||
ci-deploy-artifacts: install/yaml/ swagger-json-docs build/chart/ gcloud
|
||||
ifeq ($(_GCB_POST_SUBMIT),1)
|
||||
gsutil cp -a public-read $(REPOSITORY_ROOT)/install/yaml/* gs://open-match-chart/install/v$(BASE_VERSION)/yaml/
|
||||
gsutil cp -a public-read $(REPOSITORY_ROOT)/api/*.json gs://open-match-chart/api/v$(BASE_VERSION)/
|
||||
# TODO Add Helm Artifacts later.
|
||||
# Example: https://github.com/GoogleCloudPlatform/agones/blob/3b324a74e5e8f7049c2169ec589e627d4c8cab79/build/Makefile#L211
|
||||
# Deploy Helm Chart
|
||||
# Since each build will refresh just it's version we can allow this for every post submit.
|
||||
# Copy the files into multiple locations to keep a backup.
|
||||
gsutil cp -a public-read $(BUILD_DIR)/chart/*.* gs://open-match-chart/chart/by-hash/$(VERSION)/
|
||||
gsutil cp -a public-read $(BUILD_DIR)/chart/*.* gs://open-match-chart/chart/
|
||||
else
|
||||
@echo "Not deploying build artifacts to open-match.dev because this is not a post commit change."
|
||||
endif
|
||||
@ -832,6 +878,9 @@ clean-build: clean-toolchain clean-archives clean-release
|
||||
clean-toolchain:
|
||||
rm -rf $(TOOLCHAIN_DIR)/
|
||||
|
||||
clean-chart:
|
||||
rm -rf $(BUILD_DIR)/chart/
|
||||
|
||||
clean-archives:
|
||||
rm -rf $(BUILD_DIR)/archives/
|
||||
|
||||
@ -848,7 +897,7 @@ clean-swagger-docs:
|
||||
clean-swaggerui:
|
||||
rm -rf $(REPOSITORY_ROOT)/third_party/swaggerui/
|
||||
|
||||
clean: clean-images clean-binaries clean-release clean-build clean-protos clean-swagger-docs clean-install-yaml clean-stress-test-tools clean-secrets clean-swaggerui clean-terraform
|
||||
clean: clean-images clean-binaries clean-release clean-chart clean-build clean-protos clean-swagger-docs clean-install-yaml clean-stress-test-tools clean-secrets clean-swaggerui clean-terraform
|
||||
|
||||
proxy-frontend: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Frontend Health: http://localhost:$(FRONTEND_PORT)/healthz"
|
||||
@ -891,7 +940,7 @@ proxy-ui: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
|
||||
proxy-demo: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "View Demo: http://localhost:$(DEMO_PORT)"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) --selector="app=open-match-demo,component=demo,release=$(OPEN_MATCH_DEMO_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(DEMO_PORT):51507 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) --selector="app=open-match-demo,component=demo,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(DEMO_PORT):51507 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
# Run `make proxy` instead to run everything at the same time.
|
||||
# If you run this directly it will just run each proxy sequentially.
|
||||
|
@ -120,14 +120,6 @@ steps:
|
||||
path: '/go'
|
||||
waitFor: ['Build: Assets', 'Build: Deployment Configs']
|
||||
|
||||
- id: 'Deploy: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', '_GCB_POST_SUBMIT=${_GCB_POST_SUBMIT}', '_GCB_LATEST_VERSION=${_GCB_LATEST_VERSION}', 'VERSION_SUFFIX=${SHORT_SHA}', 'BRANCH_NAME=${BRANCH_NAME}', 'ci-deploy-artifacts']
|
||||
waitFor: ['Lint: Format, Vet, Charts', 'Build: Binaries']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
|
||||
- id: 'Test: Delete Old Clusters'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GCP_PROJECT_ID=${PROJECT_ID}', 'ci-reap-clusters']
|
||||
@ -140,7 +132,7 @@ steps:
|
||||
|
||||
- id: 'Test: Deploy Open Match'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'sleep-30', 'install-chart', 'install-demo-chart']
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'sleep-30', 'install-chart']
|
||||
waitFor: ['Test: Create Cluster', 'Build: Docker Images']
|
||||
|
||||
- id: 'Test: Delete Cluster'
|
||||
@ -148,6 +140,14 @@ steps:
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'GCLOUD_EXTRA_FLAGS=--async', 'delete-gke-cluster']
|
||||
waitFor: ['Test: Deploy Open Match']
|
||||
|
||||
- id: 'Deploy: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', '_GCB_POST_SUBMIT=${_GCB_POST_SUBMIT}', '_GCB_LATEST_VERSION=${_GCB_LATEST_VERSION}', 'VERSION_SUFFIX=${SHORT_SHA}', 'BRANCH_NAME=${BRANCH_NAME}', 'ci-deploy-artifacts']
|
||||
waitFor: ['Lint: Format, Vet, Charts', 'Test: Deploy Open Match']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
|
||||
artifacts:
|
||||
objects:
|
||||
location: gs://open-match-build-artifacts/output/
|
||||
|
@ -12,14 +12,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/examples/demo
|
||||
WORKDIR /go/src/open-match.dev/open-match/examples/demo
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o demo .
|
||||
|
||||
FROM gcr.io/distroless/static
|
||||
FROM gcr.io/distroless/static
|
||||
COPY --from=builder /go/src/open-match.dev/open-match/examples/demo/demo .
|
||||
|
||||
ADD ./examples/demo/static /static
|
||||
ADD ./examples/demo/static /static
|
||||
|
||||
ENTRYPOINT ["/demo"]
|
||||
ENTRYPOINT ["/demo"]
|
||||
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "0.0.0-dev"
|
||||
version: 0.0.0-dev
|
||||
name: open-match-demo
|
||||
description: Flexible, extensible, and scalable video game matchmaking.
|
||||
keywords:
|
||||
- kubernetes
|
||||
- game-development
|
||||
- multiplayer
|
||||
- matchmaking
|
||||
- go
|
||||
- golang
|
||||
home: https://github.com/googleforgames/open-match
|
||||
sources:
|
||||
- https://github.com/googleforgames/open-match
|
||||
maintainers:
|
||||
- name: open-match
|
||||
email: open-match-discuss@googlegroups.com
|
||||
url: https://groups.google.com/forum/#!forum/open-match-discuss
|
||||
engine: gotpl
|
||||
icon: https://raw.githubusercontent.com/googleforgames/open-match/master/site/static/images/logo.svg
|
||||
tillerVersion: ">2.10.0"
|
@ -1,14 +0,0 @@
|
||||
Open Match Example Helm Chart
|
||||
=============================
|
||||
|
||||
This chart installs the Open Match example clientloadgen, frontendclient, backendclient, and example MMF and evaluator.
|
||||
|
||||
To deploy this chart run:
|
||||
|
||||
```bash
|
||||
helm upgrade --install --wait --debug open-match-example
|
||||
install/helm/open-match-example \
|
||||
--namespace=open-match \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG)
|
||||
```
|
@ -1,3 +0,0 @@
|
||||
The Open Match demo has been installed in the namespace {{ .Release.Namespace }}.
|
||||
|
||||
You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get pods,svc'
|
@ -1,48 +0,0 @@
|
||||
{*
|
||||
Copyright 2019 Google LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*}
|
||||
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "openmatch.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "openmatch.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "openmatch.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
@ -1,91 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.function.install }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: om-function
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: function
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.function.grpc.port }}
|
||||
- name: proxy
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.function.proxy.port }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: om-function
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: function
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: function
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: function
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
containers:
|
||||
- name: om-function
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.function.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.openmatch.image.function.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: om-config-volume
|
||||
mountPath: {{ .Values.openmatch.config.matchmaker }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.openmatch.function.grpc.port }}
|
||||
- name: proxy
|
||||
containerPort: {{ .Values.openmatch.function.proxy.port }}
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.openmatch.metrics.port }}
|
||||
env:
|
||||
- name: REDIS_SERVICE_HOST
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_HOST)"
|
||||
- name: REDIS_SERVICE_PORT
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_PORT)"
|
||||
volumes:
|
||||
- name: om-config-volume
|
||||
configMap:
|
||||
name: om-configmap
|
||||
{{- end }}
|
@ -1,44 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
openmatch:
|
||||
metrics:
|
||||
prometheusEnabled: true
|
||||
prometheusServiceDiscovery: true
|
||||
stackdriverEnabled: false
|
||||
stackdriverProjectID: ""
|
||||
port: 9555
|
||||
path: "/metrics"
|
||||
function:
|
||||
install: true
|
||||
grpc:
|
||||
port: 50502
|
||||
proxy:
|
||||
port: 51502
|
||||
demo:
|
||||
install: true
|
||||
http:
|
||||
port: 51507
|
||||
config:
|
||||
matchmaker: /config
|
||||
testprofile: /profiles
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.0.0-dev
|
||||
function:
|
||||
name: openmatch-mmf-go-soloduel
|
||||
pullPolicy: Always
|
||||
demo:
|
||||
name: openmatch-demo
|
||||
pullPolicy: Always
|
@ -20,6 +20,7 @@ metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
@ -37,43 +38,52 @@ metadata:
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: {{ .Values.openmatch.demo.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.openmatch.demo.http.port "prometheus" .Values.openmatch.monitoring.prometheus) | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
chart: {{ template "openmatch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
spec:
|
||||
serviceAccountName: open-match-unprivileged-service
|
||||
containers:
|
||||
- name: om-demo
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.demo.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.openmatch.image.demo.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: om-config-volume
|
||||
mountPath: {{ .Values.openmatch.config.matchmaker }}
|
||||
mountPath: {{ .Values.openmatch.config.mountPath }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.demo.http.port }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.openmatch.demo.http.port) | nindent 8 }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.demo.http.port }}
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.openmatch.metrics.port }}
|
||||
env:
|
||||
- name: REDIS_SERVICE_HOST
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_HOST)"
|
||||
- name: REDIS_SERVICE_PORT
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_PORT)"
|
||||
{{- if .Values.redis.usePassword }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.redis.fullnameOverride }}
|
||||
key: redis-password
|
||||
{{- end}}
|
||||
volumes:
|
||||
- name: om-config-volume
|
||||
configMap:
|
100
install/helm/open-match/templates/demofunction.yaml
Normal file
100
install/helm/open-match/templates/demofunction.yaml
Normal file
@ -0,0 +1,100 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.demofunction.install }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: om-demofunction
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demofunction
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.demofunction.grpc.port }}
|
||||
- name: proxy
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.demofunction.http.port }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: om-demofunction
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demofunction
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
replicas: {{ .Values.openmatch.demofunction.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demofunction
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.openmatch.demofunction.http.port "prometheus" .Values.openmatch.monitoring.prometheus) | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demofunction
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
spec:
|
||||
serviceAccountName: open-match-unprivileged-service
|
||||
containers:
|
||||
- name: om-demofunction
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.demofunction.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.openmatch.image.demofunction.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: om-config-volume
|
||||
mountPath: {{ .Values.openmatch.config.mountPath }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.openmatch.demofunction.grpc.port }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.demofunction.http.port }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.openmatch.demofunction.http.port) | nindent 8 }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
env:
|
||||
- name: REDIS_SERVICE_HOST
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_HOST)"
|
||||
- name: REDIS_SERVICE_PORT
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_PORT)"
|
||||
{{- if .Values.redis.usePassword }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.redis.fullnameOverride }}
|
||||
key: redis-password
|
||||
{{- end}}
|
||||
volumes:
|
||||
- name: om-config-volume
|
||||
configMap:
|
||||
name: om-configmap
|
||||
{{- end }}
|
@ -12,6 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.demofunction.install }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@ -25,3 +26,4 @@ metadata:
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{- (.Files.Glob "config/backendclient/testprofile.json").AsConfig | nindent 2 }}
|
||||
{{- end }}
|
@ -59,17 +59,25 @@ openmatch:
|
||||
port: 50506
|
||||
http:
|
||||
port: 51506
|
||||
functions:
|
||||
replicas: 3
|
||||
grpc:
|
||||
port: 50502
|
||||
http:
|
||||
port: 51502
|
||||
swaggerui:
|
||||
install: true
|
||||
replicas: 3
|
||||
http:
|
||||
port: 50500
|
||||
demofunction:
|
||||
install: true
|
||||
grpc:
|
||||
port: 50502
|
||||
http:
|
||||
port: 51502
|
||||
replicas: 3
|
||||
demo:
|
||||
# TODO: Change to true once the demo is available.
|
||||
# It's currently missing liveness/readiness checks.
|
||||
install: false
|
||||
http:
|
||||
port: 51507
|
||||
replicas: 3
|
||||
|
||||
config:
|
||||
install: true
|
||||
@ -115,8 +123,8 @@ openmatch:
|
||||
grpcport: "{{.Values.openmatch.synchronizer.grpc.port}}"
|
||||
httpport: "{{.Values.openmatch.synchronizer.http.port}}"
|
||||
functions:
|
||||
grpcport: "{{.Values.openmatch.functions.grpc.port}}"
|
||||
httpport: "{{.Values.openmatch.functions.http.port}}"
|
||||
grpcport: "{{.Values.openmatch.demofunction.grpc.port}}"
|
||||
httpport: "{{.Values.openmatch.demofunction.http.port}}"
|
||||
|
||||
synchronizer:
|
||||
pollIntervalMs: 1000
|
||||
@ -214,6 +222,12 @@ openmatch:
|
||||
swaggerui:
|
||||
name: openmatch-swaggerui
|
||||
pullPolicy: Always
|
||||
demofunction:
|
||||
name: openmatch-mmf-go-soloduel
|
||||
pullPolicy: Always
|
||||
demo:
|
||||
name: openmatch-demo
|
||||
pullPolicy: Always
|
||||
|
||||
# https://hub.helm.sh/charts/stable/redis
|
||||
# https://github.com/helm/charts/tree/master/stable/redis
|
||||
|
Reference in New Issue
Block a user