Skip to content

LClarky/CS312_MinecraftPart2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Server Setup Guide

Requirements

Tooling

  • Terraform: Version 1.0.11 or later
  • AWS CLI: Version 2.0 or later
  • AWS Account: With appropriate permissions to create EC2 instances and security groups

Broad Overview

  1. Infrastructure Provisioning: Use Terraform to provision the necessary AWS resources, including security groups and an EC2 instance.
  2. Configuration: A startup script (minecraft.sh) configures the EC2 instance, installs Java, downloads the Minecraft server, and sets up the server as a systemd service.
  3. Deployment: Execute Terraform commands to initialize, format, validate, and apply the configuration, deploying the Minecraft server.

Tutorial

Step 1: Set Up Your Environment

  1. Clone Repository: Clone this repository on to you local machine.
  2. Install Terraform: Follow the official guide to install Terraform.
  3. Install AWS CLI: Follow the official guide to install AWS CLI.
  4. Configure AWS CLI: Run aws configure and provide your AWS Access Key ID, Secret Access Key, region, and output format. a. You may need to enter a session token as well. To do this in your root directory type cd .aws and then vim into the credentials file. vim credntials and copy your aws_session_token below your key ID and access key.
  5. Generate SSH Key: Generate an SSH key named MinecraftKey by going to the AWS dashboard, search for "key pairs" in the search bar, and click "Create key pair". Name it MinecraftKey, and download the .pem file into the cloned repository.

Step 2: Run Start_Server.sh

  1. Once you are ready run the start_server.sh script
./start_server.sh
  1. This script will run Terraform commands, which will apply the configuration, and execute the remote-exec provisioner. Once the script is done it will print the public IP address for the server. You can then connect using your nmap -sV -Pn -p T:25565 <instance_public_ip> and enjoy your server.

Step 3: Delete Server

  1. Once you are done using the server run the command
terraform destroy
  1. Type yes to confirm the destruction of the server

Sources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published