Octopus Deploy to Azure Web App - Doesn't unpack - azure-web-app-service

I'm new to Octopus so followed https://microsoft.github.io/PartsUnlimited/cicd/200.3x-CICD-CDwithOctopus.html
Right at the end, Octopus has told me it's "successfully" deployed to my Azure Web App. However, when I browse to it I get:
You do not have permission to view this directory or page.
Browsing the Kudu console of the site I can see the following files have been created in D:\home\site\wwwroot:
OctopusWalkthroiugh.deploy-readme.txt
OctopusWalkthroiugh.deploy.cmd
OctopusWalkthroiugh.SetParameters.xml
OctopusWalkthroiugh.SourceManifest.xml
OctopusWalkthroiugh.zip
So something has been deployed, but it's like a final "unpackage" step hasn't happened. I don't know the terminology so my searching hasn't been very helpful.
What have I missed?

Related

Deploy Azure AppService to Url: 404 + no worker is assigned to the app service plan. The site cannot serve any requests

I'm getting a 404 trying to access my azurewebsite.net
My Resource group contains an AppServicePlan, an AppService, SQL Server & SQL Database, a KeyVault & SignalR.
Locally everything works, the AppService is running, AppServicePlan is Ready (1App/0Slots),
Connected Services for SignalR & SQL are configured (in the menu you get when right-clicking WebProject > Publish). KeyVault is configured & accessible. Not sure if these are problem free though, as I keep getting NuGet Errors, stating unable to update NuGet Package.
When I right-click my WebProject & Publish, I get Message Publish has been succeeded. But when I click on the link, I get a 404.
I'm working with two pipelines in AzureDevops
Seeing as official documentation is always lagging behind and showing older interfaces, it has not been much of a help.
I followed https://learn.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice this tutorial, did everything stated, but the last step, I didn't get the desired result (an accessible website through azurewebsites.net).
I have a Export template with all connected services configured (I guess generated by azure?) but don't really know what to do with it.
Can anybody pinpoint what I am missing or doing wrong? Or tell me what else I would be needing, apart from the services I mentioned (like Certificates, Active Directory?)
Do I need a gitHub repo next to AzureDevOps Repo & Azure Resources?
Does publishing via VS interfere with my automated pipelinebuilds?
Thanks!
You can try to deploy to Azure App Service in Azure DevOps directly. I used the sample you shared and worked well on my side. Here are my steps:
1.Create the App Service instance in Azure and make sure the default home page is correct.
2.Clone the sample from GitHub to Azure DevOps Repo.
3.Change the deploy stage in the azure-pipelines.yml file on release branch and run pipeline. I removed variable groups and changed the configuration of AzureWebApp task:
4.Browse the page in Azure. I can get the same page as in the tutorial.

Azure Dev Ops - Site Under Construction Page during Web App Deployment

I have a .NET MVC Website that gets automatically deployed based on a GIT repository checkin. (Azure Dev ops Pipeline)
When the website is being deployed, if I got to the website URL. I get a blank page with a "Site Under Construction title" page. After the deployment is complete, this page goes away and I see my site.
What I want to know is how can I customise this Under construction page.
If I add a app_offline.htm file in the root of my visual studio project. I seem to see this file when deploy is happening, but when its finished, the file is still there, and I can't see the site.
Do I need to make a change to my build pipeline somehow? or make a change to my web-app configration?
What do I need to do to have this file displayed only during the deployment.
UPDATE
1. Invoking MsDeploy.exe manually in a Azure Devops
2. App_Offline in MSBuild Remote Web Deploy
PRIVIOUS
You can configure it in .pubxml file. That is actually used to take your app offline while deploying. After finishing deployment, MSDeploy tool should delete APP_OFFLINE.html automatically.
<PropertyGroup>
<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
...
</PropertyGroup>
Related posts:
1. 👍 Automatize App Offline in Azure App Service and Visual Studio
😊 tlejmi's answer is very detailed.
2. How to take web app offline while publishing?
3. Getting site under construction message after azure webapp deployment

Node JS Deployment to Azure Web App Service ERROR - "You do not have permission to view this directory or page."

I've been following this tutorial on how to deploy a NodeJS app to Azure:
https://www.youtube.com/watch?v=RWdxkhajCg0&fbclid=IwAR10Q6x8PbqLDAZZzzMX9Nvp_jEGiN_Ts4V8XLJbzF6xreq6_MB_vsbIqx8
Firstly, I did everything exactly the same way as the author showed and it all worked. In the video, they're using Linux Web App Service. Since I have to get familiar with the Windows App Services (that's what I am required to learn and use for my job), I decided to deploy exactly same app to the Windows Web App service. However, instead of the home page, I only saw "You do not have permission to view this directory or page.".
I've already read bunch of solutions online, people suggest adding a web.config file, but it didn't help no matter what I added to that. The app is not supposed to limit any ip addresses/user groups as it's supposed to be a newly deployed app with no access restrictions (just as in the tutorial).
The only hint that I found out is that on Linux it works, on Windows it doesn't.
The app code is here:
https://github.com/Aitemir/MSP005
Because you uploaded the code to GitHub, my answer will help you very well. Jay's solution should also be effective, but he uses DevOps. If you are interested, you can also study.
Using Github to deploy web app will be very convenient.
Steps to solve my problem:
Download your source code and upload it to my Github.
Create a web app.
Use continuous deployment.
Delete .yml file. Delete all file in this folder.
View deployment status.
When you follow my way, you will successfully deploy your application. You can also put the generated web.config file in the current application in kudu, which should solve your problem.

Not able to access instance after Sitecore setup as Azure App Service from marketplace

I have setup Sitecore 8.2 Update 3 as Azure App Service using Marketplace.
The setup completed and i got urls for cm and cd like
xxxxxx-cd.azurewebsites.net and
xxxxxx-cm.azurewebsites.net
But when I access these URLs I get this screen.
Also xxxxxx-cm.azurewebsites.net/sitecore gives page not found.
Am I missing anything?
According to your screen, the Azure App Service has been created, but there is nothing inside it. Seem like something went wrong and deployment script didn't deploy Sitecore's file to App Service. You can verify it using App Service Editor tool.
The reason why deployment went wrong could be this known issue: https://kb.sitecore.net/articles/755670.

Azure Web App Deploy. Transforming the webconfig

I am trying to chance some appsettings and the ConnectionString of an application in a certain slot in my Azure Web App.
When I try to change the config via the Application Settings on Azure portal, nothing happens.
So I found this post:
http://brian.vallelunga.com/blog/chaining-azure-web-config-transforms-when-deploying-from-source-control
Ok, I done what the tutorial tells me to do and I got success on some deploys (I am using Kudu for auto deploy from GitHub).
But suddenly (without any change of config) the deploys are using the Release transform, instead of the dev one.
Via Kudu console, I saw in deployment folder, in some moment Kudu transformed my web.config in right one, and after transforms it again into the release version.
Someone have any idea what I can do?
Oh. My solution have more than one web project. I am using the "Project" Key on Azure application config page and that one works.
Thanks,
Ok guys, found the answer.
For some strange reason, the value of the parameter SCM_BUILD_ARGS changed from /p:Environment=Staging to -p:Configuration=Debug.
I just passed that value on Azure app settings and voil! It's working now :)

Resources