From 145eceb5598e04a6a973f0b664c5ca92cffa3353 Mon Sep 17 00:00:00 2001 From: Javier Morales Date: Mon, 25 Jul 2022 15:27:30 -0400 Subject: [PATCH 1/4] Added links to the images of the dashboard --- docs/howtos/monitoring.md | 10 ++++++---- samples/grafana/README.md | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/howtos/monitoring.md b/docs/howtos/monitoring.md index 011f8897..6503d680 100644 --- a/docs/howtos/monitoring.md +++ b/docs/howtos/monitoring.md @@ -10,7 +10,7 @@ nav_order: 1 Thundernetes is able to export game server related metrics to a [Prometheus](https://prometheus.io/docs/introduction/overview/) server, and these can also be imported to a [Grafana](https://grafana.com/docs/grafana/latest/introduction/) server for easy and intuitive visualizations. -![Grafana Dasboard Example](../assets/images/grafana_dashboard_1.png) +[![Grafana Dasboard Example](../assets/images/grafana_dashboard_1.png)](../assets/images/grafana_dashboard_1.png) Prometheus uses a pull model to retrieve data, and needs apps to implement an endpoint that responds to its HTTP requests. For this, Thundernetes exposes the following endpoints: @@ -95,8 +95,10 @@ There is a custom Grafana dashboard example that visualizes some of this data in ## More pictures -![Grafana Dasboard Example 2](../assets/images/grafana_dashboard_2.png) +[![Grafana Dasboard Example 2](../assets/images/grafana_dashboard_2.png)](../assets/images/grafana_dashboard_2.png) + +[![Grafana Dasboard Example 3](../assets/images/grafana_dashboard_3.png)](../assets/images/grafana_dashboard_3.png) + +[![Grafana Dasboard Example 4](../assets/images/grafana_dashboard_4.png)](../assets/images/grafana_dashboard_4.png) -![Grafana Dasboard Example 3](../assets/images/grafana_dashboard_3.png) -![Grafana Dasboard Example 4](../assets/images/grafana_dashboard_4.png) diff --git a/samples/grafana/README.md b/samples/grafana/README.md index 2b47799b..1545e8cb 100644 --- a/samples/grafana/README.md +++ b/samples/grafana/README.md @@ -3,10 +3,10 @@ The `dashboard.json` file in this folder can be imported to grafana to provide a simple example of retrieving metrics from the Thundernetes Controller. It makes the assumption that the Prometheus data source is named `Prometheus`, so you may need to edit the json file before importing if your Grafana installation uses a different name. -![Grafana Dasboard Example](../../docs/assets/images/grafana_dashboard_1.png) +[![Grafana Dasboard Example](../../docs/assets/images/grafana_dashboard_1.png)](../../docs/assets/images/grafana_dashboard_1.png) -![Grafana Dasboard Example 2](../../docs/assets/images/grafana_dashboard_2.png) +[![Grafana Dasboard Example 2](../../docs/assets/images/grafana_dashboard_2.png)](../../docs/assets/images/grafana_dashboard_2.png) -![Grafana Dasboard Example 3](../../docs/assets/images/grafana_dashboard_3.png) +[![Grafana Dasboard Example 3](../../docs/assets/images/grafana_dashboard_3.png)](../../docs/assets/images/grafana_dashboard_3.png) -![Grafana Dasboard Example 4](../../docs/assets/images/grafana_dashboard_4.png) +[![Grafana Dasboard Example 4](../../docs/assets/images/grafana_dashboard_1.png)](../../docs/assets/images/grafana_dashboard_4.png) From f11db97ccab181aed05f00361b8b9608ced883d2 Mon Sep 17 00:00:00 2001 From: Javier Morales Date: Mon, 25 Jul 2022 15:29:57 -0400 Subject: [PATCH 2/4] spacing --- docs/howtos/monitoring.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/howtos/monitoring.md b/docs/howtos/monitoring.md index 6503d680..62ccfbfb 100644 --- a/docs/howtos/monitoring.md +++ b/docs/howtos/monitoring.md @@ -100,5 +100,3 @@ There is a custom Grafana dashboard example that visualizes some of this data in [![Grafana Dasboard Example 3](../assets/images/grafana_dashboard_3.png)](../assets/images/grafana_dashboard_3.png) [![Grafana Dasboard Example 4](../assets/images/grafana_dashboard_4.png)](../assets/images/grafana_dashboard_4.png) - - From 684a4f56a8e67c594f839d58124739dbcf13c771 Mon Sep 17 00:00:00 2001 From: Javier Morales Date: Mon, 25 Jul 2022 15:46:29 -0400 Subject: [PATCH 3/4] Added links to images on ui docs, also moved images --- .../images/thundernetes_ui_build_gameservers.png | Bin .../images/thundernetes_ui_build_specs.png | Bin .../images/thundernetes_ui_cluster.png | Bin .../images/thundernetes_ui_cluster_create_build.png | Bin .../images/thundernetes_ui_home.png | Bin .../images/thundernetes_ui_proxy.png | Bin docs/thundernetesui/README.md | 10 +++++----- 7 files changed, 5 insertions(+), 5 deletions(-) rename docs/{thundernetesui => assets}/images/thundernetes_ui_build_gameservers.png (100%) rename docs/{thundernetesui => assets}/images/thundernetes_ui_build_specs.png (100%) rename docs/{thundernetesui => assets}/images/thundernetes_ui_cluster.png (100%) rename docs/{thundernetesui => assets}/images/thundernetes_ui_cluster_create_build.png (100%) rename docs/{thundernetesui => assets}/images/thundernetes_ui_home.png (100%) rename docs/{thundernetesui => assets}/images/thundernetes_ui_proxy.png (100%) diff --git a/docs/thundernetesui/images/thundernetes_ui_build_gameservers.png b/docs/assets/images/thundernetes_ui_build_gameservers.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_build_gameservers.png rename to docs/assets/images/thundernetes_ui_build_gameservers.png diff --git a/docs/thundernetesui/images/thundernetes_ui_build_specs.png b/docs/assets/images/thundernetes_ui_build_specs.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_build_specs.png rename to docs/assets/images/thundernetes_ui_build_specs.png diff --git a/docs/thundernetesui/images/thundernetes_ui_cluster.png b/docs/assets/images/thundernetes_ui_cluster.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_cluster.png rename to docs/assets/images/thundernetes_ui_cluster.png diff --git a/docs/thundernetesui/images/thundernetes_ui_cluster_create_build.png b/docs/assets/images/thundernetes_ui_cluster_create_build.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_cluster_create_build.png rename to docs/assets/images/thundernetes_ui_cluster_create_build.png diff --git a/docs/thundernetesui/images/thundernetes_ui_home.png b/docs/assets/images/thundernetes_ui_home.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_home.png rename to docs/assets/images/thundernetes_ui_home.png diff --git a/docs/thundernetesui/images/thundernetes_ui_proxy.png b/docs/assets/images/thundernetes_ui_proxy.png similarity index 100% rename from docs/thundernetesui/images/thundernetes_ui_proxy.png rename to docs/assets/images/thundernetes_ui_proxy.png diff --git a/docs/thundernetesui/README.md b/docs/thundernetesui/README.md index a1840943..141bbe39 100644 --- a/docs/thundernetesui/README.md +++ b/docs/thundernetesui/README.md @@ -14,20 +14,20 @@ Currently we are developing [Thundernetes UI](https://github.com/PlayFab/thunder You can see a summary of what's going on in all your clusters. -![Home page](./images/thundernetes_ui_home.png "Home page") +[![Home page](../assets/images/thundernetes_ui_home.png "Home page")](../assets/images/thundernetes_ui_home.png) ## Manage the builds on each cluster Check the builds you have on each cluster and their current status. You can also create a new one, either from scratch, or by cloning one from any cluster! -![Cluster view](./images/thundernetes_ui_cluster.png "Cluster view") +[![Cluster view](../assets/images/thundernetes_ui_cluster.png "Cluster view")](../assets/images/thundernetes_ui_cluster.png) -![Create build view](./images/thundernetes_ui_cluster_create_build.png "Create build view") +[![Create build view](../assets/images/thundernetes_ui_cluster_create_build.png "Create build view")](../assets/images/thundernetes_ui_cluster_create_build.png) ## Manage each build You can check each build separately and see it's status and specs, you can modify the standingBy and max values, allocate individual game servers for testing, and see a list of all the game servers running. -![Build view - Specs](./images/thundernetes_ui_build_specs.png "Build view - Specs") +[![Build view - Specs](../assets/images/thundernetes_ui_build_specs.png "Build view - Specs")](../assets/images/thundernetes_ui_build_specs.png) -![Build view - GameServers](./images/thundernetes_ui_build_gameservers.png "Build view - GameServers") +[![Build view - GameServers](../assets/images/thundernetes_ui_build_gameservers.png "Build view - GameServers")](../assets/images/thundernetes_ui_build_gameservers.png) From 88527e540e8638ab5f9606af7aacaca12a387d43 Mon Sep 17 00:00:00 2001 From: Javier Morales Date: Mon, 25 Jul 2022 15:57:44 -0400 Subject: [PATCH 4/4] Updated more docs for easier installation instructions --- docs/gameserverapi/README.md | 8 +++++++- docs/howtos/latencyserver.md | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/gameserverapi/README.md b/docs/gameserverapi/README.md index 32d204a4..2f5bdcc7 100644 --- a/docs/gameserverapi/README.md +++ b/docs/gameserverapi/README.md @@ -11,6 +11,12 @@ The GameServer API is a RESTful API service that facilitates access to Thunderne ## How to install the GameServer API -We provide a [Docker image](https://github.com/PlayFab/thundernetes/pkgs/container/thundernetes-gameserverapi) with the API, you have to deploy it into your cluster along with Thundernetes. We also have an [example YAML file](https://github.com/PlayFab/thundernetes/tree/main/samples/gameserverapi) for the deployment, all you have to do is change the name of the container image for the latest version and run ```kubectl apply -f deploy.yaml```. This example uses a LoadBalancer to expose the application, so it will be assigned an external IP (this doesn't work locally unless you have a local implementation of a LoadBalancer, you can use [port forwarding](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) instead). +We provide a [Docker image](https://github.com/PlayFab/thundernetes/pkgs/container/thundernetes-gameserverapi) with the API, you have to deploy it into your cluster along with Thundernetes. We also have an [example YAML file](https://github.com/PlayFab/thundernetes/tree/main/samples/gameserverapi) for the deployment, all you have to do is run: + +```bash +kubectl apply -f https://raw.githubusercontent.com/PlayFab/thundernetes/main/samples/gameserverapi/gameserverapi.yaml +``` + +This example uses a LoadBalancer to expose the application, so it will be assigned an external IP (this doesn't work locally unless you have a local implementation of a LoadBalancer, you can use [port forwarding](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) instead). > **_NOTE_**: The GameServer API provides direct access to your Thundernetes resources, we delegate the securing of the service to the user, for example, you can [use an Ingress](../howtos/serviceingress.md). diff --git a/docs/howtos/latencyserver.md b/docs/howtos/latencyserver.md index f4854d64..448cdbc0 100644 --- a/docs/howtos/latencyserver.md +++ b/docs/howtos/latencyserver.md @@ -12,7 +12,15 @@ If you have multiple Thundernetes clusters on different regions, it might be use - The server only accepts UDP requests, and the data must be 32 bytes max and must also start with 0xFFFF (1111 1111 1111 1111). - If the requests are valid, the server will respond with the same data it received, but with the first 4 bytes flipped to 0x0000 (0000 0000 0000 0000). -In [Thundernetes' main repository](https://github.com/PlayFab/thundernetes/tree/main/cmd/latencyserver) you can find the code for the server, a Dockerfile to build the image, a YAML file for deploying the server (remember to change the name of the container image), and another for deploying a ServiceMonitor to crawl the [prometheus metrics](./monitoring.md). You can also use the [sample latency server Deployment YAML files](https://github.com/PlayFab/thundernetes/tree/main/samples/latencyserver). +In [Thundernetes' main repository](https://github.com/PlayFab/thundernetes/tree/main/cmd/latencyserver) you can find the code for the server and a Dockerfile to build the image. We also provide 2 example YAML files: one for [deploying the server](https://github.com/PlayFab/thundernetes/blob/main/samples/latencyserver/latencyserver.yaml), and another for [deploying a ServiceMonitor](https://github.com/PlayFab/thundernetes/blob/main/samples/latencyserver/monitor.yaml) to crawl the [prometheus metrics](./monitoring.md). All you have to do is run: + +```bash +# for the latency server +kubectl apply -f https://raw.githubusercontent.com/PlayFab/thundernetes/main/samples/latencyserver/latencyserver.yaml + +# for the service monitor +kubectl apply -f https://raw.githubusercontent.com/PlayFab/thundernetes/main/samples/latencyserver/monitor.yaml +``` The UDP server runs on the port defined by the ```UDP_SERVER_PORT``` environment variable. A prometheus ```/metrics``` endpoint is also exposed, on the port defined by the ```METRICS_SERVER_PORT``` environment variable, with a counter for the number of successful requests it has received.