Docker on Azure .Net Core WebApi with continuous deployment - did it work? - azure

I followed the following: https://www.visualstudio.com/en-us/docs/build/apps/aspnet/aspnetcore-to-azure and everything appears to work just fine. My build work and my Dev release was successful.
At the end of the documentation it says:
When the release has completed, browse to your web site, refresh the
page, and see that the change has been deployed.
But I have no idea what that url is? How do I tell where that is or if everything did in fact work? Sorry for the dumb question, I have never worked with any of this before - thank you.

That's the URL you choose for your web app before.
See step 5 in the previous step "Define and test your CD release process":
After the release is complete, navigate to your site running in Azure using the Web App URL http://{web_app_name}.azurewebsites.net, and verify its contents.

You can try following this guide: https://blogs.msdn.microsoft.com/webdev/2016/11/16/new-docker-tools-for-visual-studio/
By doing it with Visual Studio, it creates by itself the complete pipeline which you can then modify or extend.
In the case you would like to have more than one service I recommend following this guide: https://learn.microsoft.com/en-us/azure/container-service/container-service-setup-ci-cd
Both guides helped me to understand how ACS works, also will be worth watching the Docker section in the Visual Studio Lunch Keynote :)

Related

Cannot see Deployment Source options in Azure Portal

I'm writing this simple answer to help others that would otherwise have had to spend hours getting confused by every tutorial out there.
My issue:
Newbie to Azure web apps and have been trying to learn how to deploy via GitHub. Every tutorial and video I checked out showed that as soon as you create a Web App then go to the Deployment options screen it lets you choose how you want to deploy it.
However I was not seeing this in mine - it was as if it was pre-configured for me but there was no ftp or GitHub option showing.
Solution:
The problem may be because I had used the node.js empty template to create my web app and it preconfigured something for me (though I don't see why this should be the case); but in any case I went to the Deployment options screen, pressed the Disconnect button. Waited then hit settings, and hey presto I finally got to where all the tutorials were talking about.

Can't install Azure WebApp Application Insights without Visual Studio

I have wordpress installed and running in an Microsoft Azure WebApp. When I created the WebApp, the system automatically created Application Insights, which I tried to enable, but unlike on my other WebApps, the server side tracking wasn't working and I couldn't fix it, so I tried to delete it and added a new Application Insights resource...
Unfortunately I can't figure out, how to get it running, sice now I dont have a "deploy" button, to make it work, nor do I have Visual Studio - which every guide recommends to use and is a bit annoying.
What I need to do is install somehow the system monitor for App Insights in my App but can't find out how. (without VS)
Any help appreciated. Thanks
EDIT (SOLVED) :: Justins comment is the solution to this problem.
use the application insights plugin for WordPress. It will set up all of the necessary things to get the server side tracking.
http://github.com/Microsoft/ApplicationInsights-WordPress

Why does my Umbraco installation from within the Azure Marketplace always fail?

I am trying to install Umbraco by using the Azure Marketplace. There they offer a template for it. I am always receiving the error below. I tried to install it a couple of times now but I always get the same error.
Does anybody know what this error message means? Is anybody able to install Umbraco by using the template in the Azure Marketplace?
]
You're asking 2 questions above.
Please see my answers and proposed troubleshooting guide/workaround below:
The error message means that the MSDeploy process failed due to some error which renders it unable to deploy the web deploy package for your Umbraco web app.
Yes I am able to provision a Umbraco web app from the Azure Market successfully (Location: Central US) and couldn't reproduce your issue
Troubleshooting Guide:
Append .scm in front of the azurewebsites.net of your Umbraco Web App as shown below and go to the Url.
Click on the Diagnostic Dump. You will be prompted to download a .zip file
Extract the zip file. You should see 2 folders at root level
Go into
LogFiles\SiteExtensions\MSDeploy
You should see the detail log files for MSDeploy
Detailed MSDeploy log messages are in the appManagerLog.xml file.
If it is related to client side issue which can be resolved by yourself, you can try to resolve it and try again.
If it is related to server side issue, you should create a support ticket for Microsoft to look into with the detailed MSDeploy log which pinpoints the root cause which will help them a lot.
Hope this is useful.
A Microsoft employee confirmed this is a bug in the application currently. I have to wait for a fix.
I have encountered numerous problems with the Azure installer of Umbraco, try setting it up in VS2015 then publishing it to Azure. I have found that this works well.

VSO not deploying Azure website with WebJob

A website with webjob not deploying to Azure.
I am having an issue getting a website with an associated webjob console application to deploy using continuous deployment via Visual Studio Online. I am using VS2013 with update 4 and latest Azure SDK.
The website, and the associated webjob, will publish to Azure using direct publish for Visual Studio and works perfectly, so I am confident the publish settings are fine.
The solution will build and work locally fine.
The solution, once checked in, will build and (seemingly) deploy fine in VSO (using CI) and Azure notes the build was successful and shows it as 'Active deployment'.
However, the website and associated webjob will not be updated.
When I have browsed the deployed files after the VSO build and deploy on Azure, all that is happening, is the binaries of the console app are being copied into the bin/ folder of the website.
None of the website files are being updated. It is almost as if it is deploying the wrong project!
If I remove the Webjob and just deploy the website, it will build and deploy fine through VSO - the website will update.
It is adding the webjob that causes some issue with the deployment via VSO.
I am confident all steps are correct to add the webjob to the WebApp, with the correct webjobs-list.json being added to the webapp and webjob-publish-settings.json to the Console app - as I said, publishing the website (with the webjob) direct to Azure works perfectly, and both the site and webjob get updated.
I have searched post after post and tried all manner of things, but none have worked.
Given the fact this published fine direct from VS, and also that the build is completing, it would suggest that something is wrong with the VSO Build Defintion.
My first guess would be to change it from building the solution to instead building the web project only, but this does not seem to work.
I have also tried every Output location setting (both for the solution build and the web project build) - the only one that works and the build completes is the solution (.sln) build with 'SingleFolder' set.
I have been battling this for a couple of days now an I'm a bit stumped!
This also happens if you have a static website being deployed using a Visual Studio solution via VSO with an automated build - unless the Visual Studio project / solution containing the website is changed then the actual site contents will not be redeployed.
I think your hunch that it's deploying the wrong project is correct. If you have multiple "deployable" projects in your solution (and the console app is considered deployable, as this is one way you can host/deploy a webjob), you need to tell Kudu which one to deploy.
You can control it adding a new setting under "app settings" on the "configure" tab for the webapp.
The setting you want is Project and it's a relative path from the solution root to the .csproj file of your web project.
Alternatively, you can specify the setting in a custom .deployment file.
Relevant Kudu documentation here
From the documentation:
You can specify the full path to the project file. Note that this is not a path to the solution file (.sln), but to the project file (.csproj/.vbproj). The reason for this is that Kudu only builds the minimal dependency tree for this project, and avoids building unrelated projects in the solution that are not needed by the web project.
Here is an example:
[config]
project = WebProject/WebProject.csproj
I have also tried every Output location setting (both for the solution build and the web project build) - the only one that works and the build completes is the solution (.sln) build with 'SingleFolder' set
That's the root case of problem.
You can't have SingleFolder as it sets the OutDir which mess up with web job packaging.
I had to introduce a wpp.targets files in each of my web app project to create the publish package to a particular path (using PackageLocation)
So, let each project have that and set the setting to AsConfigured (or Per Project) instead of SingleFolder.
See this

How to take web app offline while publishing?

Very often, when I hit Publish in VS13, I get the site to compile but when uploading I get the error saying that a file is busy.
Updating file (MyAzureSite\PrecompiledApp.config).
C:...\v12.0\Web\Microsoft.Web.Publishing.targets(4255,5):
Error ERROR_FILE_IN_USE: Web deployment task failed.
(The file 'PrecompiledApp.config' is in use.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
When I follow the link provided, it's suggested that I should go for enabling the appOffline rule. "Sure!", I think to myself. But how?! I've googled it, only to get a bunch of hits on the file that's supposed to replace the site while publishing. However, I get no info on how to get rid of my little problem.
I went the easy way and downloaded a publishing profile from my Azure web site and now I'm using it (you know, ALT+B+H).
Right now I resolve the problem by going to the portal for Azure and manually take the site off-line. Then I can publish and after that I take the site on-line. Highly impractical and painfully tedious.
What is causing this and how do I kill it?
You actually configure it in the publishing profile (.pubxml). Just add the element to the PropertyGroup like this:
<PropertyGroup>
<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
...
</PropertyGroup>
More in this MSDN document
The Azure App Service Deployment Task has a checkbox for this (from version 2.0 onwards), under Additional Deployment Options: Take App Offline. Check that and you should be good to go.
Take Application Offline: Select the option to take the AzureRM Web App offline by placing an app_offline.htm file in the root directory of the Web App before the sync operation begins. The file will be removed after the sync operation completes successfully.
Screenshot:

Resources