-
Notifications
You must be signed in to change notification settings - Fork 818
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now you can deploy agones using ```bash helm install --name my-release agones ``` Note that the build-image Dockerfile was modified to download Helm and add it to the path For more info see the documentation located at `install/helm/README.md`
- Loading branch information
Showing
26 changed files
with
738 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Install Agones using Helm | ||
|
||
This chart install the Agones application and defines deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Prerequisites | ||
|
||
- [Helm](https://docs.helm.sh/helm/) package manager 2.8.0+ | ||
- Kubernetes 1.9+ | ||
- Role-based access controls (RBAC) activated | ||
- MutatingAdmissionWebhook admission controller activated, see [recommendation](https://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-admission-controllers-to-use) | ||
|
||
## Installing the Chart | ||
|
||
> If you don't have `Helm` installed locally, or `Tiller` installed in your Kubernetes cluster, read the [Using Helm](https://docs.helm.sh/using_helm/) documentation to get started. | ||
To install the chart with the release name `my-release`: | ||
|
||
```bash | ||
$ cd install/ | ||
$ helm install --name my-release agones | ||
``` | ||
|
||
The command deploys Agones on the Kubernetes cluster with the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. | ||
|
||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
```bash | ||
$ helm delete my-release | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
The following tables lists the configurable parameters of the Agones chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
| ------------------------------------ | ----------------------------------------- | ---------------------------------------------------- | | ||
| `namespace` | Namespace to use for Agones | `agones-system` | | ||
| `serviceaccount.controller` | Service account name for the controller | `agones-controller` | | ||
| `serviceaccount.sdk` | Service account name for the sdk | `agones-sdk` | | ||
| `image.controller.repository` | Image repository for the controller | `gcr.io/agones-images/agones-controller` | | ||
| `image.controller.tag` | Image tag for the controller | `0.1` | | ||
| `image.controller.pullPolicy` | Image pull policy for the controller | `IfNotPresent` | | ||
| `image.sdk.repository` | Image repository for the sdk | `gcr.io/agones-images/agones-sdk` | | ||
| `image.sdk.tag` | Image tag for the sdk | `0.1` | | ||
| `image.sdk.alwaysPull` | Tells if the sdk image should always be pulled | `false` | | ||
| `minPort` | Minimum port to use for dynamic port allocation | `7000` | | ||
| `maxPort` | Maximum port to use for dynamic port allocation | `8000` | | ||
| `healthCheck.http.port` | Port to use for liveness probe service | `8080` | | ||
| `healthCheck.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` | | ||
| `healthCheck.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` | | ||
| `healthCheck.failureThreshold` | Number of times before giving up (in seconds) | `3` | | ||
| `healthCheck.timeoutSeconds` | Number of seconds after which the probe times out (in seconds) | `1` | | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```bash | ||
$ helm install --name my-release \ | ||
--set namespace=mynamespace,minPort=1000,maxPort=5000 agones | ||
``` | ||
|
||
The above command sets the namespace where Agones is deployed to `mynamespace`. Additionally Agones will use a dynamic port allocation range of 1000-5000. | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```bash | ||
$ helm install --name my-release -f values.yaml agones | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](agones/values.yaml) | ||
## Confirm Agones is running | ||
|
||
To confirm Agones is up and running, [go to the next section](../../docs/installing_agones#confirming-agones-started-successfully) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
appVersion: "0.1" | ||
version: 0.1.0 | ||
name: agones | ||
description: a library for hosting, running and scaling dedicated game servers on Kubernetes. | ||
keywords: | ||
- go | ||
- golang | ||
- dedicated-gameservers | ||
- multiplayer | ||
- game-development | ||
home: https://agones.dev | ||
sources: | ||
- https://github.com/GoogleCloudPlatform/agones | ||
maintainers: | ||
- name: agones | ||
email: agones-discuss@googlegroups.com | ||
url: https://groups.google.com/forum/#!forum/agones-discuss | ||
engine: gotpl | ||
icon: https://github.com/GoogleCloudPlatform/agones/raw/master/docs/agones.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
The Agones controller has been installed in the namespace {{ .Values.namespace }}. | ||
|
||
You can watch the status by running 'kubectl --namespace {{ .Values.namespace }} get pods -o wide -w {{ .Values.serviceaccount.controller }}' | ||
|
||
Once ready you can create your first GameServer using our examples: | ||
|
||
'kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/agones/master/examples/simple-udp/server/gameserver.yaml' | ||
|
||
An example GameServer that makes use of the controller: | ||
|
||
apiVersion: "stable.agones.dev/v1alpha1" | ||
kind: GameServer | ||
metadata: | ||
name: "simple-udp" | ||
spec: | ||
portPolicy: "dynamic" | ||
containerPort: 7654 | ||
template: | ||
spec: | ||
containers: | ||
- name: simple-udp | ||
image: gcr.io/agones-images/udp-server:0.1 | ||
|
||
Finally don't forget to explore our documentation and usage guides on how to develop and host dedicated game servers on top of Agones. : | ||
|
||
- [Create a Game Server](https://github.com/GoogleCloudPlatform/agones/blob/master/docs/create_gameserver.md) | ||
- [Integrating the Game Server SDK](https://github.com/GoogleCloudPlatform/agones/tree/master/sdks) | ||
- [GameServer Health Checking](https://github.com/GoogleCloudPlatform/agones/blob/master/docs/health_checking.md) | ||
- [Accessing Agones via the Kubernetes API](https://github.com/GoogleCloudPlatform/agones/blob/master/docs/access_api.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "agones.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 "agones.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 "agones.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: agones-controller | ||
namespace: {{ .Values.namespace}} | ||
labels: | ||
component: controller | ||
app: {{ template "agones.name" . }} | ||
chart: {{ template "agones.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
stable.agones.dev/role: controller | ||
app: {{ template "agones.name" . }} | ||
chart: {{ template "agones.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
serviceAccountName: {{ .Values.serviceaccount.controller }} | ||
containers: | ||
- name: agones-controller | ||
image: "{{ .Values.image.controller.repository }}:{{ .Values.image.controller.tag }}" | ||
imagePullPolicy: {{ .Values.image.controller.pullPolicy }} | ||
env: | ||
- name: ALWAYS_PULL_SIDECAR # set the sidecar imagePullPolicy to Always | ||
value: {{ .Values.image.sdk.alwaysPull | quote }} | ||
# minimum port that can be exposed to GameServer traffic | ||
- name: MIN_PORT | ||
value: {{ .Values.minPort | quote }} | ||
# maximum port that can be exposed to GameServer traffic | ||
- name: MAX_PORT | ||
value: {{ .Values.maxPort | quote }} | ||
- name: SIDECAR # overwrite the GameServer sidecar image that is used | ||
value: "{{ .Values.image.sdk.repository }}:{{ .Values.image.sdk.tag }}" | ||
livenessProbe: | ||
httpGet: | ||
path: /live | ||
port: {{ .Values.healthCheck.http.port }} | ||
initialDelaySeconds: {{ .Values.healthCheck.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.healthCheck.periodSeconds }} | ||
failureThreshold: {{ .Values.healthCheck.failureThreshold }} | ||
timeoutSeconds: {{ .Values.healthCheck.timeoutSeconds }} |
Oops, something went wrong.