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.