Azure management API nodejs sdk for managing web apps - node.js

I am trying to provision a web app through Azure nodejs SDK
Are there any examples or repos that help in doing this?
Create a new web app.
set up the deployment source to bitbucket
sync with deployment source.
setup the environment variables
restart the app.
All of this done through management API...
Any inputs or guidance?

You can check out the official code sample for managing your web apps here.
This code sample includes the following:
create a resource group
create a hosting plan
create a website
list websites in a resource group
get details for a given website
update site config for a website
For other operations please refer to the SDK documentation for WebApps.

Related

Web2py project deployment on Azure app service

I am currently using PythonAnywhere to deploy my web2py project, it is working fine for me.
Now I want to deploy my web2py application on azure App service. I followed all the steps mentioned in below Goggle group
Creating web apps with Web2py in Azure Web Apps
Still I can see default page of azure python web app. I also tried to do it with same code base mentioned in given git repository.
I am unable to figure out which document I should refer or what are the right steps to deploy web2py project to Azure web app service.
Below are the steps I followed to deploy web2py project to Azure app service
Created Azure app service with P1V2 app service plan. Linux machine with python 3.6 default language
Selected local git repository in deployment center and pushed code to azure git repository. It shows deployment successful message
Browse azure website, but this time it is not showing expected landing page. It is showing me default app page of azure website
I tried steps 3-4 times but everytime I am getting same result. Am I missing something here?
I reviewed the forum thread Creating web apps with Web2py in Azure Web Apps of Google Groups as you mentioned, I see there is a file named web.config in its attachments, as the figure below.
However, the discussion is too old at 2015-11-13. At that time, Azure only supports Windows for Azure App Services, but you were trying to reproduce it on Azure WebApp for Linux based on Docker, because P1V2 Sku is for Linux and Standard S1 for Windows, as the figures below.
P1V2 Sku of Azure App Service Plan for Windows
Standard S1 Sku of Azure App Service Plan for Windows
So if you want to reproduce the same application of the thread of Google Groups on Azure WebApp for Windows, please try to refer to my answer for the other SO thread No pip or python module inside azure webapp. There is not any Azure offical document introduce how to deploy a Python application on Azure Windows WebApp.
Otherwise, please refer to the two Azure offical documents Quickstart: Create a Python app in Azure App Service on Linux and Configure a Linux Python app for Azure App Service to try to change and deploy it on Azure Webapp for Linux. Even that you need to follow the document Configure a custom Linux container for Azure App Service to create a custom docker image for deployment.

How do you create an installer for Azure Web Apps / Azure Websites

I am a software vendor with a .net web solution that I want customers to be able to easily install / deploy into Azure Web Web Apps / Azure Websites along with a Sql Azure backend. I can't find any installer tool that supports this scenario. I have also looked into the Azure Marketplace but it seems the only option there is to create VM images. I want my customer's to avoid having to deploy to an manage VMs and adopt the IaaS model. Instead they should be able to install to Azure Web Apps with a package that copies all the web solution files and installs and connects the Azure Sql. Is this possible or will I have to manually deploy and configure Azure solution for each customer?
You can use the VS Marketplace to do the deployment. What you need is to create an ARM template. There is a huge number of samples here: https://github.com/Azure/azure-quickstart-templates - you can pick one of the web app ones - for example: https://azure.microsoft.com/en-us/resources/templates/201-web-app-sql-database/ - has a SQL database linked to a web app.
The ARM template allows you to do a "no-hands" deployment of the resources and know when they are ready for further action. You can also deploy from any of the supported continuous deployment options (see the template with a GitHub connection as an example) or you can use ftp/msdeploy after the deployment is successful.
This is a good tutorial https://learn.microsoft.com/en-us/azure/azure-resource-manager/vs-azure-tools-resource-groups-deployment-projects-create-deploy
This is the github example mentioned in previous answer
https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy

Deploying java app using Azure SDK for Java/Net

Is it possible to create a tomcat and MySQL/SqlServer service using azure-sdk-for-java or azure-sdk-for-net, and deploy a war file programmatically?
I went through the example codes about creating resource groups and virtual machines, but couldn't find an api about creating a tomcat, sqlserver or MySQL inside sdk.
If this is not possible what is the way to make a programmatic/automatic deployment to azure?
According to your description, based on my understanding, I think you want to create an Azure website with tomcat and database to deploy a Java WebApp all at one time programmatically.
For the purpose, per my experience, you need to implement these via do the three steps below.
Create a webapp with tomcat & database using ARM template in a Java/.NET program with Azure SDK for Java/.NET. There are many existing samples which include two Azure deployment templates (sample 1, 2) & sample deployment program (for Java & .NET) that you can refer to.
Get publish settings file or set deployment credentials to get the credentials you used for deployment. It seems that you need to do this step manually, not programmatically.
Deploy your Java WebApp programmatically via FTP, Kudu REST API or others that you can refer to some offical documents & wiki. Meanwhile, you can refer to the Azure Java WebApp sample on GitHub to know what files you need to upload.
Hope it helps. Any concern, please feel free to let me know.

How can a node.js app be deployed to azure via appveyor (pulled from github)?

I currently have a .net and an angular app, both deployed to azure via appveyor. Now I want to add a node.js app, also in a github repo, also to be deployed via appveyor and into azure.
However I have no idea where to start.
What kind of azure app should I create? Just the standard web app service?
How do I deploy this to azure via appveyor?
What kind of azure app should I create? Just the standard web app
service?
At first, I could share Azure App Service plan and when we selected one of them with you. Please refer to this document(https://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/ ). Then, for selecting which one service plan, it depended on the site load and requirements. It is not relation to deployment channel.
How do I deploy this to azure via appveyor?
You can try to follow this guide Deploying using Web Deploy, mark Package Web Applications for Web Deploy check box in the settings=>build tab of your project in appveyor.
Then login Azure Management Portal and download publish profile.Specify the following deployment settings in AppVeyor:
Server: https://<publishUrl>/msdeploy.axd?site=<msdeploySite>
Website name: <msdeploySite>
Username: <userName>
Password: <userPWD>
NTLM: disabled
Replace <publishUrl>, <msdeploySite>, <userName> and <userPWD> with values from downloaded publishing profile XML file, in the deployment tab.

Upload package to windows azure web site programmatically using C#

My goal is to be able to deploy a package of ASP.NET website stored in Azure Storage as Azure Web Site programmatically (using C# ASP.NET) with just a click of a button. I know this can be done if I will deploy it as Azure Cloud Service by using Service Management API or azure powershell.
I dig into the source code of azure powershell and I see that it can only deploy from local Git and GitHub repo. Does anyone have any idea of how to do it from Azure Storage?
Note: I want to be able to manage all the Web Deploy Packages (stored in Azure Storage) online. I have an ASP.NET MVC website deployed as Azure web site and I will be using this one to automate deployments.
How are you packaging your site in blog storage? One way to publish to Windows Azure Web Sites is to use web deploy. You could package your site as a web deploy package as part of your build, and then use msdeploy.exe to push your bits to the site:
http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx
This would be no different from using web deploy to publish to an IIS Server.
It looks like someone else has used this approach with success:
http://robdmoore.id.au/blog/2013/06/01/windows-azure-web-sites-programmatic-web-deploy/
Hope this helps!
You could totally do this using the Windows Azure Management Libraries and the Storage SDK together. If I'm right in reading this, do you want a Web Site that you use to spin up new Cloud Services, and you want to deploy those services from the server side of your web site. If that's the case, you could do that using the Compute Management Client NuGet.

Resources