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.

  1. [Create] (https://azure.microsoft.com/en-us/pricing/free-trial/) a Microsoft Azure account.

  2. [Login] (https://portal.azure.com/) to the Azure portal.

  3. [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.

  4. After Azure has finished provisioning your new vm, ssh into the machine from the Command Prompt.

     ssh username@ip address of vm
    
  5. 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:

  1. Click on your virtual machine in Virtual Machines list and click on the Resource group link.

    vm resource group

  2. Click on the Network Security Group for your vm

    vm security group

  3. Click on the Inbound Security rules setting

    vm Inbound Security rules

  4. Click on the Add button

    vm Add button

  5. Add the tcp port settings for one of the connections in your servers.json config file. Press OK to save the port.

    vm Add port

  6. 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.