Amazon Web Services guide for running nTop

Purpose

This guide provides instructions for configuring an Amazon Web Services (AWS) virtual machine (VM) at Amazon Elastic Compute Cloud (Amazon EC2) to run nTop on cloud infrastructure.

AWS Permission Requirements

The following instructions assume that the user has set up an AWS project with billing (or is under an evaluation trial that grants support to GPU-enabled VM types). Additionally, the user should have at least the following “identity and Access Management” policies on said project:

 

Policy Type Comments
AmazonEC2FullAccess AWS managed This is a pre-defined AWS IAM policy.
AmazonS3FullAccess AWS managed This is a pre-defined AWS IAM policy.
User-defined policy name Customer managed

A user-defined AWS IAM policy with the following definition:
{

  "Version": "2012-10-17",

  "Statement": [

    {

      "Sid": "CreateOwnAccessKeys",

      "Effect": "Allow",

      "Action": [

        "iam:CreateAccessKey",

        "iam:GetUser",

        "iam:ListAccessKeys"

      ],

      "Resource": "arn:aws:iam::*:user/${aws:username}"

    }

  ]

}



 

For additional information, you can consult AWS IAM reference guide.

 

Platforms

Currently, only AWS Windows Server 2019 virtual machines are supported for remote execution in cloud hosts, using the Remote Desktop Protocol (RDP) for connecting to hosts’ graphical desktop environments.

AWS Windows Server 2019

This section contains detailed steps for creating an AWS Windows Server 2019 virtual machine instance, signing into the newly created instance, and installing packages required to run nTop (including nTop itself).

Virtual Machine Specifications

The machine image should be a Microsoft Windows Server 2019 Base image.

AWS offers different possible VM specifications and families in different regions (as described here). There is a tradeoff between VM resources required for an application and the costs involved. We recommend the “g4dn”  family, and nTop’s System Requirements Guide can  be used to select VM instance type.

 

Image Windows Server 2019 Base
Instance g4dn.2xlarge

 

Creating an AWS Instance

These steps cover the creation of an AWS instance with the specifications listed above.

First, navigate to your AWS console (https://aws.amazon.com/console/) and log in to your account. Select the “Services” panel on the upper left corner of the screen (arrow 1 in the image below), and then select “Compute” (arrow 2) and “EC2” (arrow 3).

Create_Instance_1.jpg

The window displayed will change to the EC2 Dashboard. From here, create an instance by either selecting “Launch Instance” (arrow 2 in the image below) or by selecting “Instances” (arrow 1) on the left side menu bar. If “Instances” is selected, the view will change to a view of all current AWS instances. From there there will be a “Launch Instances” option similar to the one on the EC2 Dashboard in the image below.


Create_Instance_2.jpg

A dropdown will appear asking if you want to “Launch instance” or “Launch instance from template”. In this example, you will create an instance without an existing template.

The “Launch an instance” page is now open. Here, enter the configuration information matching the machine specifications laid out in the table above.

 

Selecting Machine Name, Machine Image and Machine Type

First, enter the name of the virtual machine under “Name and Tags” (arrow 1 in the image below). In the example below, this is titled “AWS-nTop.” Next, search for “Windows Server 2019 Base” under “Application and OS Images (Amazon Machine Image)” (arrow 2). Before entering your search for “Windows Server 2019 Base,” the page should look similar to the screenshot below.

Select_Machine_1.jpg

Upon entering the search for “Windows Server 2019 Base”, a page will appear with all of the results of your search. Select the option titled “Microsoft Windows Server 2019 base”.

Now you are back to the “Launch an instance” page, and you should notice that the OS image has changed to Windows Server 2019 Base. Immediately below the OS image section are the sections for “Instance type” and “Key pair (login).” Modify the instance type to be your desired machine type (in this example, a g4dn.2xlarge instance, as shown by arrow 1 in the image below).


Select_Machine_2.jpg

Creating a Key Pair

From the “Launch an instance” page, under the “Key pair (login)” section (arrow 2 in the image above), create a new key pair for the instance. Add the desired name to the key, and select “.pem” format.

Key_Pair.jpg

When you select “Create key pair,” your key will be downloaded to your local machine. Save this file; you will need it in the “Accessing an AWS instance” section to access your instance.

Network Configuration and Launching the Instance

Next, configure the network and storage settings. In this example you will configure the machine to only allow RDP access from your IP address by entering your IP address, as shown by arrow 1 in the image below. This may need to be changed to allow coworkers to access the same machine. Modify the storage settings to meet your needs (arrow 2). In this example, you will not modify the “Advanced details,” so once the storage and network settings have been modified select “Launch instance” (arrow 3).

 

Network_Config.jpg

 

Once “Launch instance” is selected, wait for the instance to become available. You can check the instance's status in the “Instances” page from the left menu bar.

Accessing an AWS Instance

In the above section you launched a new AWS virtual machine instance running Windows Server 2019 Base. You will now access the machine using RDP. 

Navigate to the EC2 dashboard and select the “Instances” menu on the left hand menu bar (arrow 1 in the image below). This will display a page of all of the EC2 instances. Select the instance ID in blue to open up more details about the instance (arrow 2)

Access_Instance_1.jpg

When the instance summary page opens, select “Connect” on the top right corner of the screen. This will open a page similar to the screenshot below.

Access_Instance_2.jpg

Select “RDP client” (arrow 1 in the above image), and then download the remote desktop file (arrow 2). The only remaining step is to create a password for the instance. To do this, select “Get password” (arrow 3). This will require you to upload the key file that was downloaded while creating the instance.

When the remote desktop file, username, and password are obtained, RDP into the machine using your choice of RDP client. We recommend using the Microsoft Windows’ built-in RDP client.

Configuring an AWS Instance to run nTop

Once an AWS Microsoft Windows Server 2019 Base virtual machine has been created and RDP access has been established, configure credentials with AWS from within the VM and install graphics card drivers so nTop can run successfully.

Configuring PowerShell Access to AWS

First, configure PowerShell so that it can access AWS resources. This is needed to download the graphics card drivers discussed in the following section. AWS has instructions for configuring PowerShell access here.

Configuring NVIDIA Drivers

Before launching nTop, you must configure NVIDIA graphics card drivers on the VM so that nTop can use the GPU. Before you do this, however, you need to complete the previous step to make sure powershell can access AWS. AWS has another guide for installing NVIDIA drivers here.

Installing nTop

You are now almost ready to begin running nTop in the cloud. You only need to upload the desired nTop MSI and install the software on the VM. Through your RDP client you can share a local folder with the remote machine. Share a folder containing the nTop.msi file downloaded from app.ntop.com, then initiate the RDP session. From the file explorer in your remote machine, navigate to “This PC”. You should see your shared folder there. Copy the MSI from the shared folder to a local folder on the remote machine, such as the Desktop. Once copied to the remote machine, run the MSI and install nTop as usual. You are now ready to use nTop in the cloud.






Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.