Upload package to windows azure web site programmatically using C# - azure

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.

Related

Azure management API nodejs sdk for managing web apps

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.

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

How to proramatically publish web application as Web App to Azure using Azure Resource Manager REST API

I would like to develop my custom application wherein I can fill all required details for authentication on Azure and then select a web application package to publish on Azure as Web Application under App Services (not as cloud service).
Scenario:
A win form application to gather required details. For e.g. Publish settings, certificate, App Service Selection, any other selection, etc.
I will have my web application in zip format.
When submit, application should publish my web application on customer's Azure's Web Application under App Service.
Also, is it possible to copy some files under ProgramData after publish completes?
You can do all that:
using Kudu interface to your App Service. (Check the Zip interface)
using PowerShell cmdlets to your Azure accounts(s).
If you app is on a straight VM, you can use any combination of scripting tool (bash, chef, puppet, capistrano, etc.) to access the vm and do whatever you want.
This works great for all kind of app technologies.

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.

What is the best way to deploy NopCommerce 3.0 to Windows Azure using a Web Role?

I need to deploy a NopCommerce application on Windows Azure using Web Role. I created the Cloud project and added Nop.Web to Web Role, but it doesnt work! Thx
The blogpost I've written here - Hosting nopCommerce on Windows Azure Web Sites with Automatic Source Control Deployment - might give you some inspiration. :)

Resources