Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0adcd1b
Implement external request handling
MasterPtato Jul 11, 2023
6e878c6
WIP add verification data to API
MasterPtato Jul 11, 2023
6ee0a77
WIP Implement verification to find requests
MasterPtato Jul 12, 2023
b825800
Implement user data and identity verification
MasterPtato Jul 12, 2023
a71e772
WIP get matchmaker tests working
MasterPtato Jul 13, 2023
ad64a51
Get external verification tests working
MasterPtato Jul 14, 2023
81101a1
WIP
MasterPtato Jul 15, 2023
8e4a2a5
Merge branch 'max/SVC-2029' into max/custom-lobbies
MasterPtato Jul 15, 2023
3ac35c5
Implement listable
MasterPtato Jul 15, 2023
039e43b
WIP create custom lobby endpoint
MasterPtato Jul 15, 2023
572826b
Implement custom lobbies
MasterPtato Jul 17, 2023
64a2811
Add is custom property to lobbies
MasterPtato Jul 18, 2023
11f45e7
Add join/find disabling
MasterPtato Jul 18, 2023
acbcc5f
Fix listable logic
MasterPtato Jul 18, 2023
6d0d0e9
Add test for find/join disabled
MasterPtato Jul 18, 2023
de42461
Fix prettier format
MasterPtato Jul 21, 2023
7b67381
Fix rendering salt on distributed
NathanFlurry Aug 4, 2023
b01023f
Remove old config dir
NathanFlurry Aug 4, 2023
8f4ea66
Remove redis-search
NathanFlurry Aug 4, 2023
dd304e2
Fix optional secret issue
NathanFlurry Aug 4, 2023
c89139e
Fix getter source URL
NathanFlurry Aug 4, 2023
a40781b
Update changelog
NathanFlurry Aug 4, 2023
5e6b2db
Capture events in bg
NathanFlurry Aug 4, 2023
3b0dfb0
Fix importing secrets in sls
NathanFlurry Aug 4, 2023
f5740f0
Simplify specifying roles
NathanFlurry Aug 4, 2023
a4c3519
Clean up Traefik service configs to allow for multiple Traefik services
NathanFlurry Aug 4, 2023
3686de4
Update assets.rivet.gg
NathanFlurry Aug 4, 2023
fc82c3a
SImplfiy singleton handling for services
NathanFlurry Aug 4, 2023
bacb241
Fix deploying EE APIs
NathanFlurry Aug 4, 2023
f0ce792
Fix ingress SaltStack
NathanFlurry Aug 4, 2023
c840870
Update admin auth
NathanFlurry Aug 4, 2023
a322907
Add troubleshooting for failed minion
NathanFlurry Aug 5, 2023
ce3a805
Add start-at flag for infra commands
NathanFlurry Aug 5, 2023
d9efde4
Auto install rsync on Salt Master
NathanFlurry Aug 5, 2023
6c6dffd
WIP getting ATS working again
NathanFlurry Aug 5, 2023
aa6aa8f
Fix trafficserver config
NathanFlurry Aug 5, 2023
909b605
Add B2 Nomad artifact support
NathanFlurry Aug 5, 2023
06f7595
Allow toggling multipart uploads
NathanFlurry Aug 5, 2023
2dcc595
Remove todo!
NathanFlurry Aug 5, 2023
a1a99c0
Fix module version set
NathanFlurry Aug 5, 2023
ead70f6
Remove ats build
NathanFlurry Aug 5, 2023
9611b4d
Fix internal dashboard docs
NathanFlurry Aug 5, 2023
d2da6d6
Fix invalid message parameters
NathanFlurry Aug 5, 2023
13aa561
Increate kv write limit
NathanFlurry Aug 5, 2023
0abb8db
Add idle lobbies to faker configs to prevent race condition in tests
NathanFlurry Aug 6, 2023
a29e551
Fix panic with missing api-party URL
NathanFlurry Aug 6, 2023
ceb67e8
Add override dependencies & recurse dependency list
NathanFlurry Aug 6, 2023
1026c40
Fix Cargo dependencies
NathanFlurry Aug 6, 2023
2cac855
Fix activities
NathanFlurry Aug 6, 2023
2af1141
Fix developer link
NathanFlurry Aug 6, 2023
761c110
Update link addr
NathanFlurry Aug 6, 2023
f5e452d
update migration script
NathanFlurry Aug 6, 2023
885a589
Add bolt headless reading secrets
NathanFlurry Aug 6, 2023
04f9184
B2 file lock hotfix
NathanFlurry Aug 6, 2023
e4dc7bd
Validate dir exists before mounting
NathanFlurry Aug 6, 2023
dc07c5c
Fix get_secret.sh script to use Bash
NathanFlurry Aug 6, 2023
4a0e20c
ATS dirs
NathanFlurry Aug 6, 2023
d5799a6
Change default user searchable
NathanFlurry Aug 6, 2023
a7c616f
Fix worker threads
NathanFlurry Aug 6, 2023
10b3f7d
Add list migrations
NathanFlurry Aug 6, 2023
56cecdc
Enable Tokio Console
NathanFlurry Aug 6, 2023
a1b103d
Update Tokio
NathanFlurry Aug 6, 2023
365d3ae
Add NATS docs
NathanFlurry Aug 7, 2023
a228940
Fix misconfigured Nomad dynamic firewall
NathanFlurry Aug 7, 2023
b67f5f9
Update prod Rust version
NathanFlurry Aug 7, 2023
2ec3fbf
Remove IPv6 inbound for Nebula
NathanFlurry Aug 7, 2023
0520bde
Update async-nats to 0.30
NathanFlurry Aug 7, 2023
8fb1988
WIP trying to fix stuff
NathanFlurry Aug 7, 2023
e3a07ed
Update Nomad
NathanFlurry Aug 11, 2023
2ca3521
Disable lobby closed
NathanFlurry Aug 12, 2023
d7aa860
Merge remote-tracking branch 'origin/main' into max/custom-lobbies
NathanFlurry Aug 22, 2023
368e034
Change verification failed to user error
NathanFlurry Aug 22, 2023
cd2beb7
Merge branch 'nathan/hotfix-2' into max/custom-lobbies
NathanFlurry Aug 22, 2023
fd47614
Fix worker compile errors
NathanFlurry Aug 22, 2023
9e8fd2e
Fix api-module
NathanFlurry Aug 22, 2023
121a11e
FIx remaining ctx references
NathanFlurry Aug 22, 2023
8b1c3c7
FIx check
NathanFlurry Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Cloud** Support multipart uploads for builds
- **Infra** Support configuring multiple S3 providers
- **Infra** Support multipart uploads
- **Infra** Replace Promtail-based log shipping with native Loki Docker driver
- **Infra** Add local Traefik Cloudflare proxy daemon for connecting to Cloudflare Access services
- **Infra** Local Traefik Cloudflare proxy daemon for connecting to Cloudflare Access services
- **Infra** Upload service builds to default S3 provider instead of hardcoded bucket
- **Bolt** Support for connecting to Redis databases with `bolt redis sh`
- **Bolt** Add confirmation before running any command in the production namespace
- **Bolt** Confirmation before running any command in the production namespace
- **Bolt** `--start-at` flag for all infra commands

### Changed

Expand All @@ -25,12 +28,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Infra** Update Consul to 1.16.0
- **Infra** Update Imagor to 1.4.7
- **Infra** Update NATS server to 2.9.20
- **Infra** Update Node Exporter server to 1.6.1
- **Infra** Update Nomad to 1.6.1
- **Infra** Update Node Exporter server to 1.6.0
- **Infra** Update Nomad to 1.6.0
- **Infra** Update Prometheus server to 2.46.0
- **Infra** Update Redis Exporter to 1.52.0
- **Infra** Update Redis to 7.0.12
- **Infra** Update Treafik to 2.10.4
- **Bolt** PostHog events are now captured in a background task
- **Bolt** Auto-install rsync on Salt Master
- **Bolt** Recursively add dependencies from overridden services when using additional roots
- **KV** Significantly rate limit of all endpoints

### Security

Expand All @@ -40,4 +47,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **Portal** Skip captcha if no Turnstile key provided
- **Infra** Resolve [RUSTSEC-2023-0044](https://rustsec.org/advisories/RUSTSEC-2023-0044)
- **Infra** Missing dpenedency on mounting volumn before setting permissions of /var/* for Cockroach, ClickHouse, Prometheus, and Traffic Server
- **Chrip** Empty message parameters now have placeholder so NATS doesn't throw an error
- **Chrip** Messages with no parameters no longer have a trailing dot
- **Bolt** Correctly resolve project root when building services natively
- **Bolt** Correctly determine executable path for `ExecServiceDriver::UploadedBinaryArtifact` with different Cargo names

18 changes: 9 additions & 9 deletions docs/getting_started/INTERNAL_DASHBOARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Exposed tunnels & applications are configured [here](/lib/bolt/core/src/dep/terr

Replace `MAIN_DOMAIN` with the value of `dns.domain.main`.

- [Consul](https://consul.MAIN_DOMAIN))
- [Nomad](https://nomad.MAIN_DOMAIN))
- [Cockroach](https://cockroach-http.MAIN_DOMAIN))
- [ClickHouse](https://clickhouse-http.MAIN_DOMAIN))
- [Prometheus (svc)](https://prometheus-svc.MAIN_DOMAIN))
- [Prometheus (job)](https://prometheus-job.MAIN_DOMAIN))
- [Minio](https://minio-console.MAIN_DOMAIN))
- [Traefik (proxied)](https://ing-px.MAIN_DOMAIN))
- [Traefik (job)](https://ing-job.MAIN_DOMAIN))
- [Consul](https://consul.MAIN_DOMAIN)
- [Nomad](https://nomad.MAIN_DOMAIN)
- [Cockroach](https://cockroach-http.MAIN_DOMAIN)
- [ClickHouse](https://clickhouse-http.MAIN_DOMAIN)
- [Prometheus (svc)](https://prometheus-svc.MAIN_DOMAIN)
- [Prometheus (job)](https://prometheus-job.MAIN_DOMAIN)
- [Minio](https://minio-console.MAIN_DOMAIN)
- [Traefik (proxied)](https://ing-px.MAIN_DOMAIN)
- [Traefik (job)](https://ing-job.MAIN_DOMAIN)
- This does not support regional dashboards at the moment (SVC-2584)
- Will choose a random region until fixed
10 changes: 10 additions & 0 deletions docs/infrastructure/nats/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Troubleshooting

## Checking the health of the cluster manually...

1. `bolt ssh pool nats`
2. `nix-shell -p natscli`
3. `nats --server=10.0.44.2:4222 --user admin --password password context save default`
4. `nats context select default`
5. `nats server report connections`

12 changes: 12 additions & 0 deletions docs/infrastructure/saltstack/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ Try a few things to figure this out:
- Run `pstree -p my-pid` on the `salt-minion` process to see what subcommand is being ran
- Read the `salt-minion` logs with `journalctl -u salt-minion`
- Try applying specific SLS files with `salt apply 'my-minion' --sls my_file`

## Error when bootstrapping Minion: `RSA key format is not supported`

```bash
# Uninstall Salt
bolt ssh name staging-lnd-atl-crdb-05-2 'systemctl stop salt-minion; apt remove -y salt-cloud salt-common salt-minion; rm -rf /etc/salt /opt/saltstack /var/log/salt /var/cache/salt /run/salt /usr/bin/salt-*; echo Done'

# Re-run install_salt_minion
(cd infra/tf/pools && terraform state rm 'module.install_salt_minion["staging-lnd-atl-crdb-05-2"]')
bolt tf apply pools
```

9 changes: 9 additions & 0 deletions errors/mm/auto-create-failed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_AUTO_CREATE_FAILED"
description = "Could not find a valid game mode and region pair for automatic lobby creation."
http_status = 400
---

# Matchmaker Auto Create Failed

Could not find a valid game mode and region pair for automatic lobby creation.
9 changes: 9 additions & 0 deletions errors/mm/custom-lobbies-disabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_CUSTOM_LOBBIES_DISABLED"
description = "Custom lobbies are not allowed for the selected game mode."
http_status = 400
---

# Matchmaker Custom Lobbies Disabled

Custom lobbies are not allowed for the selected game mode.
10 changes: 10 additions & 0 deletions errors/mm/custom-lobby-config-invalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name = "MATCHMAKER_CUSTOM_LOBBY_CONFIG_INVALID"
description = "The given custom lobby config is invalid: {reason}"
description_basic = "The given custom lobby config is invalid."
http_status = 400
---

# Matchmaker Custom Lobby Config Invalid

The given custom lobby config is invalid. This is most likely because it exceeds the maximum size limit of 16KiB.
9 changes: 9 additions & 0 deletions errors/mm/custom-lobby-limit-reached.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_CUSTOM_LOBBY_LIMIT_REACHED"
description = "User cannot create any more custom lobbies."
http_status = 400
---

# Matchmaker Custom Lobby Limit Reached

User cannot create any more custom lobbies.
9 changes: 9 additions & 0 deletions errors/mm/find-disabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_FIND_DISABLED"
description = "The find endpoint has been disabled by the developer."
http_status = 400
---

# Matchmaker Find Disabled

The find endpoint has been disabled by the developer.
12 changes: 12 additions & 0 deletions errors/mm/identity-required.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name = "MATCHMAKER_IDENTITY_REQUIRED"
description = "This resource can not be accessed without an identity."
http_status = 400
---

# Matchmaker Identity Required

This resource can not be accessed without an identity.

If you are a developer seeing this error, make sure your API calls to matchmaker endpoints include a bearer
token with game user entitlements.
9 changes: 9 additions & 0 deletions errors/mm/join-disabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_JOIN_DISABLED"
description = "The join endpoint has been disabled by the developer."
http_status = 400
---

# Matchmaker Join Disabled

The join endpoint has been disabled by the developer.
2 changes: 1 addition & 1 deletion errors/mm/region-not-enabled-for-game-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Region not enabled for game mode."
http_status = 400
---

# Matchmaker Region Not Enabled
# Matchmaker Region Not Enabled For Game Mode

The region is not enabled for the game mode.

Expand Down
9 changes: 9 additions & 0 deletions errors/mm/region-not-found.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_REGION_NOT_FOUND"
description = "One or more of the provided regions was not found."
http_status = 400
---

# Matchmaker Region Not Found

The region(s) provided were not found.
12 changes: 12 additions & 0 deletions errors/mm/registration-required.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name = "MATCHMAKER_REGISTRATION_REQUIRED"
description = "This resource can not be accessed without a registered identity."
http_status = 400
---

# Matchmaker Registration Required

This resource can not be accessed without a registered identity.

If you are a developer seeing this error, make sure your API calls to matchmaker endpoints include a bearer
token with game user entitlements, and the given game user is registered on Rivet.
9 changes: 9 additions & 0 deletions errors/mm/verification-failed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "MATCHMAKER_VERIFICATION_FAILED"
description = "The user did not pass external matchmaker verification."
http_status = 400
---

# Matchmaker Verification Failed

The user did not pass external matchmaker verification.
13 changes: 13 additions & 0 deletions errors/mm/verification-request-failed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name = "MATCHMAKER_VERIFICATION_REQUEST_FAILED"
description = "The external matchmaker verification system failed or returned an invalid response."
http_status = 400
---

# Matchmaker Verification Failed

The external matchmaker verification system failed or returned an invalid response. This is not an error that
has been caused by the user.

If you are a developer seeing this error, check to see if your external matchmaker verification server is
correctly responding to Rivet's requests.
10 changes: 5 additions & 5 deletions fern/api/definition/cloud/games/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ types:
docs: A tag given to the game build.
type: string
image_file: uploadCommons.PrepareFile
multipart_upload:
type: optional<boolean>

CreateGameBuildResponse:
properties:
build_id:
type: uuid
upload_id:
type: uuid
image_presigned_request:
docs: >-
**Deprecated: use image_presigned_requests instead**
type: uploadCommons.PresignedRequest
image_presigned_requests: list<uploadCommons.PresignedRequest>
image_presigned_request: optional<uploadCommons.PresignedRequest>
image_presigned_requests: optional<list<uploadCommons.PresignedRequest>>

64 changes: 64 additions & 0 deletions fern/api/definition/cloud/version/matchmaker/game_mode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ types:
type: optional<integer>
docker:
type: optional<GameModeRuntimeDocker>
listable:
type: optional<boolean>

find_config:
type: optional<GameModeFindConfig>
join_config:
type: optional<GameModeJoinConfig>
create_config:
type: optional<GameModeCreateConfig>

# Region overrides
tier:
Expand Down Expand Up @@ -76,3 +85,58 @@ types:
properties:
min: integer
max: integer

GameModeIdentityRequirement:
docs: >-
The registration requirement for a user when joining/finding/creating a
lobby. "None" allows for connections without an identity.
enum:
- none
- guest
- registered

GameModeVerificationConfig:
# TODO: Add link to tutorial in docs
docs: >-
Configuration that tells Rivet where to send validation requests and with
what headers. When set, Rivet will send the `verification_data` property
(given by the user in the find/join/create endpoint) to the given url
along with the headers provided and some information about the requested
lobby. The response of this request will determine if the user can join
that lobby or not.
properties:
url: string
headers: map<string, string>

GameModeFindConfig:
docs: >-
Configures the requirements and authentication for the /find endpoint.
If this value is not set in the config, the /find endpoint is still enabled.
properties:
enabled:
docs: Sets whether or not the /find endpoint is enabled.
type: boolean
identity_requirement: GameModeIdentityRequirement
verification_config: optional<GameModeVerificationConfig>

GameModeJoinConfig:
docs: >-
Configures the requirements and authentication for the /join endpoint.
If this value is not set in the config, the /join endpoint is still enabled.
properties:
enabled:
docs: Sets whether or not the /join endpoint is enabled.
type: boolean
identity_requirement: GameModeIdentityRequirement
verification_config: optional<GameModeVerificationConfig>

GameModeCreateConfig:
docs: >-
Configures the requirements and authentication for the /create endpoint.
If this value is not set in the config, the /create endpoint is NOT enabled.
properties:
identity_requirement: GameModeIdentityRequirement
verification_config: optional<GameModeVerificationConfig>
enable_public: boolean
enable_private: boolean
max_lobbies_per_identity: optional<integer>
5 changes: 5 additions & 0 deletions fern/api/definition/matchmaker/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ types:
Pass this token through the socket to the lobby server. The lobby server
will validate this token with `PlayerConnected.player_token`
type: commons.JWT

CustomLobbyPublicity:
enum:
- public
- private
25 changes: 25 additions & 0 deletions fern/api/definition/matchmaker/lobbies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ service:
regions: optional<list<string>>
prevent_auto_create_lobby: optional<boolean>
captcha: optional<captchaConfig.Config>
verification_data: optional<unknown>
response: FindLobbyResponse

join:
Expand All @@ -64,8 +65,26 @@ service:
properties:
lobby_id: string
captcha: optional<captchaConfig.Config>
verification_data: optional<unknown>
response: JoinLobbyResponse

create:
path: /create
method: POST
docs: |
Creates a custom lobby.
request:
name: CreateLobbyRequest
body:
properties:
game_mode: string
region: optional<string>
captcha: optional<captchaConfig.Config>
publicity: localCommons.CustomLobbyPublicity
lobby_config: optional<unknown>
verification_data: optional<unknown>
response: CreateLobbyResponse

list:
path: /list
method: GET
Expand All @@ -85,6 +104,12 @@ types:
ports: map<string, matchmakerCommons.JoinPort>
player: matchmakerCommons.JoinPlayer

CreateLobbyResponse:
properties:
lobby: matchmakerCommons.JoinLobby
ports: map<string, matchmakerCommons.JoinPort>
player: matchmakerCommons.JoinPlayer

ListLobbiesResponse:
properties:
game_modes: list<localCommons.GameModeInfo>
Expand Down
Loading