Skip to content

Commit

Permalink
Add details for configuring gRPC ports on baremetal
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 committed Mar 11, 2024
1 parent 5d623e2 commit 36ffaf8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 12 additions & 6 deletions src/content/docs/deployment/1_baremetal.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ This guide will walk you through the process of installing and running BlueDrago
Running BlueDragon on baremetal is the simplest way to run BlueDragon software, but it's recommended that you use Docker or Kubernetes for production deployments.
:::

:::danger
This guide currently **will not work** because Komodo and Puffin run gRPC servers on the same port (50051), and Komodo connects to Puffin at a hardcoded hostname (`puffin`).

This should be fixed soon, but in the meantime, we recommend using the Docker or Kubernetes deployment guides.
:::

## Prerequisites

- This guide assumes you're running on Linux. Other operating systems are not supported; though, you may be able to get it working on WSL.
Expand Down Expand Up @@ -119,6 +113,9 @@ PUFFIN_MONGO_CONNECTION_STRING=mongodb://localhost:27017
PUFFIN_LUCKPERMS_URL=http://localhost:8080
PUFFIN_DEFAULT_GAMESERVER_IP=localhost
PUFFIN_DEFAULT_PROXY_IP=localhost
PUFFIN_GRPC_PORT=50051
PUFFIN_GAMESERVER_GRPC_PORT=50052
PUFFIN_PROXY_GRPC_PORT=50053

# The amount of milliseconds in between minimum instance checks
PUFFIN_INSTANCE_START_PERIOD_MS=5000
Expand All @@ -137,6 +134,13 @@ Running Puffin outside of a Docker container is not recommended. If you run into

### Proxy

First, configure environment variables:

```properties
KOMODO_PUFFIN_URI=localhost:50051 # Connect to Puffin on port 50051
KOMODO_GRPC_PORT=50053 # Create a gRPC server on port 50053
```

Komodo (the Velocity proxy plugin) reads the following configuration files:

1. `/run/proxy/plugins/komodo/proxy-config.properties` defines the MOTD:
Expand Down Expand Up @@ -169,11 +173,13 @@ Here is an example:
BLUEDRAGON_QUEUE_TYPE=IPC
BLUEDRAGON_MONGO_CONNECTION_STRING=mongodb://localhost:27017
BLUEDRAGON_PUFFIN_HOSTNAME=localhost
BLUEDRAGON_PUFFIN_PORT=50051 # The port that Puffin's gRPC server runs on
BLUEDRAGON_LUCKPERMS_HOSTNAME=http://localhost:8080
BLUEDRAGON_DEFAULT_GAME=lobby # This should correspond a game name found in the `game.properties` file in one of your games.
BLUEDRAGON_AGONES_DISABLED=true # Agones is disabled without Kubernetes
HOSTNAME=server-1 # This is the internal name of the Minecraft server. It is used to identify the server to other services, like Velocity and Puffin.
PUFFIN_VELOCITY_SECRET=<your velocity secret> # Add your Velocity forwarding secret here
BLUEDRAGON_GRPC_SERVER_PORT=50052 # The port used to create a gRPC server
```

### LuckPerms
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/reference/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ If the `BLUEDRAGON_ENV_TYPE` is not set, the fallback is to check for a director
## Environment Variable Reference

| Environment variable | Defaults | Description |
| ------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| ------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------- |
| `BLUEDRAGON_QUEUE_TYPE` | **Dev**: `TEST`<br>**Prod**: `IPC` | Use "IPC" to connect to Puffin for queueing, or "TEST" for a fully-local/single-instance queue |
| `BLUEDRAGON_MONGO_CONNECTION_STRING` | **Dev**: `mongodb://localhost:27017`<br>**Prod**: `mongodb://mongo:27017` | The hostname that resolves to a MongoDB instance |
| `BLUEDRAGON_PUFFIN_HOSTNAME` | **Dev**: `localhost`<br>**Prod**: `puffin` | The hostname that resolves to a Puffin instance |
| `BLUEDRAGON_PUFFIN_PORT` | 50051 | 50051 | The port of Puffin's gRPC server. |
| `BLUEDRAGON_LUCKPERMS_HOSTNAME` | **Dev**: `http://localhost:8080`<br>**Prod**: `http://luckperms:8080` | The hostname that resolves to a [standalone LuckPerms](https://luckperms.net/) instance |
| `BLUEDRAGON_DEFAULT_GAME` | `lobby` | The game to automatically create on startup. Typically used to immediately initialize a lobby on each game server. |
| `BLUEDRAGON_AGONES_DISABLED` | _Not set_ | If this environment variable is present with any value, Agones integration will be disabled. |
| `PUFFIN_VELOCITY_SECRET` | _Not set_ | The Velocity modern forwarding secret. If not present, Velocity forwarding is disabled. |
| `BLUEDRAGON_GRPC_SERVER_PORT` | 50051 | The port to listen on for gRPC requests. |

_[View ConfiguredEnvironment source code](https://github.com/BlueDragonMC/Server/blob/b05b09ad229ccf85da20130510c9c1cdf90bbeed/src/main/kotlin/com/bluedragonmc/server/queue/environments.kt#L23) for more details about server environment configuration._

Expand Down

0 comments on commit 36ffaf8

Please sign in to comment.