Setting up a local development environment

This page describes how to set up a local development environment for the microservice dungeon project. With the local development environment you can develop and run your player locally. It runs the core services and the infrastructure (Kafka, RabbitMQ) of the Microservice Dungeon in a local docker-compose environment.

Clone the local_dev_env Repository

Clone the DevOps-Team/local-dev-environment Gitlab repository to your local machine.

# HTTP
git clone https://gitlab.com/the-microservice-dungeon/devops-team/local-dev-environment.git

# SSH
git@gitlab.com:the-microservice-dungeon/devops-team/local-dev-environment.git

Next Steps

Local Dev Environment

The local dev environment is - as the name implies - an environment for local development and testing based on docker compose. This includes a compose file (compose-msd.yml) for running the Microservice Dungeon (MSD) and an additional file (compose-monte.yml) for starting a player maintained by us - as smoke test and for demonstration purposes.

Setup

Prerequisites

  • Docker(-Desktop) with Docker Compose
  • 4GB RAM
  • 1 CPU Core

Hint: Make sure to review your docker resource settings

Authenticate to GitLab Registry

First, you will need to authenticate docker with our gitlab registry to be able to pull our images. Consult the GitLab Documentation for instructions on how to generate a Personal Access Token (PAT). Use the following command to authenticate docker:

docker login registry.gitlab.com -u "<User>" -p "<PAT>"

Start the environment

Start the Microservice Dungeon by executing the following command:

docker compose -f compose/msd/compose-msd.yml up -d

Optionally, deploy player MONTE with the following command as soon as all containers are up and running:

docker compose -f compose/player/compose-monte.yml up -d

When you’re done, you can stop the MSD by executing the following command:

docker compose -f compose/msd/compose-msd.yml down

Start a new game

Open the MSD Dashboard under http://localhost:4200 to create a new custom game. If player MONTE is deployed, it should automatically join as soon as a new game is created. Start the game by pressing start. A view of the map should open and you should be able to verify that something is happening.

Known issues

Note, that there are a few known issues that are currently worked on. If you encounter additional problems, make sure to report them to us either on discord or as a bug issue on gitlab.

  • Player MONTE exits:
    The player is currently under development and has a few known issues. One of them is, that it expects on startup that no game is currently running. Otherwise, it may fail. Another issue is, that around 40 to 60 rounds in the game MONTE will cause heavy CPU usage and may fail to process events in time which inevitably leads to a drift. Stopping the game at this point will cause MONTE to process stale events. While doing this, MONTE will not be able to join any new game.
  • Stale game data:
    Some services fail to recognize the ending of a game causing previous data to remain. This will cause a faulty account balance and robot count to be displayed. Restarting all services solves this issue (temporarily).
Last modified February 4, 2025: fix go & npm dependencies (8ff1fa0)