A local development infrastructure that provisions a k3d Kubernetes cluster with all necessary components to run the Grounds network.
# Clone and start everything
git clone <repository-url>
cd grounds-dev
make upThe make up command will automatically install missing prerequisites and deploy:
- k3d Kubernetes cluster (1 server + 2 agents)
- PostgreSQL database in
databasesnamespace - Agones for game server hosting in
gamesnamespace - Valkey in
databasesnamespace - Dummy HTTP server for testing in
infranamespace - API namespace for API services and microservices
To avoid image pull failures and rate limiting, set your Docker Hub credentials before creating the cluster:
# Set Docker Hub credentials
export DOCKER_USERNAME="your-dockerhub-username"
export DOCKER_PASSWORD="your-dockerhub-token"Security Note: Use a Docker Hub access token instead of your password:
- Go to Docker Hub β Account Settings β Security
- Create a new access token
- Use the token as
DOCKER_PASSWORD
To pull private images from GitHub Container Registry, configure your GHCR credentials in the .env file:
# Copy the example file and edit it
cp .env.example .env
# Edit .env and add your credentialsAdd the following to your .env file:
GHCR_USERNAME=your-github-username
GHCR_TOKEN=your-github-personal-access-tokenCreating a GitHub Personal Access Token (PAT):
- Go to GitHub β Settings β Developer settings β Personal access tokens β Tokens (classic)
- Click "Generate new token (classic)"
- Select the
read:packagespermission - Generate and copy the token
- Add it to your
.envfile asGHCR_TOKEN
The bootstrap script automatically:
- Loads credentials from
.envfile - Creates a global pull secret (
ghcr-pull-secret) in all namespaces - Configures all default service accounts to use the GHCR pull secret
This enables pulling private GHCR images without specifying imagePullSecrets in your Pod specs.
The GitHub token is also required for the self hosted Maven artifacts. Set these properties in ~/.gradle/gradle.properties:
github.user=your-github-username
github.token=your-github-personal-access-tokenThe Maven repository configuration expects those properties:
maven {
url = uri("https://maven.pkg.github.com/groundsgg/<repository-name>")
credentials {
username = providers.gradleProperty("github.user").get()
password = providers.gradleProperty("github.token").get()
}
}| Command | Description |
|---|---|
make up |
Start complete development environment |
make down |
Stop and delete the cluster |
make reset |
Reset the cluster (down + up) |
make status |
Show cluster and deployment status |
make logs |
Show logs for all services |
make test |
Test the deployment |
make help |
Show all available commands |
| Command | Description |
|---|---|
make port-forward |
Port forward services to localhost |
- Namespace:
databases - Credentials:
app/app - Database:
app - Port:
5432
# Port forward to access locally
kubectl port-forward -n databases svc/postgresql 5432:5432- Namespace:
games - CRDs:
fleets.agones.dev,gameservers.agones.dev
# Check Agones status
kubectl get fleets -n games
kubectl get gameservers -n games- URL: http://localhost/demo
- Namespace:
infra
# Test the server
curl http://localhost/demo# Check cluster status
kubectl get pods -A
# Check logs
make logs
# Restart everything
make reset