Archive
Having Fun with the Cloud? Make a Minecraft Server on Ubuntu! Part 1
With the 30 day free evaluation of Microsoft’s Cloud, aka Azure, I decided to try and make the cloud fun, so I made a Ubuntu VM which now hosts Minecraft, which my kids love to play on now. Those that know about Minecraft servers, I am actually building a Bukkit server. It is very similar to a Minecraft server, it just has more built in administrative support as well as plugins, user made files that can change the server, which make multiplayer experience easier to manage. This will be a three part series that will cover the following topics.
Part 1 will list out the tools that will need to be downloaded, as well as signing up for the free Azure account.
Part 2 will step you thru creating the Virtual Machine in the cloud, and creating an endpoint to access what is on the VM that was just created.
Part 3 will step you thru connecting to the server using PuTTY and WinSCP, copying files using WinSCP, installing Java, and finally starting up the Bukkit Server.
Azure free trail sign up
To get started with your own trial account create an account here: http://aka.ms/mshosting
Tools
The following tools will make doing this project much easier.
PuTTY Telnet and SSH client
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
PuTTYgen an RSA and DSA key generation utility.
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
WinSCP – Easy file transfer utility from Windows to Linux Systems
http://winscp.net/eng/index.php
GitHub/GitShell – Used to generate OpenSSL key.
http://windows.github.com/
Oracle Java SE will need to be downloaded (have to select the Accept License Agreement before you can download the file)
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Either Linux x86 or Linux x64 the example will be using Linux x64
Bukkit Server Setup http://wiki.bukkit.org/Setting_up_a_server
_________________________________________________________________
This series of posts is to illustrate how easy the cloud can be to use, it’s flexibility to be used in different ways, as well as show the broad range of Operating Systems that are available on the Microsoft Cloud Platform. This post is for demonstration purposes only.
Having Fun with the Cloud? Make a Minecraft Server on Ubuntu! Part 2
With the 30 day free evaluation of Microsoft’s Cloud, aka Azure, I decided to try and make the cloud fun, so I made a Ubuntu VM which now hosts Minecraft, which my kids love to play on now. Those that know about Minecraft servers, I am actually building a Bukkit server. It is very similar to a Minecraft server, it just has more built in administrative support as well as plugins, user made files that can change the server, which make multiplayer experience easier to manage. This will be a three part series that will cover the following topics.
To get started with your own trial account create an account here: http://aka.ms/mshosting
Part 1 will list out the tools that will need to be downloaded, as well as signing up for the free Azure account.
Part 2 will step you thru creating the Virtual Machine in the cloud, and creating an endpoint to access what is on the VM that was just created.
Part 3 will step you thru connecting to the server using PuTTY and WinSCP, copying files using WinSCP, installing Java, and finally starting up the Bukkit Server.
Creating a Certificate for Azure
Before creating the VM we will need to create a certificate that will be utilized during the VM installation. The current version of the Azure Portal only accepts SSH public keys that are encapsulated in an x509 certificate. When creating the Ubuntu VM you will be asked to upload compatible SSH key for authentication. The help file associated with this topic is viewable here http://www.windowsazure.com/en-us/manage/linux/how-to-guides/ssh-into-linux/
Microsoft’s documentation on “How to use SSH with Linux on Windows Azure” the section on Creating a Private Key on Windows, they throw three different tools at this problem of generating a private key on windows. To save yourself some time, just use GitHub, its very easy to use and it can be started after installing it by a shortcut on the desktop, called Git-Shell. Just copy the lines of code from the URL above under the section Creating a Private Key On Windows, and answer some questions to get the results shown below, and it will generate the private key
openssl.exe req -x509 -nodes -days 365 -newkey rsa:2048 -keyout myPrivateKey.key -out myCert.pem
The next directions on the “How to use SSH with Linux on Windows Azure” on creating a PPK for PuTTY using the PuTTYgen tool as well as how to configure PuTTY, with the certificate created in PuTTYgen are spot on, and need to be done.
Login to the Azure Management Portal
Using your new Azure logon go into the Azure Management Portal, http://www.windowsazure.com/en-us/ and click the new button at the bottom of the portal page, and click Compute -> Virtual Machine -> From Gallery.
Scroll down the list and select Ubuntu Server 12.04 LST, then click next arrow. As seen in the screen shot below, there are several flavors of Linux support already available.
Name your virtual machine, select the size of the VM, enter the user name that you will want to logon to the Ubuntu Server with, select the *.per file that is created in the first step at the top of this blog post, then enter the password you want to use for the Ubuntu account.
This will be considered a new cloud service, and will utilize the DNS Name MinecraftVM01.cloudapp.net. As I live on the East coast, I want the game server to be in the same geographic location, and just keep the default for the storage account.
This is a single game server no need to setup an availability set and click the check button to start the provisioning process, so the Virtual Machine will be created. Give the installation 5 to 10 minutes to cook, and you should be ready to connect using PuTTY and WinSCP.
Creating an Endpoint
In order to access the Minecraft/Bukkit game, we will need to create an endpoint in the Azure Management Portal. Now that the VM has been created we can now create the endpoint. In the Azure Management Portal click, on the left hand side click Virtual Machines, then click the name of the virtual machine that was created in the last step. Under the name of the Virtual Machine click the word Endpoints. Click the Add button at the bottom of the Endpoints web page. This will start up a Wizard to add an endpoint to the virtual machine. As we are just adding an endpoint, and not a load balanced web application, select add endpoint, then click the right arrow button.
The port number that Minecraft and Bukkit use is TCP port 25565. Enter the name of the Application, select the TCP Protocol, and enter the port number 25565 for both the public and private port numbers, then click the check mark to complete and save the end point.
By creating this endpoint, once the application is setup it will be accessible on the internet using the FQDN of the server.
_________________________________________________________________
This series of posts is to illustrate how easy the cloud can be to use, it’s flexibility to be used in different ways, as well as show the broad range of Operating Systems that are available on the Microsoft Cloud Platform. This post is for demonstration purposes only.
Having Fun with the Cloud? Make a Minecraft Server on Ubuntu! Part 3
With the 30 day free evaluation of Microsoft’s Cloud, aka Azure, I decided to try and make the cloud fun, so I made a Ubuntu VM which now hosts Minecraft, which my kids love to play on now. Those that know about Minecraft servers, I am actually building a Bukkit server. It is very similar to a Minecraft server, it just has more built in administrative support as well as plugins, user made files that can change the server, which make multiplayer experience easier to manage. This will be a three part series that will cover the following topics.
To get started with your own trial account create an account here: http://aka.ms/mshosting
Part 1 will list out the tools that will need to be downloaded, as well as signing up for the free Azure account.
Part 2 will step you thru creating the Virtual Machine in the cloud, and creating an endpoint to access what is on the VM that was just created.
Part 3 will step you thru connecting to the server using PuTTY and WinSCP, copying files using WinSCP, installing Java, and finally starting up the Bukkit Server.
Connect to the VM using PuTTY and WinSCP
The Ubuntu VM will automatically create an EndPoint to enable management of this VM on port 22 for SSH connectivity. Fire up PuTTY to connect to the DNS Name that you utilized in the VM provisioning process, do not forget to configure PuTTY to use the Private Key that you generated with the PuTTYgen utility. http://www.windowsazure.com/en-us/manage/linux/how-to-guides/ssh-into-linux/
Time to configure WinSCP, click new connection then enter the host name that was given to your VM, as well as the user name and password, as well as the Private Key that was generated by the PuTTYgen tool, select the Save button to save the session so it will not have to be recreated, then just click the Ok button.
Please note with both PuTTY and WinSCP the first time you connect using these tools you might be prompted about using a certificate for the first time, just click ok to ensure the certificate is used and the connection is made.
If you have not already done so download Java 1.7.0_25, and the Bukkit server jar file. These will need to be copied to your Ubuntu VM using the WinSCP utility. Links for those files are below:
Oracle Java SE will need to be downloaded (have to select the Accept License Agreement before you can download the file)
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Either Linux x86 or Linux x64 the example will be using Linux x64
Bukkit Server Setup http://wiki.bukkit.org/Setting_up_a_server
Coping files to the Ubuntu Server
Start up WinSCP, and select the name of the connection that you created earlier and click the Login button at the bottom of the screen.
The commander view, in WinSCP, is the default view, will show a split screen, on the left will be your windows host, on the right hand side will be the Linux host. Select multiple files that you want to copy to the root of your home folder, and drag them to the Linux machine. There will be a confirmation that you want to copy the files to the Linux system, just click ok and the files will be copied. The Bukkit server jar file should be copied as well as the JDK .gz file for the java installation should be copied to the Linux server.
Installing Java on the Ubuntu Server
Now you have the file on your Ubuntu server, and you have logged on using PuTTY, you can extract it using the following command in a PuTTY session:
tar -xvf jdk-7u25-linux-x64.gz
This should give you a directory “jdk1.7.0_25” which we need to move to somewhere sensible such as “/usr/lib/jvm/jdk1.7.0_25”:
sudo mv jdk1.7.0_25 /usr/lib/jvm/jdk1.7.0_25
Now we need to set up a symbolic link so that we can run Java from everywhere:
sudo ln -fs /usr/lib/jvm/jdk1.7.0_25/bin/java /usr/bin/java
Now check that Java is all installed correctly by checking the version using:
java -version
Which in this case should give:
java version “1.7.0_25”
Now you can set up your JAVA_HOME variable at a system level so other applications can use Java by editing “/etc/environment”:
sudo nano /etc/environment
Now add the following line to point to your newly installed Java, so there will be a total of two lines in the file when you are done:
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25
To ensure that the variable has been set correctly, reboot the VM by issuing this command in PuTTY, once the VM has finished rebooting which should take about a minute connect to the VM again using PuTTY:
sudo shutdown 0
Place your Bukkit Server jar file
I’ve seen several different examples as to where to place the Bukkit Server jar file. This really depends on you, as to where it will be placed. Just keep in mind that you should create a directory for it to have all to its self as it will create files as well as folders for the java application to run properly. In a terminal session run the following code to make a directory in your home directory.
sudo mkdir bukkit
Copy the craftbukkit.jar file to the bukkit directory that was just created. please note, substitute your own user name for the %yourusername% below.
sudo cp craftbukkit.jar /home/%yourusername%/bukkit
Change directory to the bukkit directory. To start up the bukkit server run the following:
sudo java -d64 -Xincgc -Xmx1024M -jar craftbukkit.jar nogui
Now open up your Minecraft client and connect to the FQDN name of your server and you are ready to play Minecraft on your own server. Enjoy!
_________________________________________________________________
This series of posts is to illustrate how easy the cloud can be to use, it’s flexibility to be used in different ways, as well as show the broad range of Operating Systems that are available on the Microsoft Cloud Platform. This post is for demonstration purposes only.
Please Note: Several items were pulled directly from the following posts
http://www.scaine.net/site/2013/02/step-by-step-install-a-minecraft-server-on-ubuntu/
https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux
MVA – Jump Start Series Build a Private Cloud with Windows Server & System Center
Well this is short notice but, today, and Thursday MVP Pete Zerger will be doing Build a Private Cloud with Windows Server & System Center. Registration is available for June 18th event here https://www.microsoftvirtualacademy.com/liveevents/building-private-cloud-with-windows-server-2012-system-center-2012-sp1-jump-start
The Thursday June 20th event will be titled Move to Hybrid Cloud with System Center & Windows Azure Jump Start event and registration is available here https://www.microsoftvirtualacademy.com/liveevents/Moving-from-Private-to-Hybrid-Cloud-wSC2012-Azure-IaaS-jump-start
Enjoy!