Create Azure Linux Virtual Machine and make website running

While moving my blog to Azure Virtual Machine, I found some complexity just because of Linux virtual machine. As a ASP.NET geek, I am not that much of aware about Linux and its management commands. So, I have decided to write the blog on how to make my first Hello World website in Azure Linux Virtual Machine. I am also planning to write the blog on installing ASP.NET 5 into Linux Virtual Machine.

Create Linux Virtual Machine into Azure Cloud

The first step into making your website up and live is creating Linux Virtual Machine into Azure Cloud. Hence, I am logging with my Azure Account. There are two methods to create Virtual Machine into Azure. First one is creating Virtual Machine using Quick Create. Quick Create is used when you are creating only one Azure Machine. Another way to create Virtual Machine is using From Gallery, and it will be used when you are a need into creating multiple Azure Virtual Machine with some advance settings.

Sign into Azure portal and Click on New at the bottom left of Azure portal, then Click on COMPUTE -> VIRTUAL MACHINE -> QUICK CREATE as shown into the image.

Create Azure Virtual Machine
Create Azure Virtual Machine

After clicking on Quick Create, you will be prompted for entering some information about Virtual Machine like DNS name, Image for VM, Size for VM, Username, password, and region. I am going to creating VM with webstackdemo DNS name, and I am selecting Ubuntu Server 15.10 as Image name to create Linux Virtual Machine. Just enter all information and click on CREATE A VIRTUAL MACHINE button. You have to wait for some time after clicking on CREATE A VIRTUAL MACHINE while new server is up and running. On successful creation, your will be prompt like Successfully created virtual machine webstackdemo.

Login into Linux Cloud Virtual Machine
After successfully creating the virtual machine, you can look at endpoints of the virtual machine in Azure Portal. There will be default endpoint with named SSH having 22 as private and public port. You can change port at any time to secure your Virtual Machine. You can find SSH Details to connect or login into your machine in Dashboard tab. To login with your windows machine you need SSH client for windows like PuTTY.

Now, open PuTTY client and enter hostname and port detail from SSH Detail and click on open.

PuTTY detail to login into Azure
PuTTY detail to login into Azure

Now, PuTTY will prompt for credential. Login with the credential that you have created while creating your Azure Machine.

Installing Apache2, MySql, and PHP
To run large data driven application you need to have Apache2, MySql, and PHP installed into the virtual machine. So, you must have root access. Type following command to switch to root user.

sudo su

In order to install the latest version of services, your packages list from repository should be updated. There is apt-get command in Ubuntu server to update package list from repository server. So, type the following command to update package list

sudo apt-get update

After update modules, type following commands to install Apache2, MySql, and PHP

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5
sudo apt-get install php5-mysql

While Installing the MySql you will be prompted to enter the password for MySql. After successfully installing all above services you can type the following command to check that MySql services properly installed.
mysql -u root –p
It will prompt you to enter the password to log in.

Setup Virtual Host for Apache2
Create directory structure for your website and to set up virtual host into Apache2. Consider that you are going to setup into apache. In order to create the directory structure for type following command.

sudo mkdir -p /var/www/

Now, Create file into that html directory for your, you can use touch command to create file and nano to edit that file. You can also upload it using FTP, but for now, I am not going to cover that. Type following commands to create and edit index file.

cd /var/www/
sudo index.html
nano index.html

Type some HTML into index.html and save index.html file. Apache2 should have proper permission on that newly created directory. You can use chmod to give 755 permission on /var/www/ directory. Now, Its turn to create virtual host file and configure Apache2 to point that directory for Apache has default virtual host file called 000-default.conf. Copy that file with the new name like Type the following command of copying the file the as the new name.

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/

Open that file and edit it to add configuration related to domain. After editing your host file, it should look like

<VirtualHost *:80>
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

After creating host file, you have to enable host file into Apache2. You can use a2ensite command of apache2 to enable that and then restart Apache2.

sudo a2ensite

The final step for your site to up and running is to add endpoints into Azure Cloud portal. Go to your virtual machine and click on ENDPOINTS. Click Add button from the bottom and Add HTTP Endpoint having 80 public port and private port for your site, you can also configure the endpoint to use HTTPS with 443 port.

Now you can run into your favorite browser to check that everything is working.

Availability of Azure regions in India

AzureCon Announcements – India Regions, IoT Suite, GPU Support, Container, and Security Center in Azure

Recently Microsoft has held AzureCon events to announce new enhancements having thousands of participation worldwide. Scott Guthrie (Executive vice president of the Microsoft Cloud and Enterprise group) has announced about what is enhance features in Cloud?

AzureCon Announcements

  1. Availability of Azure regions in India
  2. Announcing N-Series of VMs with GPU capabilities.
  3. IoT (Internet of Things) Suite available to purchase.
  4. Container Service
  5. Security Center

Availability of Azure regions in India

Availability of Azure regions in India
Availability of Azure regions in India

Microsoft has brought online a several cloud servers in India to improve effectiveness, they had started three cloud location in Chennai, Mumbai, and Pune respectively. This means that Azure services are now available in 24 different regions worldwide. Microsoft says Microsoft Enterprise Mobility Sure available with Azure service are available in the regions having Office 365, Dynamics CRM, and PowerBI.

Announcing N-Series of VMs with GPU capabilities.
At last, to further help the execution of cloud foundation, Microsoft has announced the N-Series, another group of Azure Virtual Machines with GPU capacities. GPUs are perfect for graphics and design workloads, helping clients to fuel their advancement through situations like remote virtualization, computing having a high-performance intensive process, and dynamic analysis. The N-Series will include the NVIDIA Tesla Accelerated Computing Platform and in addition NVIDIA GRID 2.0 innovation.

Azure IoT (Internet of Things) Suite available to purchase.
IoT means Internet of Your Things, you can connect the business assets that you already have to Azure services and use existing data in new ways to satisfy business needs. You can capture, analyze, and predict future outcomes.

When you take advantage of Azure IoT Suite, it helps your business to monitor assets to improve efficiency and use advanced data analytics to transform your business with new business models and revenue streams. Azure IoT Suite help your business to move faster, save money and encase the benefits of the Internet of your Things (IoT) for your business.

Azure Container Service
There is an obvious question like what is Azure Container Service? Azure Container Service is a new storage service that uses technology from Apache Mesos and Docker to deploy and configure applications to open-source clusters management services and Docker container management technology.

Azure Security Center
Azure cloud is the first cloud platform that provides security Management tools. Azure Security Center gives you the visibility and the control of the security of your Azure resources and helps you to one step ahead of attacks and threats.

Azure Security Center uses advanced analytics, along with machine learning, and Microsoft’s global threat intelligence network to give alerts for attacks. Attacks have been automatically detected from your Azure resources, the network, and security partner solutions.

Azure statistics
Azure statistics

Due to their continuous development and efforts they achieve more than 90,000 customer subscription per month. They had like 1.5 Million SQL Database running, more than 500 Million users on active Azure directory, 1.5 Trillion messages processed per month by IoT, and getting more than 40% revenue from start-ups and ISVs. All above figures are declared in AzureCon on 27 September 2015 by Scott Guthrie (Executive vice president of the Microsoft Cloud and Enterprise group).