The functionality exposed in the frontend. minecraft-platform-backend-api/ a REST API written with the FastAPI framework that facilitates.The awscdk-minecraft package deploys this as a static website in an S3 bucket. minecraft-platform-frontend/ a React/TypeScript website where users can start/stop a Minecraft server.The other folders in this repository are artifacts that this package includes (and deploys!). Uses AWS CDK to create the infrastructure. This project started as a December 2022 month-long Hackathon.Ĭontributors can expect to come away with an enviable amount of real-world cloud architecture Image taken from itzg/docker-minecraft-server Contributing Much more detailed documentation for operating the minecraft serverĬan be found in the itzg/docker-minecraft-server docs: Ssh -i ~/.ssh/id_rsa operate as root to have docker privileges To issue commands on the server: # connect to the instance The file structure of the server is like this: /minecraft Spigot and Bukkit "plugins" (mods) like WorldEdit are supported by Paper. Optimized Minecraft server JAR called Paper.Ī fork of the popular Spigot server, which in turn The container is called itzg/docker-minecraft-server. The Minecraft server runs on the EC2 instance using docker-compose. ssh -i ~/.ssh/id_rsa the server and running commands as admin Ĭonnect to the instance when the server is running. MinecraftPaasStack ( APP, "awscdk-minecraft". If you have trouble with this command, you can always create the key pair in the AWS Console. # create a new keypair from ~/.ssh/id_rsa.pub SSH_KEY_PAIR_NAME =eric-keyĪws ec2 import-key-pair -key-name $SSH_KEY_PAIR_NAME -public-key-material file://~/.ssh/id_rsa.pub -profile -region synth () Connecting to the server over SSHĪfter starting a temporary EC2 instance with the minecraft server, you canĬonnect to it over SSH if you set up a keypair.Ĭreate a keypair, for example, using an existing SSH keypair. # app.py import os from aws_cdk import App, Environment from cdk_minecraft import MinecraftPaasStack APP = App () MinecraftPaasStack ( APP, "awscdk-minecraft", # login_page_domain_name_prefix just needs to be unique across all AWS accounts login_page_domain_name_prefix = "mlops-club-minecraft-login" ) APP. -> the minecraft server, whenever the EC2 instance is running.-> the PaaS UI to start/stop the server.You will need to have a domain name registered with AWS Route53.įor example, for the domain you can create these mappings: You can add the components of your minecraft stack as subdomains of a custom □ Note: For a complete, working example of the advanced usage, you can refer to Otherwise, just share the IP address with any friends you'd like to be able to join the game. Want them to be able to start and stop the server, too. Share this link with friends and create Cognito users for them as well if you One of the stack outputs will be the URL of the Minecraft Platform frontend. It will be in whichever region you deployed the stack to. A Cognito User Pool is created by the stack for this purpose. You will need to register a user in AWS Cognito UI so that you can log into the websiteĭeployed by the stack. (4) Create a Cognito User in the AWS Console If you are not familiar withĪWS CDK and what an app.py file is, you can read more about it in the AWS CDK docs. Note: app.py is an AWS Cloud Development Kit concept. (3) Use it in your CDK app # app.py import os from aws_cdk import App, Environment from cdk_minecraft import MinecraftPaasStack APP = App () MinecraftPaasStack ( APP, "awscdk-minecraft", # login_page_domain_name_prefix just needs to be unique across all AWS accounts login_page_domain_name_prefix = "mlops-club-minecraft-login" ) APP. (2) Install the AWS CDK stack exposed by this package pip install awscdk-minecraft # get a temporary login session to Īws ecr-public get-login-password -region us-east-1 | docker login -username AWS -password-stdin You will need to log into AWS's public docker registry (). Note: This library makes use of some of AWS's public docker images. Docker (should be installed and running).NodeJS 14 or higher (a dependency of the AWS CDK CLI).Play! Usage (1) Be sure to have the the following installed: To provision an entire, cheap, Minecraft-server-hosting Platform as a Service to their The goal of this project is to make a single pip-installable package that allows anyone
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |