• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

darrelldavis/terraform-aws-minecraft: Terraform module to configure a minecraft ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

darrelldavis/terraform-aws-minecraft

开源软件地址(OpenSource Url):

https://github.com/darrelldavis/terraform-aws-minecraft

开源编程语言(OpenSource Language):

HCL 56.4%

开源软件介绍(OpenSource Introduction):

terraform-aws-minecraft

Terraform module to provision an AWS EC2 instance with an S3 backing store for running the Minecraft server.

Features

  • Download and play any available version of minecraft (downloaded from Mojang)
  • Configurable syncing (frequency in minutes) of game folder on EC2 to S3
  • When done, keep your game in S3 and pick up where you left off

Usage

Example from latest version, using default values for everything:

module "minecraft" {
  source = "[email protected]:darrelldavis/terraform-aws-minecraft.git?ref=master"
}

This will create all needed resources, including an S3 bucket to persist the game state. If you subsequently use terraform destroy the S3 bucket will not be destroyed as it will not be empty. You can choose to delete the bucket yourself with aws s3 rb s3://bucket-name --force or keep the game for future play. If the latter, add the bucket as bucket_name in your module call, for example:

module "minecraft" {
  source = "[email protected]:darrelldavis/terraform-aws-minecraft.git?ref=master"
  bucket_name = "games-minecraft-1234567890"
}

This will sync the bucket contents to the EC2 instance before starting minecraft and you can pick up play where you left off!

See examples directory for full example(s).

Example using original (legacy) version:

module "minecraft" {
  source = "[email protected]:darrelldavis/terraform-aws-minecraft.git?ref=v1.0"
}

Inputs

Name Description Default Required
allowed_cidrs Allow these CIDR blocks to the server - default is the Universe 0.0.0.0/0
ami AMI to use for the instance, tested with Ubuntu and Amazon Linux 2 LTS latest Ubuntu
associate_public_ip_address Toggle public IP true
bucket_name Bucket name for persisting minecraft world generated name
environment Environment (for tags) prod
instance_type EC2 instance type/size t2.medium (NOTE: NOT free tier!)
java_ms_mem Java initial and minimum heap size 2G
java_mx_mem Java maximum heap size 2G
key_name EC2 key name for provisioning and access generated
name Name to use for servers, tags, etc (e.g. minecraft) mc
namespace Namespace, which could be your organization name or abbreviation (for tags) games
mc_backup_freq How often (mins) to sync to S3 5
mc_port TCP port for minecraft. If you change this from the default, you also need to manually edit the minecraft server.properties file in S3 and/or EC2 instannce after the build. (todo: install custom server.properties) 25565
mc_root Where to install minecraft /home/minecraft
mc_version Which version of minecraft to install latest
subnet_id VPC subnet id to place the instance chosen from default VPC
tags Any extra tags to assign to objects {}
vpc_id VPC for security group default VPC

Outputs

Name Description
ec2_instance_profile EC2 instance profile
id EC2 instance ID
private_key The private key data in PEM format
public_ip Instance public IP
public_key The public key data in PEM format
public_key_openssh The public key data in OpenSSH authorized_keys format
subnet_id Subnet ID instance is connected to
vpc_id VPC ID for instance
zzz_ec2_ssh SSH command to connect to instance

Authors

Darrell Davis

License

MIT Licensed. See LICENSE for full details.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap