From 4b84724a5f7336211ba23cfaf48c9a0ffe6fe111 Mon Sep 17 00:00:00 2001 From: Marek Rusinowski Date: Sun, 4 Aug 2024 21:47:44 +0200 Subject: [PATCH] Add components documentation --- docs/components.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 6 +++ requirements.txt | 1 + 3 files changed, 135 insertions(+) create mode 100644 docs/components.md diff --git a/docs/components.md b/docs/components.md new file mode 100644 index 0000000..b5c2830 --- /dev/null +++ b/docs/components.md @@ -0,0 +1,128 @@ +# Components + +Infra is spread across many different repositories, with different functions. On +this page is a current comprehensive list (index like) of everything that BAR +infrastructure consists of. + +> [!INFO] +> Even though many of the repositories below are hosting UI visible to players, +> the infrastructure team is not responsible for the design and overall UX +> improvements. The same applies to rating, balancing and data analysis. Other +> BAR development teams are supposed to drive planning and improvements to those +> aspects. + +## Live games serving + +The server side components responsible for facilitating live games: hosting the +engine instances clients connect to to play the game. + +- [Yaribz/SPADS]: Game lobby room hosting and engine handling on game servers. +- [spads_config_bar]: Spads configuration, bar manager plugin, official plugins + configuration. +- [ansible-spads-setup]: Overall game servers configuration. +- [p2004a/recoil-host]: Work in progress [tachyon] protocol autohost. + +There is also some monitoring setup: health checks using +[healthchecks.io](https://healthchecks.io/) and Okema's +[Zabbix instance](https://zabbix.bar.gaming.rodeo/). + +## Lobby rooms serving + +The online components needed to set up and prepare the lobby rooms before the +game happens. + +- [teiserver]: The primary piece here responsible for all the: + + - Account management logic + - Moderation + - Lobby rooms permissions and management + - Middleware between client side components and SPADS + + [hailstorm] are the integration tests. + +- [ansible-teiserver]: Teiserver server configuration. +- [tachyon]: Work in progress new lobby server protocol specification. +- Even though the SPADS and its configuration is mentioned in the previous + section, it also belongs here. SPADS is handling both lobby rooms setup and + then game handling. + +## Client side infra + +Pieces responsible for ensuring that players have all the assets available and +ready to start the game. + +- [BYAR-Chobby]: Our current lobby client. + + It's responsible for communication with lobby server, launcher, preparing + engine start script. + +- [bar-lobby]: New work in progress lobby client. +- [spring-launcher]: Game installer and launcher. + - [flathub/info.beyondallreason.bar]: Linux Flatpak package for launcher. +- [pr-downloader]: CLI application distributed with engine used for downloading + mods/games + + Could be interpreted also to belong in the engine team, but it heavily + impacts infra. + +- [bar_debug_launcher]: BAR Debug launcher. It's not intended for end users, + it is a developer tool. + +## Game assets distribution + +Infrastructure responsible for making all the game assets available to players. + +- [RapidTools]: Packaging of game git repo to rapid format. +- [rapid-hosting]: Rapid build server configuration. +- Game CDN distribution: CDN management and syncers to CDN. + - [p2004a/spring-rapid-syncer]: Rapid repo syncer from builder host to CDN. + Also includes a prober to for debugging CDN replication issues. + - [p2004a/bar-repos-bunny-replication-lag-mitigation]: Helper to make sure + updates to CDN are pushed in consistent way. + - [p2004a/rapid-pool-init]: Builder for the initial rapid game download. + package. +- [p2004a/springfiles-mirror]: Map CDN: publishing, serving, IaC setup. +- Maps metadata setup + - [maps-metadata]: Main repo that transforms data and distributes to other + places via GitHub actions. Also contains source for a few server side + components of that system. + - Maintenance of [https://rowy.beyondallreason.dev/](https://rowy.beyondallreason.dev/) (deployment with [custom BAR patches](https://github.com/p2004a/rowy/tree/bar-fork)). + +## Auxiliary services + +- BAR Live services (replays, leaderboard, battles linked as `iframe`s from [www.beyondallreason.info](https://www.beyondallreason.info/)): + - [Jazcash/bar-db]: Backend service, effectively [https://api.bar-rts.com/](https://api.bar-rts.com/) + - [Jazcash/bar-live-services]: Frontend embeded in main website [https://bar-rts.com/](https://bar-rts.com/) +- Teiserver contains some additional functionality in this category: + - Microblog + - Discord bot + - Engine crash logs +- [logs-upload]: Small Cloudflare worker to handle log upload from launcher. +- Main website is created in [Webflow](https://webflow.com/) and not part of BAR + infrastructure. + + +[Yaribz/SPADS]: https://github.com/Yaribz/SPADS +[spads_config_bar]: https://github.com/beyond-all-reason/spads_config_bar +[ansible-spads-setup]: https://github.com/beyond-all-reason/ansible-spads-setup +[p2004a/recoil-host]: https://github.com/p2004a/recoil-host +[Teiserver]: https://github.com/beyond-all-reason/teiserver +[hailstorm]: https://github.com/beyond-all-reason/hailstorm +[ansible-teiserver]: https://github.com/beyond-all-reason/ansible-teiserver +[tachyon]: https://github.com/beyond-all-reason/tachyon +[BYAR-Chobby]: https://github.com/beyond-all-reason/BYAR-Chobby +[bar-lobby]: https://github.com/beyond-all-reason/bar-lobby +[spring-launcher]: https://github.com/beyond-all-reason/spring-launcher +[pr-downloader]: https://github.com/beyond-all-reason/pr-downloader +[flathub/info.beyondallreason.bar]: https://github.com/flathub/info.beyondallreason.bar +[bar_debug_launcher]: https://github.com/beyond-all-reason/bar_debug_launcher +[RapidTools]: https://github.com/beyond-all-reason/RapidTools +[rapid-hosting]: https://github.com/beyond-all-reason/rapid-hosting +[p2004a/spring-rapid-syncer]: https://github.com/p2004a/spring-rapid-syncer +[p2004a/bar-repos-bunny-replication-lag-mitigation]: https://github.com/p2004a/bar-repos-bunny-replication-lag-mitigation +[p2004a/rapid-pool-init]: https://github.com/p2004a/rapid-pool-init +[p2004a/springfiles-mirror]: https://github.com/p2004a/springfiles-mirror +[maps-metadata]: https://github.com/beyond-all-reason/maps-metadata +[Jazcash/bar-db]: https://github.com/Jazcash/bar-db +[Jazcash/bar-live-services]: https://github.com/Jazcash/bar-live-services +[logs-upload]: https://github.com/beyond-all-reason/logs-upload diff --git a/mkdocs.yml b/mkdocs.yml index c4a916f..e8038ee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,3 +11,9 @@ plugins: - git-revision-date-localized: enable_creation_date: true - search + - callouts +markdown_extensions: + - attr_list + - admonition + - pymdownx.details + - pymdownx.superfences diff --git a/requirements.txt b/requirements.txt index d3e44bc..57c1a68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ mkdocs~=1.6.0 mkdocs-material~=9.5.31 +mkdocs-callouts~=1.13.2 mkdocs-git-revision-date-localized-plugin~=1.2.6