|
How to deploy your Web App using Github Actions on Azure App Service
|
|
We will deploy the Web application using Github Actions on Azure App Service. Let us create a sample ASP.NET Core Razor web application and deploy to Azure app service using Github Actions. Also, subsequent code check-ins are going to deploy using Github Actions from Continuous deployment.
|
|
|
|
|
What is Azure Functions Premium plan?
|
|
Once the Azure functions are developed and deployed to azure, then you pay per use pricing model. Azure function has below hosting plans - Dedicated app service plan
- Consumption plan
- Premium plan (called as elastic premium plan)
Azure functions Premium plan is a higher plan compared to other 2 plans. It contains following features - VNET Integration- To add more security to your app, you can configure a VNET and add your function app. With this, your function app is secured with service endpoints. VNET integration is not available in other plans.
- Pre-warmed instances to avoid cold start - In consumption plan, if there are no execution/calls to your function app it scales in to Zero instances. Once it goes to zero instances, if we make any function call, it takes some time(called as cold start time) to respond to the first call (from zero to one). This latency can be avoided in Premium plan with pre-warmed instances.
- Unlimited execution duration - Consumption plan has a 10 minutes limit whereas Premium plan defaults to 30 minutes but you can modify it to unlimited(60 minutes guaranteed). Use functiontTimeout property in host.json file to change the configuration.
- Premium hardware - Provides best cores(1, 2 and 4), memory and storage.
- Multiple function apps can be deployed to the same plan and all function apps in premium plan shares pre-warmed active instances.
- Automatic Scaling - Like consumption plan, your app will scale in or scale out based on the need.
Note: Premium plan is charged based on the number of core seconds, memory used and configured pre-warmed instances.
|
|
|
How do I deploy a function app in Azure?
|
|
Once the Azure functions are developed and there are different ways you can deploy your app to Azure. The different deployment methods are - Tool based deployments - deployments are managed locally. Useful when you are doing local development and requires multiple ad-hoc deployments manually.
- Visual Studio Code publish
- Visual Studio publish
- Core tools deployments (using Zip deploy or docker container)
- App Service Deployment - deployments are managed from the Azure App Service under Deployment section. Useful when you want to deploy as part of source control commits or from a container registry.
- Deployment center - Continuous deployment using Azure Repos, GitHub, Bitbucket and Local Git or Manual deployment using One drive, Dropbox, External Git and FTP.
- Container deployments
- External Pipelines - deployment are managed by pipelines. Useful for Production scenarios where you want to do some additional validations as part CI/CD.
|
|
|
|
|
|
|
|
|
Why to use Azure App Service?
|
|
Azure App Service is a full managed Platform as a Service (PaaS) which enables to build and deploy web applications, Restful API’s, mobile back ends without managing underlying infrastructure with the choice of your programming language like .NET, .NET Core, Java, PHP, Python or Ruby. Application can run and scale on both windows and Linux environments.
Below are few features of Azure App service and based on this you can choose the service.
- Built-in Auto scale support – App service can be configured to scale up/down or scale in/out automatically based on your usage. Scale up/down increase the cores and RAM where as in/out increases or decreases the number of instances that are running your app.
- High Availability – Deploy your apps anywhere in Microsoft global data centers and with the right plan App service provides high availability for your application.
- IDE Integration – you can create, deploy and debug your azure app service application using visual studio, visual studio code, Java IDEs’ like Maven, Eclipse, IntelliJ.
- Continuous Integration and Deployment support – In the Azure portal, App service provides continuous integration and deployment with sources like Azure DevOps, GitHub, Bitbucket, FTP or local Git Repo from your local machine. Connect your application with the sources and App service will automatically synchronize your changes in the future.
- Deployment Slots – when you deploy your web app you can use separate deployment slot(staging) instead of production slot to test your changes with standard tier and above. Deployment slots have its own separate host names and you can swap content and configurations between deployment slots including the production slot. The swap operation warms up necessary worker processes to match your production scale with no downtime.
- Authentication – App service provides built-in authentication and authorization capability so your users can login to the App and access data based on the permissions with minimal changes to your code. You can use third party identity providers Microsoft, Facebook, Google, Twitter and GitHub.
- Multi language and Framework support – you can develop your application or APIs with .NET, PHP, Node.js, Python or Java of your choice even you can write power shell script to run back ground jobs. Easily manage your apps in App service by writing Power shell or Azure CLI scripts.
- Integrate with other services and SaaS Platforms – Easily integrate with other Azure service like API management, Azure SQL, Logic apps (SaaS connectors) and many more. You can access your on-premises data using Hybrid connection or Azure virtual network configuration with app service.
- API and Mobile scenarios - App service provided CORS support for Rest API’s and supports mobile apps scenarios like authentication, push notifications and offline data synchronization.
- Serverless Functions – you can use Azure App Service to run Azure functions with out managing underlying infrastructure. You will pay only for the compute time when your code is executed.
|
|
|
What is Azure API App, features and compare with Web App
|
|
With Azure API App, we can easily build, deploy and consume API on the cloud without managing underlying infrastructure. The key features of API Apps – authentication, CORS and API metadata. Features of Azure API App 1. Faster deployment of scalable Rest API’s 2. Support of Authentication with Azure AD and call Microsoft API’s 3. Consume APIs with CORS support 4. Swagger Support 5. Develop APIs with .NET, PHP, Node.js, Python or Java 6. Easily integrate with other Azure service like API management, Azure SQL, Logic apps and many more 7. Configure CI/CD to deploy your API’s 8. For Pricing refer to Azure App Service plan pricing. 9. Secure Platform that scales automatically 10. Monitor your App, configure alerts and do Auto scaling
Azure Web App vs API App1. Web Apps is a website which you can see in the browser whereas API is a service used in Web App. E.g: ASP.NET MVC application is Web App having UI with data where Web API return only data via end points for integrations to exchange data. 2. Now API APPs and Web Apps under the umbrella of APP Services if there is no difference, only icon difference in Azure Portal. 3. If you want to import API definition in Azure API management, you can do only with API App under App service.
Now, all of web, Mobile and API Apps are collectively coming under Azure App Services.
|
|
|
What is the Azure App Service plan
|
|
The application runs on the App Service Plan (ASP) in Azure App service. The app service plan contains a compute instance to run the web applications. Compute means CPU, Memory, and storage within the VM. This Article will examine Azure App Service plans, comparisons, and features.
|
|
|
|
|