Reputation: 895
We have created the Web applications and we have a plan to publish the application as Web App in Azure Marketplace. Publishing the Web App to Marketplace can be done using ARM templates(POC) for one-click deployment for our customers.
When we release the newer version of the application, how can we provide the seamless upgrade to our customers through the Azure Marketplace like Google Play Store (Install button for 1st time and Update button for older version use users?
I came through this article explained the deployment in Azure. But, i didn't find any article for Upgrade Azure App
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-deploy
Upvotes: 0
Views: 1206
Reputation: 8717
In the ARM template you use to provision the site for the customer, you can enable continuous deployment to that site from a GitHub repo. So anytime that repo is updated, the website (any or all of them) provisioned by your template will be update with the new drop.
See this sample template: https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy
And then for automated deployments set this to "false":
Upvotes: 1
Reputation: 8491
We can use git pull command to get the updates from other git repository. In Azure kudu, the command could be like this,
D:\home\site\wwwroot>git remote add gitsource https://[email protected]/xx.git
D:\home\site\wwwroot>git pull gitsource master
When we release the newer version of the application, how can we provide the seamless upgrade to our customers
After released the new version of your application, you could force your client to execute upper command to get the updates. If you use C# as your programming language, you could use following steps to execute powershell command.
private static string RunScript(string scripts)
{
// create Powershell runspace
Runspace runspace = RunspaceFactory.CreateRunspace();
// open it
runspace.Open();
// create a pipeline and feed it the script text
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.AddScript(scripts);
pipeline.Commands.Add("Out-String");
//execute the script
Collection<PSObject> results = pipeline.Invoke();
//close the runspace
runspace.Close();
// convert the script result into a single string
StringBuilder stringBuilder = new StringBuilder();
foreach (PSObject obj in results)
{
stringBuilder.AppendLine(obj.ToString());
}
return stringBuilder.ToString();
}
Upvotes: 1