Distinguish between example and demo. (#488)

There will be many example MMFs, but we specifically want an runnable demo. (the demo is an example, but not all examples are the demo.)

I change the install/helm from example to demo, as it now specifically only installs the demo. Changes in the Makefile to reflect that.
I also add new make commands to build and push the demo images. Currently it only contains the example mmf, but it will in the near future contain the demo driver image.

Tested = Created a GKE cluster and installed via the make commands.
This commit is contained in:
Scott Redig
2019-06-04 16:52:55 -07:00
committed by GitHub
parent 3517b7725c
commit e8b2525262
11 changed files with 26 additions and 22 deletions

View File

@ -138,8 +138,8 @@ 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-example-chart` and verify that the pods are all healthy.
- [ ] 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-example.yaml` in your local clone since you haven't published them yet.
- [ ] 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.

View File

@ -107,8 +107,8 @@ HTMLTEST = $(TOOLCHAIN_BIN)/htmltest
KIND = $(TOOLCHAIN_BIN)/kind
OPEN_MATCH_CHART_NAME = open-match
OPEN_MATCH_KUBERNETES_NAMESPACE = open-match
OPEN_MATCH_EXAMPLE_CHART_NAME = open-match-example
OPEN_MATCH_EXAMPLE_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
GCLOUD_ACCOUNT_EMAIL = $(shell gcloud auth list --format yaml | grep account: | cut -c 10-)
@ -213,7 +213,9 @@ push-evaluator-image: docker build-evaluator-image
docker push $(REGISTRY)/openmatch-evaluator:$(TAG)
docker push $(REGISTRY)/openmatch-evaluator:$(ALTERNATE_TAG)
push-example-images: push-mmf-example-images
push-example-images: push-demo-images push-mmf-example-images
push-demo-images: push-mmf-go-simple-image
push-mmf-example-images: push-mmf-go-simple-image
@ -243,7 +245,9 @@ build-minimatch-image: docker build-base-build-image
build-evaluator-image: docker build-base-build-image
docker build -f cmd/evaluator/Dockerfile $(IMAGE_BUILD_ARGS) -t $(REGISTRY)/openmatch-evaluator:$(TAG) -t $(REGISTRY)/openmatch-evaluator:$(ALTERNATE_TAG) .
build-example-images: build-mmf-example-images
build-example-images: build-demo-images build-mmf-example-images
build-demo-images: build-mmf-go-simple-image
build-mmf-example-images: build-mmf-go-simple-image
@ -266,10 +270,10 @@ update-chart-deps: build/toolchain/bin/helm$(EXE_EXTENSION)
(cd 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 install/helm; $(HELM) lint $(OPEN_MATCH_CHART_NAME); $(HELM) lint $(OPEN_MATCH_EXAMPLE_CHART_NAME))
(cd install/helm; $(HELM) lint $(OPEN_MATCH_CHART_NAME); $(HELM) lint $(OPEN_MATCH_DEMO_CHART_NAME))
print-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
(cd install/helm; $(HELM) install --name $(OPEN_MATCH_CHART_NAME) --dry-run --debug $(OPEN_MATCH_CHART_NAME); $(HELM) install --name $(OPEN_MATCH_EXAMPLE_CHART_NAME) --dry-run --debug $(OPEN_MATCH_EXAMPLE_CHART_NAME))
(cd 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))
install-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
$(HELM) upgrade $(OPEN_MATCH_CHART_NAME) --install --wait --debug install/helm/open-match \
@ -284,14 +288,14 @@ install-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
--set openmatch.monitoring.stackdriver.enabled=true \
--set openmatch.monitoring.stackdriver.gcpProjectId=$(GCP_PROJECT_ID)
install-example-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
$(HELM) upgrade $(OPEN_MATCH_EXAMPLE_CHART_NAME) --install --wait --debug $(OPEN_MATCH_EXAMPLE_CHART_NAME) install/helm/open-match-example \
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-example-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
-$(HELM) delete --purge $(OPEN_MATCH_EXAMPLE_CHART_NAME)
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 \
@ -305,7 +309,7 @@ delete-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubec
-$(KUBECTL) --ignore-not-found=true delete crd servicemonitors.monitoring.coreos.com
-$(KUBECTL) --ignore-not-found=true delete crd prometheusrules.monitoring.coreos.com
install/yaml/: install/yaml/install.yaml install/yaml/install-example.yaml install/yaml/01-redis-chart.yaml install/yaml/02-open-match.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/05-jaeger-chart.yaml
install/yaml/: install/yaml/install.yaml install/yaml/install-demo.yaml install/yaml/01-redis-chart.yaml install/yaml/02-open-match.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/05-jaeger-chart.yaml
install/yaml/01-redis-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
mkdir -p install/yaml/
@ -390,12 +394,12 @@ install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
--set jaeger.enabled=true \
install/helm/open-match > install/yaml/install.yaml
install/yaml/install-example.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_EXAMPLE_CHART_NAME) --namespace $(OPEN_MATCH_EXAMPLE_KUBERNETES_NAMESPACE) \
$(HELM) template --name $(OPEN_MATCH_DEMO_CHART_NAME) --namespace $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) \
--set openmatch.image.registry=$(REGISTRY) \
--set openmatch.image.tag=$(TAG) \
install/helm/open-match-example > install/yaml/install-example.yaml
install/helm/open-match-demo > install/yaml/install-demo.yaml
set-redis-password:
@stty -echo; \
@ -403,7 +407,7 @@ set-redis-password:
read REDIS_PASSWORD; \
stty echo; \
printf "\n"; \
$(KUBECTL) create secret generic $(REDIS_NAME) -n $(OPEN_MATCH_EXAMPLE_KUBERNETES_NAMESPACE) --from-literal=redis-password=$$REDIS_PASSWORD --dry-run -o yaml | $(KUBECTL) replace -f - --force
$(KUBECTL) create secret generic $(REDIS_NAME) -n $(OPEN_MATCH_DEMO_KUBERNETES_NAMESPACE) --from-literal=redis-password=$$REDIS_PASSWORD --dry-run -o yaml | $(KUBECTL) replace -f - --force
install-toolchain: install-kubernetes-tools install-web-tools install-protoc-tools install-openmatch-tools
install-kubernetes-tools: build/toolchain/bin/kubectl$(EXE_EXTENSION) build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/minikube$(EXE_EXTENSION) build/toolchain/bin/skaffold$(EXE_EXTENSION)

View File

@ -154,7 +154,7 @@ artifacts:
- cmd/evaluator/evaluator
- cmd/minimatch/minimatch
- install/yaml/install.yaml
- install/yaml/install-example.yaml
- install/yaml/install-demo.yaml
- install/yaml/01-redis-chart.yaml
- install/yaml/02-open-match.yaml
- install/yaml/03-prometheus-chart.yaml

View File

@ -56,6 +56,6 @@ kubectl create clusterrolebinding myname-cluster-admin-binding --clusterrole=clu
kubectl create namespace open-match
# Install Open Match and monitoring services.
kubectl apply -f https://github.com/googleforgames/open-match/releases/download/v{version}/install.yaml --namespace open-match
# Install the example MMF and Evaluator.
kubectl apply -f https://github.com/googleforgames/open-match/releases/download/v{version}/install-example.yaml --namespace open-match
# Install the demo.
kubectl apply -f https://github.com/googleforgames/open-match/releases/download/v{version}/install-demo.yaml --namespace open-match
```

View File

@ -15,7 +15,7 @@
apiVersion: v1
appVersion: "0.0.0-dev"
version: 0.0.0-dev
name: open-match-example
name: open-match-demo
description: Flexible, extensible, and scalable video game matchmaking.
keywords:
- kubernetes

View File

@ -1,3 +1,3 @@
The Open Match examples have been installed in the namespace {{ .Release.Namespace }}.
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'