How to install Pomelo on Microsoft Azure - stammen/pomelo GitHub Wiki
How to Install Pomelo on Microsoft Azure
Pomelo can be installed on a virtual machine in Microsoft Azure.
-
[Create] (https://azure.microsoft.com/en-us/pricing/free-trial/) a Microsoft Azure account.
-
[Login] (https://portal.azure.com/) to the Azure portal.
-
[Create] (https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-tutorial-portal-rm/) a new Linux virtual machine (vm). This tutorial uses an Ubuntu 14.04 vm.
-
After Azure has finished provisioning your new vm, ssh into the machine from the Command Prompt.
ssh username@ip address of vm
-
You will need to install the following items:
#####Node.js v5.x
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - sudo apt-get install -y nodejs
#####C++ Build Tools
sudo apt-get install -y build-essential
#####Git
sudo apt-get install git
#####Pomelo
sudo npm install -g pomelo
How to open ports for your Pomelo application
By default, Azure does not open any networking ports for your vm. You will need to look at your game-server/config/servers.json file to see what ports you need to open. For example, the [servers.json] (https://github.com/NetEase/treasures/blob/master/game-server/config/servers.json) config file for the Pomelo Treasures demo will need ports 3010, 3011 and 3014 opened on Azure. To open the ports using the Azure Portal, you will need to do the following:
-
Click on your virtual machine in Virtual Machines list and click on the Resource group link.
-
Click on the Network Security Group for your vm
-
Click on the Inbound Security rules setting
-
Click on the Add button
-
Add the tcp port settings for one of the connections in your servers.json config file. Press OK to save the port.
-
Repeat Step 5 for each port required by your Pomelo application.
You should now be able to connect to your Pomelo application running on Microsoft Azure.