BlueSeph28 / maincra-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maincra Starter

standard-readme compliant

Minecraft starter used for CreepersLand server creation.

Table of Contents

Security

This script creates some keys for the server access. Don't share it to anyone that don't manage your minecraft server. Also you will need to provide Gcloud json creds to the script.

Background

In what consists?

This script initiates all the neccesary infrastructure to create one server, configuring all the neccesary tools, and providing a backup if it's specified. It uses docker.

Images

https://hub.docker.com/r/itzg/minecraft-server https://hub.docker.com/r/itzg/mc-backup

Pre-installed tools

  • docker 🐳
  • zip 💾
  • bash 📜
  • Terraform 🔧

Usage

  • Go to this link, and first create a new project Create new project

    Step1

    • Name it as you want, also you can edit the project-id, please save the id for future steps

    Step2

    • Go again to this link and select your new project Create new User

    • Create a new Service user

    Step3

    • Also give the permissions as owner to the service user (since this project is intended only for this service is ok)

    Step4

  • You need the shell for the next steps

    Step5

  • Select your new project with this command

gcloud config set project projectid

Step6

  • After selecting the project run the next commands to enable needed services
gcloud services enable storage.googleapis.com
gcloud services enable compute.googleapis.com
gcloud services enable cloudbilling.googleapis.com
Main process
  1. When it prompts you for the project, create a new one
  2. Copy the json that gcloud provides you to the root path of this repo in your local (Don't push it into remote!)
  3. Specify the name of the new project into the infrastructure/variables.tf file
  4. do make all
  5. wait
  6. done

For destroying your infrastructure

  1. do make destroy (the script will make a backup of your server files)
  2. done

If you want to use a backup file

  1. Put your backup.zip file in the root path of this repo (Don't push it into remote!)
  2. Change variable use_backup in infrastructure/variables.tf to yes
  3. do the main process

Do you have a baremetal server?

There is an option for provisioning the server if you have a baremetal server.

you need a private key for your server for an user with SUDO access.

make sure that the user can access to sudo without password.

Run USERHOST=[user] IPHOST=[ip] make baremetalProvision (replace variables values with yours)

makefile will check if you have plugins.zip and backup.zip files on the path ./server-conf/ if a file exists, will be copied into the server and used.

About


Languages

Language:Shell 44.5%Language:HCL 41.7%Language:Makefile 13.8%