Nakama by Heroic Labs is a scalable game-server for social and real-time games. The objective is to run the Nakama server on an EKS cluster supported by any database supporting Postgres protocol on AWS infrastructure.
The EKS cluster should be able to pull a docker image of the configuration and custom scripts from AWS ECR and start the Nakama pod.
- Run Nakama on an EKS cluster (single node, as multiple nodes, aren't supported by the open-source version).
- Host a database to support the Nakama server.
- The current configuration required is for a development environment that can be later ported for other environments.
- Brownie points for pipeline automation.
- Unity project should be able to connect to the server (needs DNS name or public IPv4 to connect to the server from Unity).
- Access to the Nakama console on port 7451.
- [Terraform]
- [aws-cli]
- [Docker]
- [kubectl]
- [helm]
cd /devops/terraform/nakama/ecr
terraform init
terraform plan
terraform apply
cd /devops/terraform/nakama/vpc
terraform init
terraform plan
terraform apply
cd /devops/terraform/nakama/eks
terraform init
terraform plan
terraform apply
In the Actions > terraform-plan-apply-destroy-with-input section
You can hit Run Workflow, select the desired Terraform action, and then the Stack:
Actions:
- Plan: terraform plan
- Apply: terraform apply
- Destroy: terraform destroy
- Outputs: show Nakama Server URL
Stacks:
- ECR
- EKS
- VPC
You just need to execute in this order
-
1: Apply : VPC
-
2: Apply : EKS
At the end of the execution of Apply : EKS, you will be able to observe in the Get URL step of the Pipeline the Endpoint to connect to the Nakama Administration Console: