Giter Club home page Giter Club logo

minecraft-evoker's Introduction

minecraft-evoker

A set of scripts for running a minecraft server on AWS spot instances.

Purpose

This repository provides a way to create a cloudformation stack which creates:

  • An s3 bucket for storing configuration files, server binaries, and world backups.
  • An elastic ip address which can be used to connect to the minecraft server when it is running.
  • An autoscaling group which automatically places spot bids in order to make sure that an ec2 instance is available.
  • A launch configuration which helps bootstrap an instance, download relevant world backups and configuration files and brings the minecraft server online.

Prerequisites

You must have an AWS account. On your computer, make sure that you have the AWS cli installed and have configured it to use the credentials for the aforementioned account by default. Currently, the helper scripts don't support using other profiles, but that's trivially easy for you to add if you know what you are doing.

Make sure that you create an EC2 Key Pair for logging into the ec2 instance running the server.

Usage

  1. Copy parameters.sample.json to parameters.json and edit the values accordingly.
  • ServerFilename - the name of the minecraft server that you downloaded from mojang (or whatever you renamed it to)
  • BucketName - whatever you want to name your new s3 bucket
  • ServerName - some arbitrary, alphanumeric name for your server
  • InstanceType - the EC2 instance type which you want to provision and run your minecraft server on
  • OperatorEMail - your email address. This is used to notify you of autoscaling operations.
  • KeyName - This is the name of the EC2 Key Pair that you created as a prerequisite.
  • SSHLocation - This is the ip address of your home. It is used in a hacky way to lock down ssh access to just you.
  • SpotBid - The maximum amount of money that you are willing to pay for the ec2 instance, per hour. This does not account for all costs which will be incurred by the infrastructure created by using these scripts. Please see AWS documentation and read the code in this repository for details.
  1. Run create-stack.sh (located in the helpers directory) to create the s3 bucket.

  2. Run upload-scripts.sh to upload the bootstrap and subsystem scripts to the bucket.

  3. Upload the server file that you downloaded from Mojang to the bucket you specified in parameters.json. It should be placed in the /common/servers/ directory.

  4. Upload any relevant minecraft configs to the bucket under /servers/YOUR_SERVER_NAME/configs. You must confirm the acceptance of the minecraft server eula by placing a properly configured eula.txt in that directory in order for the server to start.

  5. Run update-stack.sh to update the existing stack and build a server.

  6. Lookup the elastic IP that was created in the AWS console. You may use this to connect to your server.

If at any time, you want to delete the stack that you created, run delete-stack.sh. This does not guarantee that all resources will be deleted in AWS. You will need to do your due diligence to make sure that they are.

Contributing

Pull requests welcome!

minecraft-evoker's People

Contributors

jmpage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

minecraft-evoker's Issues

Non-issue

Not sure how else to get in contact with you because I'm a git noob.

I have a question, will this save my MC data every X minutes or only when it shuts down and finds a new spot instance? I think you can force backups thru the MC console but not sure.

I've also never used spot instances, do prices change frequently? Will my server go down like once a day or multiple times an hour as it finds new instances.. I guess it depends on what I put my spotbid price at..

Last question I wanted to ask, which I can probably find out by googling.. is there a way to set a timer? even if im doing some bidding at midnight.. can I just turn the bidding / all ec2 instances off during certain periods of the night when no one is online?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.