Deploying a custom app over the Azure network

Azure provides various ways to deploy your application over their network. Depending on the type of the project—that is, whether it is a web application, a batch processing application, or any other type of app—you will need to make a choice of which matches to their services.

For example, let's say we want to deploy the Node.js application on the Azure network; we then need to choose the type of server we want to host our application on.

Azure provides both Windows and Linux-based machines where you can deploy your application.

Let's see we want to create one in the Linux box.

Open the Azure portal and click on Virtual Machines from the left menu. Click on the Create Virtual Machines button.

Refer to the following screenshot for help:

Now, Azure will open up the compute screen; you will see lots of options regarding the operating system and virtual machine images. Refer to the following screenshot for reference:

I am going ahead with an Ubuntu Server.

Click on the Ubuntu Server and choose the right version of the Ubuntu operating system. Use the Resource Manager deployment option and click on the Create button. Refer to the following screenshot for reference:

Now, give your virtual machine a name and choose an appropriate password. You can select create new resource or use existing resources. Set disk type to SSD for good performance. Refer to the following screenshot for reference:

On the next screen, choose a size or use the default size. Skip option 3 and then create the virtual machine.

Once the virtual machine is created, you can log in to it via the terminal using the following command:

ssh username@ip  

Provide the password and you should be able to log in to the server.

Run this command whenever you do a fresh Ubuntu install:

sudo apt-get update
sudo apt-get upgrade 

You can install Node.js using this command or download it from the official site:

sudo apt-get install nodejs 

Now, if your code base is hosted at GitHub, you can use git command to download the source code:

git clone <<github url>>  

Install the required dependencies using the npm install command and run the project.

In this way, you can deploy any custom application over the Azure network.

Now, let's move ahead to the last topic of our chapter: monitoring the network and traffic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.25.4