In this tutorial, we will walk through the process of automatically deploying a Minecraft server on an AWS EC2 instance using Terraform and Ansible. This includes setting up the EC2 instance, configuring security groups, installing necessary dependencies, and ensuring the server starts automatically. By the end, you'll be able to connect to your Minecraft server from the Minecraft client.
- AWS CLI configured with your credentials
- Terraform
- Ansible
- Clone the repository and navigate to the project directory.
git clone [email protected]:CS-312-nilsstreedain/project-part-2.git
cd project-part-2
- Add AWS CLI Credentials
nano aws_credentials
- Run
setup.sh
to provision the infrastructure and configure the server.
chmod +x setup.sh
./setup.sh
- Retrieve the public IP from the Terraform output.
- Run nmap on the IP
nmap -sV -Pn -p T:25565 <instance_public_ip>
- Retrieve the public IP from the Terraform output.
- Connect to the server using the Minecraft client at
<Public_IP>:25565
.