Skip to content

Commit

Permalink
Update website docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
roberthbailey committed Jul 15, 2019
1 parent a3a5bb2 commit c2f089d
Show file tree
Hide file tree
Showing 18 changed files with 810 additions and 44 deletions.
22 changes: 22 additions & 0 deletions site/content/en/docs/Advanced/limiting-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ we can take advantage of both resource limits and requests in our `GameServer` c
For example, to set a CPU limit on our `GameServer` configuration of 250m/0.25 of a cpu,
we could do so as followed:

{{% feature expiryVersion="0.12.0" %}}
```yaml
apiVersion: "stable.agones.dev/v1alpha1"
kind: GameServer
Expand All @@ -43,6 +44,27 @@ spec:
limit:
cpu: "250m" #this is our limit here
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```yaml
apiVersion: "agones.dev/v1"
kind: GameServer
metadata:
name: "simple-udp"
spec:
ports:
- name: default
containerPort: 7654
template:
spec:
containers:
- name: simple-udp
image: {{% example-image %}}
resources:
limit:
cpu: "250m" #this is our limit here
```
{{% /feature %}}
If you do not set a limit or request, the default is set my Kubernetes at a 100m CPU request.
Expand Down
45 changes: 45 additions & 0 deletions site/content/en/docs/Advanced/scheduling-and-autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ There are two scheduling strategies for Fleets - each designed for different typ

### Packed

{{% feature expiryVersion="0.12.0" %}}
```yaml
apiVersion: "stable.agones.dev/v1alpha1"
kind: Fleet
Expand All @@ -82,6 +83,28 @@ spec:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```yaml
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: simple-udp
spec:
replicas: 100
scheduling: Packed
template:
spec:
ports:
- containerPort: 7654
template:
spec:
containers:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}
This is the *default* Fleet scheduling strategy. It is designed for dynamic Kubernetes environments, wherein you wish
to scale up and down as load increases or decreases, such as in a Cloud environment where you are paying
Expand Down Expand Up @@ -119,6 +142,7 @@ With the "Packed" strategy, Fleets will remove `Ready` `GameServers` from Nodes

### Distributed

{{% feature expiryVersion="0.12.0" %}}
```yaml
apiVersion: "stable.agones.dev/v1alpha1"
kind: Fleet
Expand All @@ -137,6 +161,27 @@ spec:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```yaml
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: simple-udp
spec:
replicas: 100
scheduling: Distributed
template:
spec:
ports:
- containerPort: 7654
template:
spec:
containers:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}

This Fleet scheduling strategy is designed for static Kubernetes environments, such as when you are running Kubernetes
on bare metal, and the cluster size rarely changes, if at all.
Expand Down
20 changes: 20 additions & 0 deletions site/content/en/docs/Advanced/service-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If needed, you can provide your own service account on the `Pod` specification i

For example:

{{% feature expiryVersion="0.12.0" %}}
```yaml
apiVersion: "stable.agones.dev/v1alpha1"
kind: GameServer
Expand All @@ -41,6 +42,25 @@ spec:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```yaml
apiVersion: "agones.dev/v1"
kind: GameServer
metadata:
generateName: "simple-udp-"
spec:
ports:
- name: default
containerPort: 7654
template:
spec:
serviceAccountName: my-special-service-account # a custom service account
containers:
- name: simple-udp
image: {{% example-image %}}
```
{{% /feature %}}
If a service account is configured, the mounted key is not overwritten, as it assumed that you want to have full control
of the service account and underlying RBAC permissions.
8 changes: 8 additions & 0 deletions site/content/en/docs/Examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ These are all examples of simple game server implementations, that integrate the

## Building on top of Agones

{{% feature expiryVersion="0.12.0" %}}
- {{< ghlink href="examples/allocator-service" >}}Allocator Service{{< /ghlink >}} (Go) -
This service provides an example of using the
[Agones API](https://godoc.org/agones.dev/agones/pkg/client/clientset/versioned/typed/stable/v1alpha1) to allocate a GameServer from a Fleet,
and is used in the [Create an Allocator Service (Go)]({{< ref "/docs/Tutorials/allocator-service-go.md" >}}) tutorial.
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
- {{< ghlink href="examples/allocator-service" >}}Allocator Service{{< /ghlink >}} (Go) -
This service provides an example of using the
[Agones API](https://godoc.org/agones.dev/agones/pkg/client/clientset/versioned/typed/agones/v1) to allocate a GameServer from a Fleet,
and is used in the [Create an Allocator Service (Go)]({{< ref "/docs/Tutorials/allocator-service-go.md" >}}) tutorial.
{{% /feature %}}
129 changes: 128 additions & 1 deletion site/content/en/docs/Getting Started/create-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Let's wait for the two `GameServers` to become ready.
watch kubectl describe fleet simple-udp
```

{{% feature expiryVersion="0.12.0" %}}
```
Name: simple-udp
Namespace: default
Expand Down Expand Up @@ -123,6 +124,56 @@ Events:
---- ------ ---- ---- -------
Normal CreatingGameServerSet 13s fleet-controller Created GameServerSet simple-udp-wlqnd
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```
Name: simple-udp
Namespace: default
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"agones.dev/v1","kind":"Fleet","metadata":{"annotations":{},"name":"simple-udp","namespace":"default"},"spec":{"replicas":2,...
API Version: agones.dev/v1
Kind: Fleet
Metadata:
Cluster Name:
Creation Timestamp: 2018-07-01T18:55:35Z
Generation: 1
Resource Version: 24685
Self Link: /apis/agones.dev/v1/namespaces/default/fleets/simple-udp
UID: 56710a91-7d60-11e8-b2dd-08002703ef08
Spec:
Replicas: 2
Strategy:
Rolling Update:
Max Surge: 25%
Max Unavailable: 25%
Type: RollingUpdate
Template:
Metadata:
Creation Timestamp: <nil>
Spec:
Health:
Ports:
Container Port: 7654
Name: default
Port Policy: Dynamic
Template:
Metadata:
Creation Timestamp: <nil>
Spec:
Containers:
Image: {{< example-image >}}
Name: simple-udp
Resources:
Status:
Allocated Replicas: 0
Ready Replicas: 2
Replicas: 2
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal CreatingGameServerSet 13s fleet-controller Created GameServerSet simple-udp-wlqnd
```
{{% /feature %}}

If you look towards the bottom, you can see there is a section of `Status > Ready Replicas` which will tell you
how many `GameServers` are currently in a Ready state. After a short period, there should be 2 `Ready Replicas`.
Expand Down Expand Up @@ -211,7 +262,7 @@ spec:
metadata: {}
required:
matchLabels:
stable.agones.dev/fleet: simple-udp
agones.dev/fleet: simple-udp
scheduling: Packed
status:
address: 192.168.122.152
Expand Down Expand Up @@ -273,6 +324,7 @@ For the full details of the YAML file head to the [Fleet Specification Guide]({{
You should get back a response that looks like the following:
{{% feature expiryVersion="0.12.0" %}}
```
apiVersion: stable.agones.dev/v1alpha1
kind: FleetAllocation
Expand Down Expand Up @@ -345,6 +397,81 @@ status:
port: 7604
state: Allocated
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```
apiVersion: agones.dev/v1
kind: FleetAllocation
metadata:
clusterName: ""
creationTimestamp: 2018-07-01T18:56:31Z
generateName: simple-udp-
generation: 1
name: simple-udp-l7dn9
namespace: default
ownerReferences:
- apiVersion: agones.dev/v1
blockOwnerDeletion: true
controller: true
kind: GameServer
name: simple-udp-wlqnd-s2xr5
uid: 5676a611-7d60-11e8-b2dd-08002703ef08
resourceVersion: "24719"
selfLink: /apis/agones.dev/v1/namespaces/default/fleetallocations/simple-udp-l7dn9
uid: 77c22f17-7d60-11e8-b2dd-08002703ef08
spec:
fleetName: simple-udp
status:
GameServer:
metadata:
creationTimestamp: 2018-07-01T18:55:35Z
finalizers:
- agones.dev
generateName: simple-udp-wlqnd-
generation: 1
labels:
agones.dev/gameserverset: simple-udp-wlqnd
name: simple-udp-wlqnd-s2xr5
namespace: default
ownerReferences:
- apiVersion: agones.dev/v1
blockOwnerDeletion: true
controller: true
kind: GameServerSet
name: simple-udp-wlqnd
uid: 56731f1a-7d60-11e8-b2dd-08002703ef08
resourceVersion: "24716"
selfLink: /apis/agones.dev/v1/namespaces/default/gameservers/simple-udp-wlqnd-s2xr5
uid: 5676a611-7d60-11e8-b2dd-08002703ef08
spec:
container: simple-udp
health:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 5
ports:
- containerPort: 7654
hostPort: 7604
name: default
portPolicy: Dynamic
protocol: UDP
template:
metadata:
creationTimestamp: null
spec:
containers:
- image: {{< example-image >}}
name: simple-udp
resources: {}
status:
address: 192.168.99.100
nodeName: agones
ports:
- name: default
port: 7604
state: Allocated
```
{{% /feature %}}
If you see the `status` section, you should see that there is a `GameServer`, and if you look at its
`status > state` value, you can also see that it has been moved to `Allocated`. This means you have been successfully
Expand Down
62 changes: 62 additions & 0 deletions site/content/en/docs/Getting Started/create-gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Let's wait for the GameServer state to become `Ready`:
watch kubectl describe gameserver
```

{{% feature expiryVersion="0.12.0" %}}
```
Name: simple-udp-7pjrq
Namespace: default
Expand Down Expand Up @@ -131,6 +132,67 @@ Events:
Normal Scheduled 34s gameserver-controller Address and port populated
Normal Ready 27s gameserver-controller SDK.Ready() executed
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
```
Name: simple-udp-7pjrq
Namespace: default
Labels: <none>
Annotations: agones.dev/sdk-version: 0.9.0-764fa53
API Version: agones.dev/v1
Kind: GameServer
Metadata:
Creation Timestamp: 2019-02-27T15:06:20Z
Finalizers:
agones.dev
Generate Name: simple-udp-
Generation: 1
Resource Version: 30377
Self Link: /apis/agones.dev/v1/namespaces/default/gameservers/simple-udp-7pjrq
UID: 3d7ac3e1-3aa1-11e9-a4f5-42010a8a0019
Spec:
Container: simple-udp
Health:
Failure Threshold: 3
Initial Delay Seconds: 5
Period Seconds: 5
Ports:
Container Port: 7654
Host Port: 7190
Name: default
Port Policy: Dynamic
Protocol: UDP
Scheduling: Packed
Template:
Metadata:
Creation Timestamp: <nil>
Spec:
Containers:
Image: {{< example-image >}}
Name: simple-udp
Resources:
Limits:
Cpu: 20m
Memory: 32Mi
Requests:
Cpu: 20m
Memory: 32Mi
Status:
Address: 35.233.183.43
Node Name: agones
Ports:
Name: default
Port: 7190
State: Ready
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal PortAllocation 34s gameserver-controller Port allocated
Normal Creating 34s gameserver-controller Pod simple-udp-7pjrq created
Normal Scheduled 34s gameserver-controller Address and port populated
Normal Ready 27s gameserver-controller SDK.Ready() executed
```
{{% /feature %}}

If you look towards the bottom, you can see there is a `Status > State` value. We are waiting for it to move to `Ready`, which means that the game server is ready to accept connections.

Expand Down
Loading

0 comments on commit c2f089d

Please sign in to comment.