-
Notifications
You must be signed in to change notification settings - Fork 823
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
16 changed files
with
561 additions
and
1 deletion.
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
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
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 }} |
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,113 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: gameservers.stable.agones.dev | ||
labels: | ||
component: crd | ||
app: {{ template "agones.name" . }} | ||
chart: {{ template "agones.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
group: stable.agones.dev | ||
version: v1alpha1 | ||
scope: Namespaced | ||
names: | ||
kind: GameServer | ||
plural: gameservers | ||
shortNames: | ||
- gs | ||
singular: gameserver | ||
validation: | ||
openAPIV3Schema: | ||
required: | ||
- spec | ||
properties: | ||
spec: | ||
required: | ||
- containerPort | ||
- template | ||
properties: | ||
template: | ||
type: object | ||
required: | ||
- spec | ||
properties: | ||
spec: | ||
type: object | ||
required: | ||
- containers | ||
properties: | ||
containers: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- image | ||
properties: | ||
name: | ||
type: string | ||
minLength: 0 | ||
maxLength: 63 | ||
pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" | ||
image: | ||
type: string | ||
minLength: 1 | ||
minItems: 1 | ||
container: | ||
title: The container name running the gameserver | ||
description: if there is more than one container, specify which one is the game server | ||
type: string | ||
minLength: 0 | ||
maxLength: 63 | ||
pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" | ||
portPolicy: | ||
title: the port policy that will be applied to the game server | ||
description: | | ||
portPolicy has two options: | ||
- "dynamic" (default) the system allocates a free hostPort for the gameserver, for game clients to connect to | ||
- "static", user defines the hostPort that the game client will connect to. Then onus is on the user to ensure that the | ||
port is available. When static is the policy specified, `hostPort` is required to be populated | ||
type: string | ||
enum: | ||
- dynamic | ||
- static | ||
protocol: | ||
title: Protocol being used. Defaults to UDP. TCP is the only other option | ||
type: string | ||
enum: | ||
- UDP | ||
- TCP | ||
containerPort: | ||
title: The port that is being opened on the game server process | ||
type: integer | ||
minimum: 0 | ||
maximum: 65535 | ||
hostPort: | ||
title: The port exposed on the host | ||
description: Only required when `portPolicy` is "static". Overwritten when portPolicy is "dynamic". | ||
type: integer | ||
minimum: 0 | ||
maximum: 65535 | ||
health: | ||
type: object | ||
title: Health checking for the running game server | ||
properties: | ||
disabled: | ||
title: Disable health checking. defaults to false, but can be set to true | ||
type: boolean | ||
initialDelaySeconds: | ||
title: Number of seconds after the container has started before health check is initiated. Defaults to 5 seconds | ||
type: integer | ||
minimum: 0 | ||
maximum: 2147483648 | ||
periodSeconds: | ||
title: How long before the server is considered not healthy | ||
type: integer | ||
minimum: 0 | ||
maximum: 2147483648 | ||
failureThreshold: | ||
title: Minimum consecutive failures for the health probe to be considered failed after having succeeded. | ||
type: integer | ||
minimum: 1 | ||
maximum: 2147483648 |
Oops, something went wrong.