Linux flavor and version on my Azure WebApp for linux - linux

I am trying to host my .Net core MVC 2.1 linux application in azure WebApp. How do i know the Linux flavour, O/S, version running on WebApp? I am selecting 'West US' as region.
I think this is needed while i build my code on my development machine:
How to compile .NET Core app for Linux on a windows machine
My dev machine is ubuntu and Production server is CentOS

You can get system info from the Kudu environment. Kudu is the central nervous system of a Microsoft Azure Web Site; it handles the Git integration to a Web Site as well as provides an API endpoint for programmatic access to app settings, deployment information, files, active processes, runtime versions, source control information, web hooks and web jobs.
To get to Kudo, navigate to https://<webappname>.scm.azurewebsites.net, from there you can click on Environment to get something like this:
System info
System up time: 4.10:36:14.7190000
OS version: Unix 4.4.0.128
64 bit system: True
64 bit process: True

When you use Web App in Azure, you need to create the Service Plan first, it will need to decide the system type: Linux or Windows. And then when you create the web app, there is also a chance to choose a runtime for your web app in your Linux service plan(in your case, Linux is you need).
Azure provides some Built-in images as the runtime. See Build-in Runtime. If the runtime your application requires is not supported in the built-in images, you also can build your own Docker image as you need for your application. See Use a custom Docker image for Web App.
So you do not need to know what the OS is, you can just create the choose the OS you need. If you really really want to know the OS version, you can create an SSh session to your web app and run shell commands to check what the OS version is. See SSH support for Azure App Service on Linux.

Related

Azure App Service suddenly stopped with PhantomJS error

We have a Restify API running in Azure App Service on Linux for a while now. Suddenly this app (both test and prod, they run as seperate apps) stopped working. Based on the logs the error is related to a package we are using node-highcharts-exporting which is dependent on PhantomJS. App Service is using Node 8.1.
We tried re-deploying the code, upgrading node version to 8.12 (do not want to use latest version with out testing) but still no luck.
Deployment Logs: (This part is successful. This is just for reference)
Container logs: (Startup fails here)
Tried to replicate the same environment on-prem and everything works fine. Created a new App Service which is also running into same issue. Any help is much appreciated.
Update 1:
I think I figured out what is happening. This is related to font libraries on linux https://github.com/ariya/phantomjs/issues/10904
I need to install libfontconfig but this is not supported on Azure App Service.
Yes, it is due to sandbox restriction on a App Service. Just to highlight, the standard/native Azure Web Apps run in a secure environment called a sandbox. Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available.
Not supported scenarios on standard App Service - PhantomJS (/Selenium): tries to connect to local address, and also uses GDI+.Known issue for all PDF generators based on wkhtmltopdf or phantomjs: custom fonts are not rendered (system-installed font is used instead) because of sandbox GDI API limitations.See App Service GitHub sandbox page.
Based on your requirement, however you could use a custom container in App Service (You can use a custom Docker image) that lets you make OS changes that your app needs.
Checkout these document for more details on this topic:
Run a custom Linux container in Azure App Service (You can use a custom Docker image): https://learn.microsoft.com/azure/app-service/containers/quickstart-docker
Run a custom Windows container in Azure (Preview):
https://learn.microsoft.com/azure/app-service/app-service-web-get-started-windows-container

ASP.NET Core App on Google Cloud Platform (Linux)

We have several intranet ASP.NET applications as parts of erp system running on local company Windows server, but recently decided to move to Linux servers due to low cost of maintenance. I know that it's possible to deploy ASP.NET Core Apps to Google Cloud Platform, but I did not find any info how to setup Linux VM to make deploy possible.(there is only info about setting up Windows VM).
Maybe someone had an experience of deploying asp.net core to linux on Google Cloud Platform?
You can set up a Linux VM in the GCP Console (on VM instances page) and then deploy your app using that instance, however, Google Cloud Platform documentation offers 4 substitute ways to deploy an ASP.NET Core app to GCP.
The simplest one would be to deploy it from Visual Studio.
To deploy your ASP.NET Core app to GCP, you can use Google Cloud
Tools for Visual Studio extension, which takes care of all the
necessary details to deploy your app from right inside the Visual
Studio IDE.
Another option would be to deploy a Framework Dependent Deployment bundle (see “Method 2” in the mentioned documentation).
This would be the simplest way to deploy your app from the command
line.
If you need more control over how your app’s container is built, you can also specify your own Dockerfile to deploy your app to Google App Engine with it (see “Method 3”).
This method would be especially helpful if you need to install custom
packages in the container, extra tools or need more control over the
contents of the container.
Alternatively, if you need more control over your workloads, or need to use protocols not supported by App Engine, you can use the Container Engine ("Method 4").
Here you may find a step-by-step tutorial on deploying an ASP.NET Core app to App Engine, which you might want to use as a reference.

How to install a .exe in the app service of Microsoft Azure?

I published a web application in a app service of Microsoft Azure, but my application needs a driver to connect with a IBM database, that driver is installed in the machine where I developed the application but now I need to install the ".exe" file that contains that driver in the app service of Microsoft Azure in order to get my application running correctly.
How can I install a .exe file in app service of Microsoft Azure?
You can't install 3rd party software in App Service. You should look at deploying your app in a Virtual Machine instead. You'll be able to remote desktop to it and install your database driver.
Azure App Service doesn't allow installing any software to it.
You can include some executable (and its files) in your code tree, but writing to the filesystem or registry is denied.
I confirm that you can't.
If the executable does not require complex dependencies you can store it in the assembly resources and write into a temp directory (check this).
Another option is to have it deployed directly with your project tree.
Than you can invoke it with System.Diagnostics APIs.
But be aware if you're running a Linux App Service you need to set the file to executable.
I suggest to invoke directy the shell command: /bin/chmod +x your_cmd.

Deploying my Azure application to my Company local Windows Server

I am new to Windows Azure and need help with deploying my Azure application, which is correctly deployed to Azure, to a local server.
My application consists of one Web Role, which contains a Silverlight client for a Silverlight application.
I installed and configured windows server appfabric on the server and the server is actually ready. But I don't know how can I deploy/publish the application.
To deploy to Azure, i created the .cspkg file using the publish option in the right click on Azure application. And then deployed the generated files to Azure using azure management portal. how can i do something like that for the local server?
Windows Azure provides an emulator environment that runs on your development machine. You may either run a Windows Azure app in that emulator, or publish to Windows Azure. There's no option to deploy a Windows Azure application to Windows Server.
While some of the services offered are similar (such as cache), Windows Server AppFabric is not equivalent to the services provided by Windows Azure, and there's no equivalent fabric controller that runs on Windows Server.
EDIT: Adding clarification per #Asmaa's comments.
Building a private cloud is not the same as creating a local version of Windows Azure. The Private Cloud you reference is essentially a set of Windows Servers running virtual machines managed by Hyper-V, and some type of local storage. You'd be fully responsible for replication, disaster recovery, durable storage (where storage survives even with a disk crash), scaling, etc.
Windows Azure provides the abovementioned features, but only within its data centers. As #Avkash mentioned, there is a Windows Azure Appliance, but it there are only a handful in existence and they're huge (as in made for a data center).
If the objective is to run your code either locally or in Windows Azure, this can be done, but not by pushing the Windows Azure package to your Windows Servers. You'd need to build separate solutions to run your code in the two environments. You can reuse your core code if it's packaged correctly, but the notion of the Role Environment, Diagnostics, and other Windows Azure features would need to be replaced with something else.
One last thing: if you want to build a hybrid app, where some of it is deployed locally and some to Windows Azure, then there are certainly ways to bridge the two. See this article for more info.
The bottom line is that you can not deploy Azure Application to Windows Server machines in your own data center and David added all the info needed on this context. However, I just want to add little more as you are new to Windows Azure. I can understand why you are trying to do something like this and because I have had similar conversation with other partners in past, I believe this information is useful.
The main why you couldn't do it because Windows Azure main components i.e. Compute, Storage, Networking and other value added services which are built upon main component are just not available in your machine however, there is a lot more to it.
Windows Azure Appliance is a product which can be deployed to any Data Center and currently used by Dell, eBay, Fujitsu and HP as described in this link. Windows Azure and Windows Azure Appliance are not exactly same, however, Windows Azure Appliance does have a similar model of Compute, package deployment, Storage, Management portal and functionality. So when available to general public this could be a choice for data centers to have something similar to Azure running in their premise however it is currently available to only very limited partners.

Hosting existing node.js apps on Windows Azure

Is it possible to port existing node.js applications to Windows Azure platform? I currently develop on my Mac but will need to deploy the application to Windows Azure in a near future.
You may also want to check a video on Channle 9.
node.js on Azure : http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012/node-js-on-Azure
Yes it is very much possible. You may also need to consider to make changes to use Azure Blob storage where your node.js code is using local file system (if required). The deployment is very similar to any other Windows Azure App and one you have Azure SDK for node.js you can use powershell cmdlets to make your job easy.
Download Node.js SDK for Azure
https://www.windowsazure.com/en-us/develop/nodejs/
Here you can learn the basics to deploy node.js app to Azure:
https://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
Porting node.js apps to Azure is possible but not yet a yes/no answer.
You can run your Node apps in Azure but you need to look at the modules you're using to make sure you aren't depending on a tool or command or other facility that isn't yet available on Azure. For example, are you using a database like redis or couchDB or mysql? These don't exist natively in Azure so you may or may not be able to port that layer -- you'll have to check.
Since you're on a Mac, there isn't yet a native OS X deployment tool. Microsoft and the Cloud9 folks have been showing a way for Macs to deploy from the Cloud9 IDE which works but the Mac story will most assuredly improve over time. I work on a Mac but I keep a Windows VM open (Parallels) and if I deploy from the desktop I've been using the Powershell cmdlets in the Windows Azure SDK for Node.js which makes things fairly turnkey from Windows.
You will want to follow a couple of repos and their contributors: Azure SDK for Node, which allows native access to Azure Storage via npm install azure and iisnode (on Github) which is a component that assists your node app running under IIS (the Windows Web Server) on Azure.
It's been great to see the Node story on Azure evolve; it's still just a little early but they seem to be making great progress quickly.

Resources