Azure App Service: Deployment Source missing options [radio vs dropdown] - azure

I set up Azure app service awhile ago and I am recreating an Azure App Service after a large code refactor in a new repo.
However, I am not getting the same options and I see in the original Azure App Service project.
Here is the original Azure App Service project:
Here is the new Azure App Service project:
As you can see the original one has radio options with choices for container vs code repo.
And the new one only has a dropdown for code repo options.
It's been awhile, but how did I get one App Azure app instance to have more options for deployments?

Found my answer here!
I had to go more carefully and now I see in the form where it asks what type of Instance I want.
Be sure to select Docker container.

Related

configBuilder 'Secrets' failed

After the initial attempt to publish my web app to Azure I got the following error. I'm using Visual Studio 2019.
Is there a way to undo the publish?
How do I determine what is missing?
The configBuilder 'Secrets' failed while processing the configuration section 'appSettings'.: 'Secrets' Initialization Error: Method not found: 'System.String Microsoft.Configuration.ConfigurationBuilders.Utils.MapPath(System.String)'.
How do I undo the changes that Publish did within my project:
Approach-1:-
Generally, Azure Web Apps provides back up feature which you may enable in your app to keep a backup of your site. If you are sure that the deployment did not go as planned, you can restore the backup.
Goto App Service -> Choose BackUps
You can see the status of the webapps for every hour as shown here:
Click on Restore icon if needed.
Enter the restore location in Choose a location. Select Create new under the App Service box to restore to a new app. Select Create new beneath the Deployment slot box to restore to a new deployment slot.
You can choose the site configuration as well as per requirements. After providing all these, restore it.
Approach-2:-
Usually after publishing any web app to azure from local, it will be deployed on production server.
You may want to undertake some activity or verification before delivering/after delivering the website to production. You can use deployment slots in this case.
Azure provides non-production deployment slots for each web app, on which we can deploy the website temporarily.
Detailed in article given by #Krishna Kumar.
Create deployment slot by adding a slot under app service as shown:
Alternative Reference: Get publish profile

How to deploy single cshtml file in Azure app service

I have a .Net core app developed using Visual Studio 2019 and deployed on Azure app service. I have function app as well in the same solution. I have to do couple of things and then redeploy to Azure app service.
Add one .cshtml file
Modify one .cshtml file
My question is, how to deploy the CSHTML file only to the Azure app service? Without affecting the existing functionality of application.
As per my understanding, if web app is deployed in Azure app service then the whole thing (solution) has to be deployed even though there are/is very small code modifications.
Please let me know.Thanks.
Even if you have Web App and Function App in the same solution, they should be separated units of deployment. That said, your deployment pipeline should be separately triggered for Web App and Function App.
From the technical point of view(or architecture) there's no concept of "solution". Solution(.sln) is a Visual Studio specific being and even though it's supported e.g. in VS Code, I'd never treat it as deployment unit. Especially in your scenario, when in fact two separate services are responsible for handling your code.
Even if you deploy Function App as a part of the same App Service Plan as your Web App, it's still a separate Azure service. In such a scenario they only share compute.
Yes its possible if you have access to kudu deployment center you can perform manual add/update information , please visit below URL:-
https://[yourAppName].scm.azurewebsites.net
You can also navigate to this site using the azure portal , once you open the app service blade you will find the kudu deployment center option in the bottom left of the menu.
It will provide an online file explorer of your application hosted on the app service and from there you can migrate to relevant folder and perform add/update.

How to deploy Microsoft botbuilder nodejs app to azure using CLI?

I am trying to deploy the basic-bot Microsoft Botbuilder sample application to azure.
I started by creating a new botbuilder node.js sample application through the Azure dashboard, and I was able to successfully follow the instructions here to download and redeploy the application.
I then attempted to copy over the deploy scripts and .env file from the downloaded sample application into the basic-bot application, and attempted to publish using the az bot publish command from the link above. This successfully deployed the basic-bot application, but the deployed application now returns 500 errors. Initially, the 500 errors were caused by the "botbuilder-ai" nodejs package not being installed. I installed this package manually through the Azure console, and this error went away. But the application continues throw 500 errors, without producing a stack trace, and I have not been able to determine why.
The only official documentation I have found that explains how to deploy the bot is specifically for C# and Visual Studio. Is there a way to deploy a bot to azure for a Node.js app using the azure CLI?
Thank you.
Is there a way to deploy a bot to azure for a Node.js app using the
azure CLI?
Yes there is. You can type az bot publish -h for all the options available to you when publishing a bot. Here are some tips about getting it to work:
You will need to log in to Azure with az login
Make sure you've set an active subscription. Type az account set -h for help. Use az account list to see your choices of subscriptions and az account show to see the current active subscription
Publishing can be easier if you set the resource group you're publishing to as your default. Unlike your active subscription, configured defaults don't reset when you log out. Use az configure to see your current defaults and az configure -h to see how to set a default resource group
If you publish and it says Not a valid azure publish directory. missing post deploy scripts then you'll need a PostDeployScripts folder in your bot folder
There are some instructions in the deploymentScripts folder that you might find helpful. Note that as an alternative to the Azure CLI, you can also publish from Visual Studio Code using the Azure App Service extension.
If you publish successfully and you're getting errors when you try to test in Web Chat, sometimes Azure needs a little nudging. When I checked my Channels blade it said Web Chat was encountering errors regarding missing files. I tried some troubleshooting steps and eventually got it to work without any real changes.
Try logging out of your Azure account in the online portal and then logging back in
Try running your code in the online code editor in the Build blade
Try publishing again
Regarding your specific situation of trying to repurpose the downloaded source code to deploy the basic-bot sample, there are a few things you need to know. The .bot file is very important as it contains information about all the services the bot uses, but basic-bot.bot contains none of the needed information. In addition to the deployment scripts and the .env file you will also need to copy over your .bot file. However, basic-bot's bot.js expects the .bot file to contain a LUIS service named "basic-bot-LUIS" so you need to go into the bot.js code and change the value of LUIS_CONFIGURATION to the name of the LUIS service in your .bot file ("BasicBotLuisApplication" if you downloaded the V4 Basic Bot NodeJS code and kept it the same). Make sure you can get the basic-bot sample to run locally before you try to publish it.

Deploy an existing web app over a new one

I have a working app service named "matanwebserver" over a subscription in Azure.
This is a website that I am working on. I work with Visual Studio and I wrote my code inside this app service in Visual Studio.
Now I want to create an Integration site so I can test my code before publishing to the production site.
For that, I created a new app service in azure under the name "matanwebservertest" and I want to use the code I wrote for "matanwebserver" over the new app service that I just created.
I could not find any source which provides a solution, so thanks in advance.
Added some screenshots for a better understanding of the issue
In Visual Studio I do right click on the web app which is called "MatanWebServer" and choose "publish".
Then I choose the new web app that I just created on Azure portal which called "matanwebserertest", and publish successfully.
enter image description here
This is the original (production) website. which its address is http://matanwebserver.azurewebsites.net
enter image description here
After publish to the matanwebservertest web app, I expect to see a "copy" of the original site, but it seems like nothing is there.
enter image description here
To get the current app cloned to the new one, have a look at the 'Clone App' option.
What you're trying to do feels like a perfect example to use for using Deployment Slots Please refer to Set up staging environments in Azure App Service.
When you deploy your web app, web app on Linux, mobile back end, and API app to App Service, you can deploy to a separate deployment slot instead of the default production slot when running in the Standard or Premium App Service plan tier. Deployment slots are actually live apps with their own hostnames. App content and configurations elements can be swapped between two deployment slots, including the production slot. Deploying your application to a deployment slot has the following benefits:
You can validate app changes in a staging deployment slot before swapping it with the production slot.
Deploying an app to a slot first and swapping it into production ensures that all instances of the slot are warmed up before being swapped into production. This eliminates downtime when you deploy your app. The traffic redirection is seamless, and no requests are dropped as a result of swap operations. This entire workflow can be automated by configuring Auto Swap when pre-swap validation is not needed.
After a swap, the slot with previously staged app now has the previous production app. If the changes swapped into the production slot are not as you expected, you can perform the same swap immediately to get your "last known good site" back.

"Deployment Options" for web app disabled in Azure portal

When I create a web app for containers, then the deployment options are disabled in the Azure portal. The option is enabled if I create a regular web app and another type of resources. For web app for containers, the options was working fine till a few days back and I have no idea what triggered it to become disabled. My subscription is active and clearing browser cache, switching browsers, working with different container images, deleting and recreating resource groups, and login/logout do not help. Any suggestions?
The "Enable Deployment Options within Web App for Containers in the portal" feature was requested on feedback.azure.com and declined.
Q. Currently "Deployment Options" is only available for Web App for Windows/Linux. It would be nice if this was enabled for Web App for Containers...so I lost the simple ability to deploy from BitBucket.
A. The App Service team responded: We are declining this request since we actually discourage customers to deploy this way and recommend deployment with Container Push. That being said, there is nothing stopping you from configuring this through CLI.
To do this from the CLI, you could use this command:
az webapp deployment source config -n appname -g resourcegroupname --repo-url <gitrepo url> --branch <branch>
See Manage Web App for Containers using Azure CLI for more details.
I have created Azure Web App which OS is Docker and reproduced your issue.
From the screenshot , we can find the issue may caused by App Service Plan. I have tried to use all tiers of plan, including Isolated, but the issue is still existing. Also, for regular web app, not have the issue.
I find some updates on Azure App Service. I am not sure if the issue was caused by the updates, I recommend you to contact App Service Support Team for help.
The customer support team resolved the problem and cited "platform issue" as the cause of the problem. Now deployment options for container web apps is enabled and working again.

Resources