multiplayer minecraft - scale€¦ · multiplayer minecraft in mere moments using...

19
Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng Akira Wong

Upload: others

Post on 19-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Multiplayer Minecraft in Mere MomentsUsing AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes

SCaLE 15xMarch 2, 2017

Proud HengAkira Wong

Page 2: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

• Proud Heng• Math-CS Junior @ UCSD• Mentor for WHS Robotics• Keeps Minecraft on “Peaceful”

• Akira Wong• CS Senior @ UCI• Knows what

FORTRAN is• nano-using casual

About Us

@akiraw95

@proud_heng

Page 4: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

I want to play

Need to set up a Minecraft server, but…

IT’S COMPLICATED!

What dependencies are there?

How do I configure ports and IP addresses?

What if something needs to be updated?

How do I make sure it stays online?

with my kids and friends!

Page 5: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Solution: Containers

Page 6: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

What’s a Container anyway?

• Isolated app environment, similar to a VM

• More lightweight; scalable

• Portable

VM

Docker container

Page 7: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

What’s a Container anyway?

Automated configuration Stateless

011110010110000101111001001000000101001001000101010110000010110101010010011000010111100100100001001000010010000100100001

kill container

store data in container

start container again…

011110010110000101111001001000000101001001000101010110000010110101010010011000010111100100100001001000010010000100100001X

…state not retained

DockerfileFROM ...RUN ...EXPOSE ...CMD ...

Page 8: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Containers do not retain data between instances

Statelessness - What was that?

ONE TINY PROBLEM…

Page 9: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng
Page 10: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng
Page 11: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng
Page 12: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

How do I make sure my Minecraft server’s data is safe?

Page 13: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

• My container needs to be stateful to store Minecraft server data.• Mount local directory as volume for container.

~/minecraft/

Volume Mounts

/data/

kill containerrun container

state retained!

Local Machine Docker Container

Page 14: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Where should we save our Minecraft server data?

Mount local storage as volume for container!

REX-Ray to the rescue

Instead of local storage…Mount cloud storage as volume for container!

How?

REX-Ray

Page 15: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

DEMO

Page 16: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Setting up Minecraft servers is easy!

• What dependencies are there?

• What if something needs to be updated?

• How do I configure ports?

• How do I configure IP addresses?

• How do I make sure it stays online?

• How do I make sure my Minecraft server’s data is safe?

DOCKERFILE

CLOUD

Page 17: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

• Configure a virtual machine on AWS

• Install Docker and REX-Ray

• Get a Minecraft server running

• Play Minecraft with friends and family

• Upgrade your AWS virtual machine

Now what can you do?

Page 18: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

• Automated application deployment

• Isolated application environment

• https://www.docker.com/what-docker

• Open source volume driver for Docker

• Mounts remote volumes to store application data

• http://rexray.readthedocs.io/en/stable/#rex-ray

DockerREX-Ray

EC2/EBS

• Deploy virtual machines in the cloud

• Persistent storage in the cloud

• https://aws.amazon.com/ec2/details/

Page 19: Multiplayer Minecraft - SCALE€¦ · Multiplayer Minecraft in Mere Moments Using AWS/Docker/REX-Ray to deploy a Minecraft Server in 30 minutes SCaLE 15x March 2, 2017 Proud Heng

Resources & Contact Info

https://github.com/akiraw95/minecraft-container@proud_heng @akiraw95

[email protected]@gmail.com