Installing on Azure

johnE edited this page Apr 5, 2016 · 4 revisions

Step One: Get an Azure subscription

This is the easiest step. Best of all it will enable you to explore the range of services and capabilities available in Azure once you're more comfortable with it. Signing up is easy. You'll even get $200 to spend so it won't cost you anything to set up your River5 server. Now go get signed up and come back here when you're ready.

Step Two: Pick a server

Remember, the cloud is nothing more than someone else's set of computers that you can use for your own stuff. Here's where we pick what type of computer we'll be using for our River 5 server.

Now that you have an Azure subscription, log into the Azure Management Portal.

When you first sign into Azure it may look a little intimidating because of all the stuff you can do. Don't worry about all that stuff at the moment, you can explore later. For now, click the + New and click Compute. You'll see a wide range or servers you can start up and use. As you can see it's not just Windows Servers. These are pre-configured special purpose servers designed for databases, SharePoint and more.

Click for a larger view

Your River 5 server will use the latest and greatest version of Windows Server: Windows Server 2016. Don't pick the one you see in the menu though, that's a much beefier server than you'll need for River 5. We're going to pick something simpler to use for our River 5 server. Click the See all blue text in the upper right corner.

Now click the Search box, type Windows Server 2016 and hit ENTER. Now pick Windows Server 2016 Technical Preview 4.

Click for a larger view

Another window will appear asking you about deployment model options. Accept the default setting and click Create.

Click for a larger view

Step Three: Configure, start up and login to your server

Enter your server name and define a userid and password (make a note of these - you'll need them to login soon). Select your Azure subscriptoin (created in the first step) and define a Resource Group. An Azure Resource Group is like a bucket containing all the information needed to manage the Azure service you're using. In our case the Resource Group will contain information about your server and it's networking capabilites. Lastly, pick a location where your server will be hosted. You should pick a location nearest you.

Once you've filled in this information click the OK button.

Click for a larger view

Now we need to select the size of our server. There are many server sizes available in Azure - from simple and cheap to highly complex and expensive. You'll initially be shown some recommended server sizes. Ignore the recommendations and click the View all blue text in the upper right corner.

Click for a larger view

Server sizes are identified by a letter/number combination but you can also see each the specifications associated with each server size. For this exercise we're going to pick the simplest server available: the A0. Scroll down the list until you locate the A0 then click on it. (Note: You'll see an estimated monthly cost for the server. You received a free $200 credit when you signed up so going through this exercise is free for you.) **Make sure you choose the A0 Basic server, not the A0 Standard server (which is more expensive).**_

Now click the Select button.

Click for a larger view

Back in the main menu again, pick the Public IP option, then pick Configuration. Here's where we give your server a friendly name so you won't have to type in an IP address to reach it. In this example I used "River5". The address you'll enter into your browser will be the name you enter plus the additional text that appears below it. In this example the address for my server will be http://river5.northcentralus.cloudapp.azure.com:1337 (:1337 is the port used by River5 - more about that in our next step). Make a note of your URL - you're going to use it later to access your River of news.

Now click Save at the top of the screen.

Now we're going to open up the ports that your server will use to communicate with a browser like Chrome or Internet Explorer. Click Network Security Group then click Inbound Security Rules. Add and save two inbound rules: one for port 80 and one for port 1337 as shown below. Remember to click the Save button after entering each port!

We'll use the defaults for the rest of the options. Now click the OK button and you'll see a summary of your server settings (on the far right):

Click the OK button. The setup will close and you'll land back on the Azure Management page. See that blue box? That's Azure deploying and starting up your new server for you. This may take a minute or so.

Click for a larger view

When your server is ready the blue box will change and look something like this:

Click for a larger view

Clicking on this box shows you information about your server. Click Connect from the menu at the top.

Click for a larger view

This will download the configuration to remotely log into to your server. Save this file to your desktop and double-click on it. You'll see the following warning message because you've never connected to this server before. Click Yes to continue to the login prompt for your new server.

Click for a larger view

Login with the userid and password you defined in step three above. After a brief delay your new server's desktop should appear. Congratulations! You now have your very own server!

Step Four: Server Housekeeping

We're almost ready to install River_5._ We need to clean up a few things to make your new server easier to use. Servers are very different from desktops machines - they are typically locked down to be secure. We're going to tweak some of these security settings to make your server easier for you to use.

If the Server Manager wizard appeared after you logged in, close it by clicking the "X" in the uppoer right corner.

Click to enlarge

First we're going to tweak a security setting that will enable you use the default browser known as Edge. Hold down the Windows key and type R. This will pop up a command box. Type SECPOL.MSC into the command box and hit enter. The Local Security Policy Manager window will appear.

Click the Local Policies folder on the left and click Security Options. Now scroll down until you see the optoin highlighted in the picture below. Click on it.

Click to enlarge

Click Enable then click OK to save.

We're eventually going to have to restart your server to recognize the new security policy but not just yet. Remember how we set up the ports in a previous step? We're going to have to set up those ports in Windows Firewall to ensure they're working properly.

Hold down the Windows key and press X. Click on Control Panel in the pop-up menu. In Control Panel change the View By option to Small Icons. Now click Windows Firewall and the firewall configuration window will appear. Click Change Notification Settings on the left side of the window. Click to be notified when Firewall blocks an app, as shown below:

Click to embiggen

Now we need to open the ports we set up in Azure. Click the Advanced Settings from the left menu and click Inbound Rules. We're going to set up two rules for the two ports we opened up in Azure. Click New Rule from the menu on the right. Click Port.

Click to enlarge

Leave all the defaults and enter 1337 for the specific port. This is the port used by River5. Click Next, select Allow the Connection and cick Next.

Click to enlarge

Leave the defaults and click Next

Click to enlarge

Assign the connection a name and click OK to save it. You should also set up another Inbound rule for Port 80.

Click to enlarge

Your server housekeeping is now done! We just need to reboot the server because of the security policy change we made earlier. To do this click the Windows button (lower left corner of the screen), click Power then click Restart. If you get prompted for a reason click Unplanned and continue for the restart to occur. You'll lose your connection to the server when it restarts (the window will close).

Install and Set Up River 5 on Your New Server

Double-click on the configuration file you previously downloaded. Log back into your server. If the Server Manager wizard appeas click the "X" in the upper right corner to close it.

First we're going to download and install node.js. Node.js is a server-based Javascript framework used by River5. Start up the Edge web browser (blue "e" on the bottom left of the window) and download the installer for Windows. After the installer finishes you can ensure node is working properly by:

  1. Hold down the Windows key and press R to pop up the Run prompt. Type cmd and hit ENTER. The Windows command line should appear.
  2. Type node -v and hit enter. Information about the version of node should appear.
  3. Type npm -version and hit enter. Information about the version of the Node Package Manager should appear.

We're finally ready to install River5! Using the Edge browser, download the River5 zip file.

Right-click on the file and select Extract All. You'll be prompted for the location you'd like to extract the files. I chose C:\Tools\River5 but you're welcome to choose whatever location you want.

Hold down the Windows key and press R to open the Run prompt. Type CMD and hit ENTER to open the command prompt again.

Navigate the folder where you extracted the River5 files. If you extracted the River5 files to C:\Tools\River5 use the following commands:

  • cd \ and hit ENTER to go to the root of the C: drive

  • cd \Tools\River5 and hit ENTER

Once you're in this folder type npm install and hit ENTER. This will install River5 on your server for you.

After the install completes running type the following command and hit ENTER to start River5: node river5.js. You'll see some information scroll by about various news sites.

Open the Edge browser (on your server) and navigate to http://localhost:1337. It may take a while for some news feeds to appear so be patient. Eventually you will start seeing news feeds show up when you refresh the screen.

Set River5 to Start Automatically

You can set up River5 to automatically start in case your sever ever gets rebooted. This can be helpful in case of unexpected outages or restarts. First, create a simple batch file to run River5 by copying these commands and saving them into a file named run.cmd (note that you'll have to change the location of the River5 files if it differs from C:\tools\river5):

@echo off
cd \
cd C:\tools\river5
set NodePackagesPath=C:\tools\river5\node_modules
set Path=C:\tools\river5;C:\tools\river5\node_modules.bin;%PATH%
set Path=%NodePackagesPath%;%PATH%
set NODE_PATH=%NodePackagesPath%\node_modules;%NODE_PATH%
node.exe river5.js

Hold down the Windows key and press R to open the Run prompt. Type regedit and press ENTER to open the Registry Editor. The Registry is a special configuration that Windows uses to store information about the various programs you have installed.

Click to enlarge

On the left side click HKEY_CURRENT_USER, then click SOFTWARE and scroll down to MICROSOFT.

Scroll down to Windows and double-click it to open the tree structure underneath it.

Look underneath the Windows folder, locate the CurrentVersion folder and double-click it to reveal the tree structure beneath it.

Scroll down to Run and single-click it.

In the right side you'll see a few folders. Right-click in an empty area and click New. Click String Value. A new item should appear on the right side. Name it River5 and hit ENTER.

Double-click on the River5 entry you just created. Type the full location of run.cmd into the Value box (e.g. C:\tools\river5\run.cmd).

You're finished. Close the Registry Editor by clicking the X in the upper right corner.

You can also close the window for your server. It's ready to use!

Next Steps

You can now access your River from anywhere using the URL you noted previously (e.g. http://river5.northcentralus.cloudapp.azure.com:1337).

See Dave's post for directions on configuring your own specific news feeds and other options. Pretty much everything is configurable.