Minecraft and docker


#1

Hello!

And welcome to Minecraft and Docker. In this book I hope to show you the awesome stuff you can do with docker. But first, What is docker?

Docker lets you create containers in one file which you can then run anywhere with docker installed. This means we can have a test server on our laptop which we can make changes to and then push to all our other servers. We'll look more closely at this soon but first, An example:

Example

Wondering why you should read this booklet? Here's an example

The networks

Both of the networks we'll be testing have the following servers:

| Hub | Party Games | SG | Walking Dead |
|---|---|---|---|
|hub1|pg1|sg1|wd1|
|hub2|pg2|sg2|wd2|
|hub3|pg3|sg3|wd3|
|hub4|pg4|sg4|wd4|
|hub5|pg5|sg5|wd5|
|hub6|pg6|sg6|wd6|
|hub7|pg7|sg7|wd7|

Let's call one FastCraft and the other SnailCraft.

The owner of FastCraft read this booklet before he setup his server and uses all the techniques in it.
The owner of SnailCraft uses the 'classic' way.

Updating

The server software for the hub servers has gone out of date! The owners need to update it to fix several security issues.

FastCraft

The owner modifies his local folder, pushes his changes to a central repository and sends the restart signal to all his servers. When they restart, they make sure they're up to date with the central repository meaning his changes are up to date.

Estimated downtime: 5 minutes tops (Time for Stop + Time for download + Time for Start)

SnailCraft

The owner individually shuts down each server, uploads the new server software and restarts the server.

Estimated downtime: 35 minutes at least ((Time for Stop + Time for upload + Time for start) * 7)

UpScaling

Both of the server owners have decided that they need more servers, they decide to add 3 more of each server.

FastCraft

The owner goes into a web control panel and makes 3 more of each image.

**Estimated time : ** 2 minutes

SnailCraft

For each server the owner registers a new server with his hosting company, FTPs in, replaces it with the files for the server and starts the server.

**Estimated time : ** 1 hour ((Time to register server + Upload time + Start time) * 12)

How much time would you like it to take, 2 minutes or 1 hour?

Let's create our own version of FastCraft!

But first

All the code snippets in this book are tested on Ubuntu 14.04. Whilst they may work on some other platforms it is recommended that you install Ubuntu on a dual boot with Windows as Docker is currently Linux-only.

Continue reading


#2

What does docker mean?


#3

I don't see any pages beyond docker


#4

There's an introduction in the docker section, I'll move it to the introduction.

What do you mean?


#5

There is nothing written beyond the docker page


#6

hmm, i'm not sure if I want let Docker setup and controll my servers:

The owner goes into a web control panel and makes 3 more of each image.

How would you do this without scaling the Hardware in Background?
So if I want to use Docker i have to host the server on a Network thats made for that kind of automatism? => Limits available hoster!

I think it would be a much nicer idea to design it with the "Dropbox"-principe:

Have one or more servers and a Storage on your Local PC - all linked together
Wan't to change sth?
modify folder and wait until all modified files are synchronized on all servers (servers can communicate with the others to have a faster upload)
than: Restart/Reload your servers (maybe a little panel that execute a configurable bash-script on each server)

want to add another Server?
rent a server, connect over SSH, install the server application, join the shared folder, wait until it's synced - ready to go


#7

Tutum can handle this, I believe you can setup a 'deployment strategy' which can be balanced or one per server. As well as this, when you deploy to the integrated services (shown right at the end), it automatically creates a new machine \droplet. I will look into this more tomorrow


#8

Please run a spellchecker over your book first. :wink:


#9

Hmmm could be interesting.
I use git and remotetoolkit for my servers. But yeah I don't really have to deal with update problems xD. Tekkit lite hasn't been updated in 3 years.


#10

This. Is. Amazing. :D Good work Oscar!


#11

Thanks! It's the first tutorial I've ever made so I was afraid Everyone would hate it.

Still, If you ever decide to branch out...

Sorry. I'll do that now.


#12

After looking into it further, It appears that tutum haven't currently done anything with the 'Deployment Strategy' feature. You can however, set a minimum memory and cpu shares requirement for each container, you can find a section on that right at the end.

Thanks


#13

I can't seem to find a link to the tutorial, I saw it a few days ago, and it was amazing.


#14

Read through it. My thoughts:

Definitely something for big server owners.


#15

Sorry, I've added that again.

BT have messed up my broadband so I won't be active till Monday


#16

Thanks. smile smile smile


#17

Tutum have pushed out some cool new features including Deployment Strategies, I'll update this when I have time.


#18

I reread the page, It looks like I could avoid all the work be making an archive in MineOS on the main sever, and then just create new servers from that. This would take a little longer than the Docker setup, but is a lot better for those not wanting to setup (fjnkfrkgnrkgnerkg) that you have up there. I think it would be cool if you could explain this seeing as anyone who would actually have use for this would probably have a dedicated server by now. And MineOS is link 50x easier than this.


#19

I've never used MineOS, Can you please tell me it's improvements and stuff.

Docker is made for having the same environment anywhere with docker, this makes it much easier to test and deploy to multiple machines.

Still, whatever floats your boat.


#20

First of, it's written in the best language ever, python. Here take a look at it. http://minecraft.codeemo.com