Azure Cloud


Microsoft Azure, often referred to as Azure, is a cloud computing platform operated by Microsoft that provides access, management, and development of applications and services via globally-distributed data centers.
At its core, Azure is a public cloud computing platform—with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual computing, storage, networking, and much more.
IaaS Service -> Virtual Machine , Vnets , Storage
PaaS Service -> Web Apps and Azure SQL
Azure CLoud Types -
Azure supports three approaches to deploying cloud resources -
public
private
hybrid cloud

Azure Resource Manager


Azure Resource Manager enables you to repeatedly deploy your app and your resources in a consistent state. It provides a management layer that enables you to create, update, and delete resources in your Azure account.
With ARM tool we can perform following task in Azure -
Deploy app resources
Azure Resource Manager enables you to repeatedly deploy your app and have confidence your resources are deployed in a consistent state. You define the infrastructure and dependencies for your app in a single declarative template.
Organize resources
ARM is the default portal for Azure cloud services management.
Azure Resource Manager makes it easy for you to manage and visualize resources in your app. You no longer have to deploy parts of your app separately and then manually stitch them together. You put resources with a common lifecycle into a resource group that can be deployed or deleted in a single action.
Control access to resources
With Azure Resource Manager, you can control who in your organization can perform actions on the resources. You manage permissions by defining roles and adding users or groups to the roles. For critical resources, you can apply an explicit lock that prevents users from deleting or modifying the resource. Azure Resource Manager logs all user actions so you can audit those actions.

Azure Resources


They are the instances of azure services like - VM,app service .If suppose there is a developer who wants access to Azure sevices, than he may require VM , app service[PaaS] to deploy apps etc.So, all these resources will be grouped together in a resource group .Hence, these azure resources combines together to form a resource group.
Resources are created in Azure through -
Azure portal
Powershell
Azure CLI
REST APIs
Azure SDKs

App Insights


App Insights -> It's an application performance management service for web apps that allows monitoring of our website performance in Azure.you’re sending the information about your website to Azure, the website or application itself doesn’t have to be hosted in Azure. For those who work on the dev ops processes, it will help you ensure that you are enabling continuous improvement on your web application . How Application Insights works is you insert a small package to your application and set up the Application Insights resource within Azure, thus sending the data to Azure to collect information. The web app is monitored, and it sends telemetry data to the Insight portal. Information that r tracked or collect by this r ->
* response times and failure rates to find out if there’s an external service that’s causing performance issues on your app.
* What are the most popular webpages in your application, at what time of day and where is that traffic coming from.

Azure Vnets and NSG


Once we create a virtual machine , we will need to place it in a virtual network to receive IP address configuartion and to connect to other virtual machines and resources.
Multiple NICs in VM :
We can connect multiple NICs to each of our VMs.Multiple NICs are used for many network virtual appliances as it provides high network traffic management capabilities including isolation of traffic between frontend and backend NICs.

Multiple NICs limitations -
Once deployed ,a VM with single NIC can't be configured with multiple NIC.
Network Security Groups -VMs can have connectivity to internet once they are connected to internet and public IP address is assigned to them or to the cloud service. Under such scenarios , NSG provides advance network security., protection for VMs.It allows or deny the traffic to either the network interface or a subnet.

Azure Web Apps


Azure Web Apps -> is a platform to host websites.It is a PaaS.
Azure Web Apps is a cloud computing based platform for hosting websites, created and operated by Microsoft. It is a platform as a service which allows publishing Web apps running on multiple frameworks and written in different programming languages,

Azure App Service


Azure App Service -> is a platform for building web application. It is a http based service enables to build & host web apps ,restful Apis.It is a PaaS.
A Web App is a web application that is hosted in an App Service. The App Service is the managed service in Azure that enables you to deploy a web application and make it available to your customers on the Internet in a very short amount of time.
Application deployment using app service is much easier than AKS.It supports multiple programming languages and also containers. Types of Azure App service -
Web Apps.
API Apps.
Logic Apps.
Function Apps
Mobile Apps
Web Apps enables us to host our web application without worrying about the infrastructure plumbing that is required. In a traditional hosting mechanism, we need to make sure the Server is up, OS is updated .
API apps are offering of App Service that helps to host Web APIs. This enables us to expose existing or new APIs. This is also a part of the platform as a service and we don’t need to worry about infrastructure plumbing to bring our APIs up and running.
Logic apps enables us to create functional workflows by orchestrating software as a service component. we can build a logic app that triggers on an event of a new file uploaded on a blob storage and performs an action of sending a notification to a user. In many complex solutions, logic apps act as a communication channel for various services in microservice architecture.
Azure Functions are event-driven components that eliminate the need for a server to host a piece of logical code and process. Basically, Azure functions are used to intercept events occurring in any Azure service or third-party service or on-prem system as well. An Azure function can run any executable. Azure Functions are also referred to as Server less. It's not that Azure functions do not run on servers. They do. They run on Azure service fabric. But We do not need to manage the server. Azure functions consume the memory only when it Mobile Apps enable us to build a backend for Mobile applications. It can provide capabilities to mobile client applications. This can be considered to be the same as a web service to support mobile client scenarios. The client can be Windows Universal apps, IOS apps, windows apps etc. They use Mobile app SDK to connect with the backendruns and scales automatically by making the replica of instances.

Azure Active Directory


Azure Active Directory called as IaaS(Identity as a service) If we want to join our device to Azure AD infrastructure than ,
type connect on windows -> work or school -> join this device to Azure AD -> connect -> than restart the machine .
Microsoft Intune ( use to join our device to microsoft in tune) can than be use for the managability of joined local device to azure AD.
Azure AD is a cloud based identity and access management service which helps your employees signin and access resources.
Azure AD Join -Allows to join devices directly to Azure AD without need to join to on-premise AD.
Azure AD authentication with share point ->
SharePoint is a web-based collaborative platform that integrates natively with Microsoft Office. Launched in 2001, SharePoint is primarily sold as a document management and storage system. Organizations use Microsoft SharePoint to create websites. You can use it as a secure place to store, organize, share, and access information from any device .
SharePoint is an individual platform that allows you to manage and share your files with members of your company, and create an internal intranet.
To configure the federation in Azure AD
Sign in to the Azure portal.
Browse to Azure Active Directory > Enterprise applications, and then select All applications.
To add a new application, select New application at the top of the dialog box.
In the search box, enter SharePoint on-premises. Select SharePoint on-premises from the result pane.

Azure AD Connect

Azure AD Connect is an on-premises Microsoft application that's designed to meet and accomplish your hybrid identity goals.
Azure AD connect :- It is used to create a hybrid infrastructure between our on-premise network & the azure AD.So, this module of Azure AD will create a federation between our on-premise n/w & cloud .Therefore ,it can be use when we r planning to migrate our on- premise network to azure cloud. And also if suppose we want to gave co-existence between microsoft 365 and our on-premise mails or share point than also their federation can be achieved using Azure AD connect.
You can find the download for Azure AD Connect on Microsoft Download Center.
Azure AD Connect Benefits :
Users use the same passwords to sign into both on-premises and cloud-based applications.
On-premises passwords are never stored in the cloud in any form.Hence , ensure password security.
Protects your user accounts by working seamlessly with Azure AD Conditional Access policies, including Multi-Factor Authentication (MFA), blocking legacy authentication and by filtering out brute force password attacks.
The communication between an agent and Azure AD is secured using certificate-based authentication. These certificates are automatically renewed every few months by Azure AD.

Azure Portal


It is an interface through which we connect to ARM[Azure Resource Manager] to access the desired service or resources.

Azure Logic Apps


Azure Logic Apps is a cloud platform where you can create and run automated workflows with little to no code.It provides hundreds of ready-to-use connectors, ranging from SQL Server or SAP to Azure Cognitive Services. Azure Logic Apps is a leading integration platform as a service (iPaaS) built on a containerized runtime. Deploy and run Logic Apps anywhere to increase scale and portability while automating business-critical workflows anywhere.
Deploy and run Logic Apps anywhere to increase scale and portability while automating business-critical workflows anywhere.

Azure Bot Services


It is a PaaS. It does natural language processing ,FAQ Queries [Suppose we are on a website where we see a tabicon for chat or help and we raise our query by going inside that icon and we got some instant response based on our query] using ML algorithm.

App Preview Modes


There are 3 modes from Azure cloud to avail the app service to users -
1.Private Preview -Here services comes for testing.In this mode,their is no timeline that when the service will be general available for everyone.Here app or service is available to limited number of customers for evaluation.
2.Public Preview - It is the Beta version available to all the users.Uses in-production environment.Available to all the customers for evaluation.
3.General Availability -Available to all the azure customers.

Azure Function


It is use to create alerts or triggers.eg... We programmed our system in a way that VM will only run when this specific functionality will performed.So, we will only be charged when VM runs.We don't have to pay for the VM entire time.Hence, this saves a lot of money.
Azure Function also known as function apps is similar to app service but in app service we create full fleged web service or app but if we want to run a small piece of code(eg... a function to add 2 numbers a and b) so, to run small piece of code as a small web service we again ask developers to prepare a small package and deploy this to function app similar to app service.They are serverless.Hence, there are no traffic and no pricing .So,we pay for what we use.
Serverless functionality means we don't need to think about the underlying hardware or application we just need to worry about our code.

Azure Database for MySQL


In earlier days,when we want to use MySQL ,we need to download the whole software ,all the supportable connectors and jars ,we need to configure the machine and connect to the database.And to connect our app to the database we need to upload the files and put queries on them.So, here we have to worry about the whole configuration - downloading ,upgradation of DB.
But when we use ,Azure DB for MYSQL,we don't need to go with all these steps.Everything is made available to us readymade with updated version.We just have to utilise those services for our needs.Similarly,Azure also offers us Azure Database for postgreSQL.So, these are community version present in Azure ie...Data community edition.

SQL Managed Instances - Azure SQL DB is used to create the database but it is used when we want to migrate the existing database to cloud SQL.

CDN Vs Load Balancer


They both are utilsed to allow for a smooth flow of data between end users and servers. They both does the same role of distribution of data but are 2 different things.They are like an aeroplane and helicopter both can fly but are different machines.
Task of Load Balancer is to re-direct traffic across multiple servers to ensure that no server is left overloaded.Hence,it's job is to balance the load across multiple devices.

CDN on the other hand reduces the actual distance between the user and the server.It allows distribution of the data to multiple nodes ie...server from where user can pick up the data in much less time.

Hence ,With CDN,we can distribute data to multiple servers across different areas allowing users to more easily access data without too much delay.With load-balancer , we distribute traffic across servers to ensure resources are used as efficiently as possible.

Ways to deploy app in Azure Platform


Azure Service Fabric -> When you deploy your application in Azure Service Fabric, it becomes automatically load-balanced.Azure Service Fabric is used to run a microservices architecture.You can run any executable in Service Fabric.
Virtual Machines
Containers ( Web Apps for Containers allows you to use Linux-based containers to deploy your application into an Azure App Services Web App ).
Azure App Services -> app created using this can be published in google platform, aws,and can even published to an on-premise machine.
There are several App Service types:
Web Apps for hosting your web application or API in;
Mobile Apps for hosting a backend for your mobile applications in Function Apps that run one or more Azure Functions. Azure Functions are small pieces of code that scale automatically and can be triggered by outside services
Logic Apps ______________
Azure app Service & azure service Fabric Don’t worry about OS but vm & container does.
_________________________

Ways to run container in Azure


You can run containers in Azure in -
Azure Container Service
Azure Container Instances
Azure Service Fabric
Web App for Containers

Azure Container Instances


Azure Container Instances (ACI) offers an easy way to run containers in the Azure cloud, eliminating the need to manage virtual machines (VMs) .While ACI does not require the use of Kubernetes.
The main benefit of ACI is run containers without managing servers.
Run Docker containers on-demand in a managed, serverless Azure environment. Azure Container Instances is a solution for any scenario that can operate in isolated containers, without orchestration. Run event-driven applications, quickly deploy from your container development pipelines, and run data processing and build jobs.

Azure Networking Services


1.Virtual Network - It is an emulation of physical networking infrastucture in the cloud and is designed to allow customers for isolation,segmentation of their network, to enable communication,filtering,routing between azure and on-premise resources.These virtual network are scoped to a single region for multi-region architecture.We require multiple virtual nwtworks which can be connected to each other using either Vnet peering or VPN Gateway to allow cross Vnet communication and when it comes to segmentation,we can achieve this by using subnets. This subnet allow customers to divide virtual networks so that they can better and more effectively manage their IP address allocation and subnets also manage netowork filtering via network security groups[NSGs] or application security groups.
Network Security Groups - Suppose we have 2 VM inside a virtual network under 2 different subnets if we want to control the traffic that comes from internet to that virtual machine,we can place a NSG on that subnet and those security groups will allow only specific traffic to reach that VM.
2.VPN Gateway -It allows Azure Virtual Network to connect to out on-premise network so we can enable our virtual network to talk to the netowork within our on-premise environment.This communication is done over public internet but is entirely encrypted.These VPN Gateways can also be used to connect virtual networks to each other.
3.Azure Load Balancer -It allows distribution of traffic across multiple resoureces. If we have 2 VMs , we can create a load balancer infront and evenly distribute the traffic across those VMs. It can be useful in the case if 1 VM stops working traffic can be diverted to 2nd VM.In short, it allows even traffic distribution.
When we create web app, we need to ensure that we get 100% uptime for the application we are accessing through web servers.This can't be achieved by single web server because if a web server is down for maintenance or for any other reason than the end users will have difficulties accessing the application.So, organisation would create several web servers and put them behind a load balancer.The load labancer absorb the traffic and evenly distribute traffic originating from various regions to web servers hosted in data centers.
4.Content Delivery Network -CDN provides a distributed network of services.It helps customers to build their app.An app consist of multiple resources.If we put our application in the app service and host that app service in one of the azure region suppose US.And if users from multiple different location request for this application resource.The request is to process through much larger-2 distance which will also increase the latency.Hence,delay in service processing.So, putting all this app content into CDN will allow service to get distributed all around the world.So,that users can connect to the closest location to access that content. which will reduce the latency.Hance,Azure CDN allows delivery of web content to users to minimize latency.
It distributes and caches the content across multiple locations around the world to minimize our frontend services load and also reduce latency require to deliver content to users.

Azure DevOps


Azure DevOps Server is a Microsoft product that provides version control, reporting, requirements management, project management, automated builds, testing and release management capabilities. It covers the entire application lifecycle and enables DevOps capabilities.
Azure DevOps supports a collaborative culture and set of processes that bring together developers, project managers, and contributors to develop software. It allows organizations to create and improve products at a faster pace than they can with traditional software development approaches.
Azure DevOps is a platform which is made up of a few different products, such as:

Azure Test Plans
Azure Boards
Azure Repos
Azure Pipeline
Azure Artifacts
Azure DevOps is everything that needs to turn an idea into a working piece software. You can plan a project with azure tools.
The azure pipeline is the CI component of azure DevOps. The azure pipeline is Microsoft's cloud-native continuous integration server, which allows teams to continuously build, test, and deploy all from the cloud. An azure pipeline can connect to any number of source code repositories such as Azure Repos, GitHub, Tests, to grab code and artifacts for application delivery.

Azure Cosmos Db


Azure Cosmos DB is a fully managed platform-as-a-service (PaaS),is a nosql json db with multiple api support.Partitioning is done to maintain scalability. It is done to avoid any bottleneck on storage or throughout. To scale out the huge amount of data in some outside machine instead of scaling up the number of disk in the same machine incase of running out of storage scenario.We can have numerous logical partition under a given physical partition.
Partition key decides how to partition the data logically under a given physical partition. How the data is partitioning in physical partition is the work of cloud providers.
Under sql api flow is Create database(created using data exploral) –>create container (pass partition key eg..id as /id) {collection will be seeing inside container with triggers, udfs,stored procedure} ->collection->documents(json format)
______________
Container can be a collection, graph or table.Collection incase of sql api.
_________________________
Data Migration Tool
It is an open source cosmos db migration tool use to import documents in the form of Json documents inside a sql api database from different sources.
It requires a connections string to be added &for that connection string we need to have cosmos db account created in the azure environment.(portal.azure.com)
__________________________
You can virtually have an unlimited provisioned throughput (RU/s) /-Request unit per sec /and storage on a container.
A physical partition can uphold a max of 10000 RU/sec & 50 GB of data. Azure Cosmos DB transparently partitions your container using the logical partition key that you specify in order to elastically scale your provisioned throughput and storage.After you create an account under your Azure subscription, you can manage the data in your account by creating databases, containers, and items.
_______________
Azure cosmos db is schema free it provides automatic indexing of JSON document without requiring any explicit schema or creation of secondary indexes.
_______________________________________
Cross Partition Query ->
If doesn't filter data based on any particular partition key .it must fan-out to all physical partitions where it is run against each partition's index.
Each physical partition has its own index. Therefore, when you run a cross-partition query on a container, you are effectively running one query per physical partition. It uses indexes but still it is not as efficient as in-partition query is.
Making cross partition query is not benefited in the case of large size of container as it'll charge with more number of RUs.
________________________________________
Cosmos Db indexing policy
In Azure Cosmos DB, every container has an indexing policy that dictates how the container's items should be indexed.we can override this automatic behavior to better suit your requirements. You can customize a container's indexing policy by setting its indexing mode, and include or exclude property paths.
Indexing Mode -
Consistent: The index is updated synchronously as you create, update or delete items
None: is disabled on the container. This is commonly used when a container is used as a pure key-value store without the need for secondary indexes.
Cosmos DB supports 3 kinds of indexes:
Range Indexes.(Default index type )
Spatial Indexes.
Composite Indexes.( SELECT * FROM Customer c WHERE c.customerType = "Business" ORDER BY c.customerType, c.customerValue DESC. , SELECT * FROM c ORDER BY c.customerType, c.customerValue DESC , SELECT * FROM c WHERE c.customerValue > '10000' AND c.customerType = "Business" )
_______________________________
Azure Synapse Link
Azure Synapse Link for Azure Cosmos DB enables near real time analytics over operational data in Azure Cosmos DB. Azure Synapse Link creates a tight seamless integration between Azure Cosmos DB and Azure Synapse Analytics.
You can run analytics with low latency in an Azure region by connecting your Azure Cosmos DB container to Synapse runtime in that region.It can be used in scenarios like - A Data Engineer, who wants to make data accessible for consumers, by creating SQL or Spark tables over Azure Cosmos DB containers, without manual ETL processes.
Synapse link also make sure that critical business data is stored securely.
________________________
Cosmos doesn't support use of distinct inside count ()

Deploy war file in Azure app service.


We can deploy your WAR, JAR, or EAR package to App Service to run your Java web app using the Azure CLI, PowerShell, or the Kudu publish API. The deployment process places the package on the shared file drive correctly .
Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile backends. You can develop in your favourite language, be it .NET, .NET Core, Java, Ruby, Node.js, PHP, or Python.
Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications. ( The single spring-boot-starter-web dependency transitively pulls in all dependencies related to web development).
GitHub Actions helps you automate your software development workflows from within GitHub. To automate means automated process that you set up in your GitHub repository. You can build, test, package, release, or deploy any project on GitHub with a workflow.ie... it automate the build pipeline.
Change the packaging of the application from jar to war in pom.xml .
Add the tomcat dependency - spring-boot-starter-tomcat
Finally, we'll initialize the Servlet context required by Tomcat by implementing the SpringBootServletInitializer interface by the main spring boot class.
Upload to GitHub
Sign-in to Azure portal & create resource group by clicking the "Review + create " button.
Find "App Services" -> Then, create a "Web App"-> Then click on the "Deployment" button .
Enable GitHub Actions to continuously deploy your app and then enter GitHub account information.
click on the "Review + create" button.
Once deployment is completed you can see "Your deployment is complete".
Now Go to resource which will navigate to app service overview page .Copy the public URL which is marked on the above image and use postman to test the service.

Azure as IaaS


Allows user to access,manage the data centers.Giving complete control of OS.
The VM can be completely modified to meet business requirement.
Allows quick transition of services to cloud which helps vendors to offer services to their clients easily.

Azure as PaaS


Client is provided with the platform to develop and deploy softwares without having to think about hardware and infrastructure.
Takes control of OS , servers and networking issues.

Azure as SaaS


Allows users to connect to and use cloud based apps over internet such as Office.365. Office.365 is a SaaS provided by Azure.The services offered by microsoft Office 365 subscription are different than that under Azure subscription.We have Azure Active directory in Azure which stores subscribed users' credentials and can linked Azure Active directory user to Microsoft 365 services. So, here by 1 subscription we are leveraging services of both Azure as well as Microsoft 365 with the help of user created.
SaaS customers use the software running on the provides's infrastructure.It is also referred to as software delivered over web.