Web Development Core Concepts - Get your Free VM in Azure – No Credit Card

Hello and welcome to Learning Journal. You are learning modern technologies, and you need infrastructure for your exercises and proof of concepts. However, you are still in college, and you don’t have a lot of money to buy expensive machines. How will you learn if you don’t have access to required computers, software, and other Infrastructure resources? In this video, we will help you understand the Microsoft Azure student offer and guide you to take advantage of this fantastic cloud Infrastructure plan.
If you are in college and pursuing a full-time four-year degree in science and technology, you might be eligible for the Microsoft Azure Student offer. If you qualify, you get access to 25+ free products for twelve months. These free products include following main items and many other things.

  1. You get a 750 hour of a B1S Virtual Machine every month. The B1S machine comes with 1 CPU and 1GB RAM. The SSD option makes it fast enough.
  2. You can use two 64 GB disks
  3. You can use 15 GB data transfer.

All these limits are monthly. That means, your quota renews every month. If you think that might not be enough, you get a $100 credit for one year with a student subscription. The most important thing is that you do not even need to provide your credit card details.
However, if you are not an eligible student, you still get all those 25+ free resources for twelve months. But you must provide your credit card and upgrade to a payable subscription after a month of the evaluation period. Even if you are not a student, I recommend you get a subscription and spend a small amount on your skill development. The cloud skills are the key to your growth.

How to get Azure student offer

Great! In this video, I will demonstrate you to get a free Linux machine in Microsoft Cloud for students. I will also help you understand some basics of operating in the Azure cloud. So, let’s start. We have captured the screen for one of the students that are participating in our mentorship program at Learning Journal. Follow these steps.

  1. Start Microsoft Azure portal
  2. Scroll down and look for the student link
  3. Read the FAQ for eligibility. The good part of this program is that you do not need to provide a credit card or debit card information. You will also get a $100 free credit for 12 months.
  4. If you are eligible, go back and click on the activate now button.
  5. I am assuming that you don't already have a Microsoft account. So, create a new one.
  6. You need to provide a phone number or an email address for your account id. We recommend you give an email address. We also recommend that you register with your college email address for the account creation. However, you can use your personal email address as well and provide college email address for verification at a later stage.
  7. Create a password for your Microsoft account.
  8. Microsoft will send a verification code to your email address. Check your email and type in the verification code.
  9. They might also ask for the captcha code. Well, there are many verifications, but all that is good for a reason.
  10. Great! Your Microsoft account is ready. Now you need to verify your claim to be a genuine student. We will be using a college email address for the verification.
  11. Enter your official college email address and hit the verify button. If your college is in Microsoft's database of valid collages, you will receive an email from Microsoft Azure to your college email address.
  12. The email that you received contains an activation link. Click on the link and you will land on another registration page.
  13. You need to fill in your details. The registration page has three mandatory fields.
    1. Country
    2. Email address
    3. Your national identification. If you are in India, it will be a PAN Card Number. I expected it to be Aadhar card number, but they need a PAN card number. I hope you have a PAN Card number.
  14. Enter all the details and move on to the next step.
  15. You need to verify your phone number.
  16. The last item is to accept the terms and conditions. If you want, you can read the details of the terms and conditions.
  17. That's it. Once you accept the terms and conditions, you will land on to the Azure dashboard.

The process for registration is lengthy and sometimes irritating. However, you get the free credits.

How to check your Azure free credits

If you want to check your credit balance, follow these steps.

  1. Go to cost management and billing.
  2. Click on the manage button.
  3. The page shows your subscription type. Click on the subscription.
  4. Now click on the see remaining credits.
  5. Great! Your free student subscription is ready to use.

How to create a Linux VM in Azure?

I am assuming that you acquired an Azure student subscription or a standard paid subscription. Now we want to create a Linux Virtual Machine in Azure Cloud. Follow these steps.

  1. Click on the virtual machines menu item.
  2. Click on Create button.
  3. Search for CentOS and choose a free image.
  4. Hit the create button.
  5. Fill in the necessary details like machine name, username, and password, etc.
  6. In the next step, you need to select the machine type. Let us choose the smallest available size. The B1S machine type is free for 750 hours in a month for your student subscription.
  7. The next step is for the machine and network settings. We keep everything to default except the public IP address. Change the assignment type to static. This option will assign a static IP address to your machine. That means, Azure will assign a fixed IP to your machine that won’t change even if you restart your VM after few days.
  8. Click Ok, and it shows you the pricing details. Click create button and wait for a couple of minutes.

Great! You Linux Virtual Machine is ready.

How to access your Linux Machine in Azure?

If you already know a little bit of Linux, you know that Linux is all about doing things from a command line. We usually do not prefer to use Linux GUI. You can access your Linux command line from using following steps.

  1. Start Azure cloud shell.
  2. Get your SSH command and copy paste it into the cloud shell.
  3. Enter your password.

That's it. You logged in to your Linux machine. Your user comes with sudo privileges. If you know Linux commands, you can start using it.

How to create a firewall rule in Azure?

You Azure Linux VM is secured in Azure cloud using a firewall. That means, no one can access your machine without firewall rule. However, your Linux VM comes with some pre-configured firewall rules. Your default firewall rule allows TCP port 22 for SSH connections. That means, you can connect to your machine using SSH tools. For example, you can log in to your VM from your browser using cloud shell. You can also connect to your VM using an SSH tool like putty. You can also connect to your machine using a file transfer tool like WinSCP. However, if you want to access your Linux VM using any other protocol, you might need to create a firewall rule and allow connections to your VM. Let me show you an example. We want to enable HTTP protocol for TCP port 80. A web server uses this protocol and the port. So, if you're going to deploy a website on this Linux machine, you must create a firewall rule to open TCP port 80 for HTTP protocol. You can follow these steps to do that.

  1. Go to your Azure dashboard and look for the network security group.
  2. Click on the Inbound Security Rules.
  3. Click on the add button.
  4. Select basic and choose HTTP service.
  5. Click on the add button.

That’s it. Now you can install and configure a web server on this machine and deploy a website.

How to upload files to your Azure VM?

If you want to upload some files to your Linux VM from your local desktop or laptop, you can do that easily. There are many ways to do that. However, let me show you a couple of common methods.

  1. Upload via cloud shell
  2. Upload using WinSCP

Let’s talk about the first method. Follow these steps.

  1. Start your cloud shell.
  2. Upload your file using the upload button.
  3. Your file is uploaded to the Azure storage. You can check your file using the ls command. However, this file is not yet in your Linux VM and we wanted to copy this file to the Linux machine. Right? That’s an easy thing. You can copy your file from the cloud storage to the Linux machine using the SCP command.
  4. Use below command to copy your file from Azure storage to your Linux VM.
    scp images.jpg satyam@       
  1. I hope you understand that the above command may not work for everyone. You must change the file name, username, and IP address according to your requirement.

The second method is more straightforward. You need to download and install WinSCP tool. Once you have the WinSCP tool, start the WinSCP, connect to your Linux machine using the IP address and username/password. That’s it. The left side shows files from your local, and the right side shows file on your Azure machine. You can drag and drop files from one side to the other side. This WinSCP is more convenient because you do not need to upload your file to intermediate Azure storage. We are directly copying a file between our local machine and the remote machine.

How to stop, start and delete your VM?

A running Virtual Machine in a cloud is a cost to you. Even if the Microsoft Azure offered you a free plan, you must develop a habit of minimizing the price and do not leave the running machines without reason. We recommend you to login to the Azure portal, start your Virtual Machine, do your work, and stop the VM after completing your work. You can come back to Azure portal next day, start the machine once again and use it. When you no longer need that machine, you can delete the computer and all associated resources. The critical point to remember is the other associated resources. Even if you remove the VM, there are a bunch of other related resources that Azure do not clean up automatically. Most of them are reusable with other VMs, but if you had a single VM, you might want to delete the unused resources as well.
See you again in the next video.
Thank you for watching Learning Journal. Keep learning and keep growing.

You will also like:

Referential Transparency

Referential Transparency is an easy method to verify the purity of a function.

Learning Journal

Pure Function benefits

Pure Functions are used heavily in functional programming. Learn Why?

Learning Journal

Pure Functions

What are pure functions and side effects. Start learning functional programming.

Learning Journal

Free virtual machines

Get upto six free VMs in Google Cloud and learn Bigdata.

Learning Journal

Tail Recursion

Tail recursion is another concept associated with recursion. Learn with examples.

Learning Journal