https://github.com/noahc3/cumulus-comp4300
Implementation of core technologies required for deploying and communicating with game servers hosted in the Cloud.
https://github.com/noahc3/cumulus-comp4300
Last synced: 2 months ago
JSON representation
Implementation of core technologies required for deploying and communicating with game servers hosted in the Cloud.
- Host: GitHub
- URL: https://github.com/noahc3/cumulus-comp4300
- Owner: noahc3
- Created: 2024-04-10T20:33:30.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T18:20:36.000Z (about 2 years ago)
- Last Synced: 2025-01-25T21:27:48.019Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.25 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cumulus - Game Server Control Panel & Daemon
**Authors: Noah Curoe, Mia Battad**
Implementation of core technologies required for deploying and communicating with game servers hosted in the
Cloud. The final implementation uses TypeScript, React, TailwindCSS, Vite and Bun for the frontend stack, Go for the daemon software, and Python with FastAPI for some auxiliary API functions for interacting with Hetzner Public Cloud.
## Video Demo
Demonstration of deploying a new Minecraft server to Hetzner Public Cloud and using the web console interface
[Cumulus-Demo.webm](https://github.com/noahc3/cumulus-comp4300/assets/6082749/004278a2-75e9-4057-8bee-3347a39150dc)
## How to run
There are three components to this project:
- Frontend
- Daemon
- Hetzner Auxiliary API
**Important: Only Ubuntu 22.04 and MacOS have been tested!** To run on Windows, please use WSL2 with Ubuntu.
### Running the Frontend
Bun is an alternative JavaScript runtime and package manager which was used to create this project.
- Install [bun](https://bun.sh/docs/installation)
- Open a terminal in the `/project/frontend` directory
- Run `bun install`
- Start the dev server with `bun run dev`.
Nodejs may work, but is untested.
### Running the daemon
The daemon is written in Go.
- Install [go](https://go.dev/doc/install)
- Open a terminal in the `/project/final/cloud` directory
- Start the daemon with `go run . --host --port `
- host and port are optional, will default to `0.0.0.0:1111`
- Build a production binary with `go build`
### Running the Hetzner Auxiliary API
The auxiliary is built with Python and FastAPI.
- Install [Python](https://www.python.org/downloads/)
- Note: Tested with Python 3.10.12, other versions may work but are untested
- Open a terminal in the `/project/final/hetznerfuncs` directory
- Install uvicorn: `pip install uvicorn`
- Install other required packages: `pip install -r requirements`
- Start the server with `uvicorn main:app --reload`
**Important:** You must create a file named `.env` in this directory and supply a Hetzner API key:
```env
# hetznerfuncs/.env
HETZNER_TOKEN=
```
You can create a Hetzner Cloud account here:
Billing is hourly so it isn't expensive to launch some test servers, but we recommend just watching the demo
video if you don't want to throw away money.
You will need to adjust the `main.py` script to specify your own SSH key (or remove it, Hetzner will email you
a root password).
## Other Files
While the above is all you need to worry about for running the final implementation of our project, we also
include source code for the test programs we wrote during the exploration phase of our project, detailed below.
- **docs/report**: Source for our project report. This is a mix of Markdown and Latex rendered to PDF using Pandoc.
- **project/cloud**: Our initial cloud daemon with some bugs, we do not recommend running this.
- **project/final** Directory with our final cloud daemon and hetzner functions
- **project/gs-go-daemon.service** - systemd service file to launch the daemon automatically. Pulled in the cloud-init.yml script.
- **project/frontend** - Full frontend including testing interfaces
- **project/httpclient** - Simple WS client we used to generate latency data results.
- **project/middleware** - Simple middleware server we used to generate latency data results.
- **project/mockprocess** - Two simple programs, one to echo any input that is typed, and another which will read a mock log file and spit it out to standard output at specified lines per second.
- **project/tcpclient** - Test TCP client
- **project/udpclient** - Test UDP client
- **project/wsclient** - Test WebSocket client