how to host nodejs api application on azure virtual machine? - node.js

I am new to Azure virtual machine and in hosting world. I have created a nodejs api application, and now I want to host it on virtual machine. I have create a virtual machine too, but I have no idea on how to host my nodejs project which is on my local system to azure vm. Please can anyone help?

To deploy node.js application to Azure VM we need to have following perquisite :
Node.js installed on your system (version >= 10.3)
Azure account
A CircleCI account
A GitHub account
Azure CLI installed on your system (version >= 10)
Then need to Set-up a virtual machine on Azure to run Node.js.
For complete information please refer to this BLOG : Continuous deployment of Node.js to Azure VM & GitHub: Deploy a Node.js application to Linux Virtual Machines in Azure

Related

How to host a webserver and a database server on same Azure VM

How can we start 2 servers on a single VM in azure . I am having a standard D1 VM . I would like to host an app server along with a database server on my VM which run on different Port numbers .
I can do this locally by opening 2 terminals , but I dont see a way to do the same on cloud. I am new to cloud computing . Please help.
When you install or configure or run your software on Azure VM, you can manage to do it just like a regular server after you SSH or RDP to that Azure VM.
First, you need to select the OS (Linux or Windows) of Azure VM for your software. After the Azure VM is provisioned successfully with appropriated ports open in the network security group, you can access that Azure VM locally via RDP or SSH.
Then, you can install your web and database server on the Azure VM as usual on your local machine.
Here are some articles for your reference:
Tutorial: Install a LAMP web server on a Linux virtual machine in Azure
How to install SQL Server on azure vm
Alternatively, you can install those servers automatically using the custom script extension with the Set-AzVMExtension cmdlet on the Azure Cloud Shell. The Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. You could get more details from the tutorial: Install the SQL, IIS, .NET stack in a Windows VM with Azure PowerShell

Do I need SSH tunnel to deploy Docker containers from Windows Server 2016 using Full CI/CD pipeline

Thank you very much for your help with the previous questions
Deploying Windows Containers (created with Docker) into Azure Container Service
Windows Container vs Docker Container and Azure Container Services/Kubernetes cluster with Linux OS
I am continuing my research and somewhat at a standstill as I try to follow the instructions of the following article that explains how to create CI/CD pipeline to deploy a multi-container application.
https://learn.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-docker-swarm-setup-ci-cd
The code sample that is referenced here is built for the Linux application, and I am not able to run it or create Docker container out of it.
Thus, I have following questions (those questions could be all over the place, my apologies for that)
When I create a .Net Core Web API on Windows 2016 server, is there any possibility for me to create an application that I could deploy to a Linux environment? (portable .NET Core Web API application)
When I would like to take advantage of CI/CD pipeline using Visual Studio Team Services, do I really need to create Azure Container Service with Docker Swarm? As far as I understand ACS is a Linux based environment whereas I would create Windows based docker containers on Windows Server 2016
Do I really need to be concerned with ACS and SSH tunnel when dealing with Windows Server 2016 based docker containers if I could easily deploy those containers to a Kubernetes cluster with Windows nodes
Is there an alternative way for me to deploy docker containers created on Windows Server 2016 using Full CI/CD pipeline to Visual Studio Team Services without using the Linux based SSH tunnel/ACS
Thank you very much for your generous input
Mikhail
1.When I create a .Net Core Web API on Windows 2016 server, is there any
possibility for me to create an application that I could deploy to a
Linux environment?
Yes, .Net core is a general purpose development platform maintained by Microsoft and the .NET community on GitHub. It is cross-platform, supporting Windows, macOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios. So we can deploy .net core web api app on Linux environment.
Maybe we can refer to this link.
2.When I would like to take advantage of CI/CD pipeline using Visual
Studio Team Services, do I really need to create Azure Container
Service with Docker Swarm?
No, creating a CI/CD pipeline on Azure Container service with kubernetes and visual studio team services is available. More information about VSTS and ACS k8s, please refer to this link.
3.Do I really need to be concerned with ACS and SSH tunnel when dealing with Windows Server 2016 based docker containers if I could
easily deploy those containers to a Kubernetes cluster with Windows
nodes
If you want to use VSTS to deploy your .net core container, I think we should connect to ACS cluster.
If you want to use ACS k8s, we should add kubernetes connection:
4.Is there an alternative way for me to deploy docker containers created on Windows Server 2016 using Full CI/CD pipeline to Visual
Studio Team Services without using the Linux based SSH tunnel/ACS
Do you mean you want to use ACS, but don't want to connect Linux based SSH tunnel? If I am right, we can deploy a site-to-site VPN between your on-prem network and Azure Vnet, in this way, we can connect k8s like local.

Windows Azure Virtual Machine and cloud service nodejs app deploy

can anyone help me with Microsoft Azure cloud service and Virtual machine connection? My nodejs app is running live on VM but not outside virtual machine. How can I deploy nodejs app to my cloud service using virtual machine?
Note : I have added endpoints as well. Please help. Thanks
All I did now is used port forwarding using endpoints in azure. Secondly I ran the nodejs app locally on VM, it is now accessible outside VM as well using VM's public IP address. Now I dont use cloud service anymore since there is no need. Thanks everyone
When we create a virtual machine in Azure manage portal From Gallery, after selecting image and VM size, it will ask us for creating a new cloud service or selecting an exist cloud service to contain the VM.
So when you create a new one, you can put it into an exist cloud service you want.
But once the VM created, we can’t move it to other cloud service.
However, we can capture your exist VM with node.js application and environment. Then you can create a new VM using this image into the destination cloud service without redeploy environment and applications.
For more information, we can see at Capture an image of a Windows virtual machine created with the classic deployment model and How to Capture a Linux Virtual Machine to Use as a Template

How to Create cloud service with Ubuntu OS on Microsoft azure

I have a PHP application which runs on Ubuntu.
I am looking for Cloud service on Azure which has Ubuntu OS so I can deploy my application over there.
I am able to find WAMP (Windows + Apache + My SQL + PHP) Cloud service on Azure but I am looking for LAMP (Linux + Apache + My SQL + PHP).
Appreciate for Any help.
I assume you're talking about Azure Virtual Machines rather than Azure Cloud Services, which are two different compute options. You can check this article to get the details about the different compute options on Azure. Cloud Services are a Platform-as-a-Service (PaaS) concept and only run on Windows Server. Azure Virtual Machines are basically hosting of VMs and these come in both Linux and Windows Server.
You can find ready-made Ubuntu-based VM images containing the LAMP stack in the Azure Marketplace or you can check the VM Depot, which contains community-provided VM images.
Alternatively, you can prep your own Virtual Machine and save it as a VM image, which you can then use to create new VMs off of it.
Azure Cloud Services (worker and web roles) are Windows only. Virtual Machines can be Windows or Linux.
However, if you are just looking to host your web front end you could use an Azure Web App (previously named Azure Websites) which has first class support for PHP, but the underling OS is still Windows.
In addition to the answer from Nick Trough you might want to try an ARM Template, e.g. https://github.com/Azure/azure-quickstart-templates/tree/b1908e74259da56a92800cace97350af1f1fc32b/lamp-app
This allows you to deploy a simple LAMP server (like marketplace or VM Depot) but has the added benefit of providing the configuration as an ARM Template (i.e. code) so you can easily modify it.

How can an IBM Worklight project be deployed on Windows Azure?

How do I deploy an IBM worklight project on Windows Azure?
Worklight works on Windows.More details available at the link below.
http://www-01.ibm.com/support/docview.wss?uid=swg27024838
To my knowledge IBM worklight only works on Linux. This means you'll need to exclude Windows Azure Web Sites and Windows Azure Cloud Services (Web Roles, Worker Roles, VM Roles).
The only way to run Linux in Windows Azure is by using Windows Azure Virtual Machines (IaaS). The deployment of IBM worklight on Windows Azure Virtual Machines will be similar to a deployment on Amazon EC2. Follow this guide, but instead of creating the VM in Amazon EC2, create it in Windows Azure (by using the gallery for example).

Resources