Tuesday, 27 December 2022

Deploying Database Instances In Azure


In this section, we’ll see the different types of deployment options for our database and then you’ll learn how you can use it to deploy your database.

Azure Resource Manager (ARM) Templates are the simplest way of deploying Infrastructure-as-a-code.

AZ-300 ARM TemplateARM lets you deploy several resources together in a single unit, and the deployments are idempotent in that the user declares the type of resource, what name to use, and which properties it should have.

Create An Azure Kubernetes Service

 

What Is Kubernetes? 

In organizations, multiple numbers of containers running on multiple hosts at a time so it is very hard to manage all the containers together we use Kubernetes. Kubernetes is an open-source platform for managing containerized workloads and services. Kubernetes takes care of scaling and failover for your application running on the container.

Kubernetes_Architecture


Azure Kubernetes Service (AKS)

Modern applications are increasingly built using containers, which are microservices packaged with their dependencies and configurations. Kubernetes is open-source software for deploying and managing those containers at scale. Furthermore, Azure Kubernetes Cluster lets you do just that for the microservices you run on the Azure cloud.

Therefore, in this Activity Guide, we will walk you through the steps to browse through the Azure Portal and how to setup AKS and manage your microservices without hassles on the cloud.

Azure Kubernetes ServiceAzure Kubernetes Service (AKS) is a managed Kubernetes service in which the master node is managed by Azure and end-users manages worker nodes. Users can use AKS to deploy, scale, and manage Docker containers and container-based applications across a cluster of container hosts. As a managed Kubernetes service AKS is free – you only pay for the worker nodes within your clusters, not for the masters. You can create an AKS cluster in the Azure portal, with the Azure CLI, or template-driven deployment options such as Resource Manager templates and Terraform.

Azure Kubernetes Service

Implementing Custom Role-Based Access Control (RBAC)

 Azure role-based access control (RBAC) is an identity and access management (IAM) system for Azure resources. Using Azure RBAC, you can segregate duties within your team and grant only the amount of access to users that they need to perform their jobs.

Therefore, here we will be defining and assigning a custom role-based access control to delegate permissions to start and stop Azure VMs.

How to Implement Azure Functions

 You must have a function app to host the execution of your functions. A function app lets you group functions as a logical unit for easier management, deployment, scaling, and sharing of resources. To sum up, you’ll learn how to create and group functions inside the function app.

Functions of Azure


Developing Solutions for Microsoft Azure :

Planning to emerge as a Microsoft [AZ-204] Certified Developer Associate but Azure Functions is becoming a roadblock? This blog post will provide you a full overview of the Azure Functions service provided by Azure. Azure Function is a serverless compute service that enables users to run event-triggered code without having to provision or manage infrastructure. Too hard to understand? Let’s try to break it down. Firstly, Serverless means that the allocation of your resources will happen based on the need at that time and that too automatically!

In simpler terms, Azure Functions runs an event-triggered code. This means that if a particular event or a set of events occurs, then it will run code. Further, it will manage all the resources dynamically while doing that.

You can also take advantage of over 250 connectors provided by Azure Functions with Azure Logic Apps. Additionally, the data processed by Azure Functions can persist in Azure data services like Azure SQL, Azure Storage, and Document DB.

Azure Functions_Integrations


Triggers

Azure provides an extensive number of Trigger templates for Azure Functions. Here are the names of some trigger templates:

  • HTTPTrigger– A HTTP Trigger makes it possible to execute code by an HTTP request.
  • TimerTrigger- This type of trigger proves to be beneficial if you want to perform a cleanup or other batch tasks as per a predefined schedule.
  • CosmosDBTrigger– It’s this trigger that processes Azure Cosmos DB documents when they are added or updated in the collections of a NoSQL database.
  • BlobTrigger– The trigger is primarily used for processing Azure Storage blobs when they are added to Containers. However, one may also use this function for image resizing.
  • QueueTrigger– This trigger takes care of your messages by responding to them as they arrive in the Azure Storage queue.
  • EventGridTrigger– EventGridTrigger, a trigger that responds to the events delivered to a subscription in Azure Event Grid, supports a subscription-based model for receiving events that comes with filtering—a wonderful solution for building event-based architectures.
  • EventHubTrigger– As the name suggests, the trigger responds to the events that are delivered to an Azure Event Hub. It is useful in scenarios such as user experience or workflow processing, application instrumentation, and internet-of-things (IoT).
  • ServiceBusQueueTrigger– This trigger listens to the message queues. By triggering this function, one can easily bind their code to other Azure Services or on-premise services.
  • ServiceBusTopicTrigger– A handy trigger that allows developers to publish as well as push messages to the topic using the Service Bus Topic Message.


Working Of Azure Functions

Serverless model

Azure Functions lets you can program and execute snippets of code in the Azure Cloud without asking the users to manger containers or web servers. Undoubtedly, servers are present but the users don’t need to put any effort into managing them.

Multiple Language Support

Developers can use a variety of languages like Python, C#, JavaScript, and PHP to implement events in Azure Functions. They can also make use of scripting languages like Bash, PowerShell, and Batch. Furthermore, an option to upload and trigger pre-compiled executables is present for Developers.

Every Function provides an option of seamless local development and Continuous Integration using GitHub, BitBucket, and Visual Studio Team Services.


Lightning-fast data access and processing

Azure Functions have made it easy to trigger code based on the data in other services in addition to accessing and operating on that data. Function bindings have enabled developers to interact with other data services and sources through their Function. Thus, allowing them not to worry about how the data flowing to and fro from a Function.

All thanks to Binding, tasks like fetching a Blob or adding a message to a queue has become as simple as reading a Blob from Function input variable or passing JSON to Function output variable.

Various triggering options

Triggering Azure Functions can be done in many ways such as, such as making changes in messages from Service Bus, HTTP triggers, Azure Storage Blob containers, Azure Queues, etc. As a result of the HTTP support, the Functions are able to react to the events that emit in virtually any SaaS (Software as a service) products supporting WebHooks. They’re easy to set up and need minimal configuration.


Benefits Of Using Azure Functions

Azure being one of the world’s biggest cloud providers gives huge advantages while using its services. One of those services is Azure Functions. Let’s take a look at the benefits of using Azure Functions.

Build Once, Deploy Anywher Azure Functions lets you deploy the same code to multiple targets, from pay-per-execution in the cloud to your Kubernetes cluster or IoT devices for edge computing.

Multi-Lingual Support – Azure Function supports significant languages like Java, C#, F#, Python, and more.

Pay as you go model – Azure provides a pay-as-you-go model which means you need to only pay for what you use. For Azure functions, the cost is based on the Number of Executions per month.

Swift Integration with Azure services – Azure Functions can effectively coordinate with the other Azure Services like Event Grids, Event Hubs, Azure Service Bus, Notification Hubs, etc.

Trigger-based executions – Azure Functions execute on the basis of the already configured triggers. It supports triggers like HTTP Triggers, Queue Trigger, Event Hub Trigger, and more. Since it is a trigger-based service, it runs on demand.

Virtual machine replication via ASR

 As an organization, you need to adopt a business continuity and disaster recovery (BCDR) strategy that keeps your data safe and your apps and workloads online when planned and unplanned outages occur.

Site Recovery helps ensure business continuity by keeping business apps and workloads running during outages. Site Recovery replicates workloads running on physical and virtual machines (VMs) from a primary site to a secondary location.


What is Windows Active Directory?

Active Directory (AD): Active Directory is a database and a set of services connecting users with the network resources required by them to get their work done. The database (or directory) has critical information related to your IT environment, including what users and computers there are and who’s allowed to do what. The services control most of the activity going on in your IT environment so basically, Windows AD provides authentication and authorization to applications, file services, and other resources in a network.

What is Azure Active Directory?

Azure Active Directory (AAD): If we want to manage access to the Azure Cloud application and associated resources then we need Azure AD. This helps your employees to access external resources, such as Azure services, Azure portal, And other applications.

Azure AD is a Microsoft cloud-based identity and access management service, which helps your employees sign in and access resources in:

1) External resources, such as Microsoft Office 365, the Azure portal, and thousands of other SaaS applications.

2) Internal resources, such as apps on your corporate network and intranet, along with any cloud apps developed by your own organization.

Azure AD

 

If we have a traditional on-premise set up with AD and want to integrate it with Azure AD so that we can manage access to the Cloud application, we can do it easily by using AD Connect.

In layman’s terms, the Azure Active Directory is not an extension of an on-premises directory. Rather, it’s a copy that contains the same objects and identities.

How Does Azure Active Directory Work?

Azure AD a cloud-based service for identity and access management that falls into the identity as a service (IDaaS) category, is a secure online authentication store for both individual user profiles and groups of user profiles.

It manages access through user accounts, which have a username and a password. Users can be organized into different groups, which can have different access privileges for individual applications. Identities from Microsoft or third-party software as a service (SaaS) can also be created for cloud applications to grant user access through.

To connect users to SaaS applications, Azure Active Directory uses SSO which allows each user to access the full suite of applications they have permission for, without having to repeatedly log in each time. It creates access tokens (that may be created with expiry dates) that are stored locally on employee devices.

Windows AD vs. Azure AD

Azure Active Directory vs Windows Active Directory
ConceptWindows Active DirectoryAzure Active Directory
Provisioning UsersOrganizations create internal users manually or use an in-house or automated provisioning system, like the Microsoft Identity Manager, to integrate with an HR system.Existing AD organizations use Azure AD Connect to sync identities to the cloud.
It adds support to automatically create users from cloud HR systems and provision identities in SCIM-enabled SaaS apps to automatically provide apps with the necessary details to allow access for users.
Admin Management (AKS)Organizations will use a combination of domains, organizational units, and groups in AD to delegate administrative rights to manage the directory monitored resources.Azure AD provides built-in roles with its Azure AD RBAC system, with limited support for creating custom roles to delegate privileged access to the identity system, the apps, and the resources it controls.
Infrastructure AppsActive Directory forms the basis for many infrastructure on-premises components, like DNS, DHCP, IPSec, WiFi, NPS, and VPN accessIn a new cloud world, Azure AD is the new control plane for accessing apps and relying on networking controls. When users authenticate, Conditional access (CA) controls which users have access to which apps under required conditions.
Traditional and legacy appsMost on-premises apps use LDAP, Windows-Integrated Authentication (NTLM and Kerberos), or Header-based authentication to control access to usersAzure AD can provide access to these types of on-premises apps using Azure AD application proxy agents running on-premises. With this method, Azure AD can authenticate Active Directory users on-premises using Kerberos while you migrate or need to coexist with legacy apps.
MobileActive Directory doesn’t natively support mobile devices without third-party solutions.Microsoft Intune (mobile device management solution) is integrated with Azure AD. It provides device state information to the identity system to evaluate during authentication.
Windows desktopsActive Directory provides the ability to domain join Windows devices to manage them using Group Policy, System Center Configuration Manager, or other third-party solutions.Windows devices can be joined to Azure AD. Conditional access can check if a device is Azure AD joined as part of the authentication process. Windows devices can also be managed with Microsoft Intune wherein conditional access will consider whether a device is compliant (up-to-date security patches and virus signatures) before allowing access to the apps.

Azure AD Concepts

1) Identity: Anything that can be authenticated. It can be a user with a username & password, applications, or other services that require authentication.

2) Account: Identity with data associated.

3) Azure AD Account: Identity created using Azure AD or other Microsoft cloud services.

4) Azure Tenant: An Instance of Azure AD is created when an organization signs up for a Microsoft Cloud service subscription.

5) Azure AD Directory: Each Azure Tenant has a dedicated and trusted Azure AD Directory.

6) User Subscription: To pay for Azure cloud services used.


Benefits Of Azure Active Directory

  1. Azure AD is highly available and spread across 32 datacentres in different geographies.
  2. Using Azure AD access to applications on cloud or on-premise can be simplified.
  3. Single Sign-On to access thousands of SaaS applications & On-premise applications.
  4. Multi-Factor Authentication, Conditional Access, Privileged Identity Management, and Dynamic Group.


Azure AD Features & Licensing

Azure AD works on licensing model. You can access Azure AD with these two licenses:

  • Microsoft Online Services
  • Azure AD Premium Licenses

If you have Office 365 or Microsoft Azure license, then you will get all the non-paid Azure features, otherwise, you can get Azure premium features through Power BI premium licenses:

  • Premium P1
  • Premium P2 licenses

Features of Azure AD

  • Application Management:  It Manages your cloud and on-premises apps using services like Application Proxy, the My Apps portal, single sign-on, and Software as a Service (SaaS) apps.
  • Authentication: Users can manage Azure AD self-service password reset feature, Multi-Factor Authentication, custom banned password list, and smart lockout.
  • Azure Active Directory for developers: It builds apps that can sign in all the Microsoft identities, and fetch tokens to call Microsoft Graph, and other Microsoft or custom APIs
  • Business-to-Business: You can manage your guest users and external partners while also maintaining control over your own corporate data at the same time.
  • Business-to-Customer (B2C): With Azure AD users can customize and control how others sign up, sign in, and manage their profiles when using their apps.
  • Managed identities for Azure resources: Provide your Azure services with an automatically managed identity in Azure AD that can authenticate any Azure AD-supported authentication service, including Key Vault.
  • Reports and monitoring: Users can gain insights into the security and usage patterns in their working environment.
  • Privileged identity management (PIM):  This feature includes access to resources in Azure AD and Azure, including some other Microsoft Online Services, like Microsoft 365 or Intune. Users can manage, control, and monitor access within their organization.
  • Identity protection: Detect potential vulnerabilities affecting your organization’s identities, configure policies to respond to suspicious actions, and accordingly take appropriate steps to resolve them.
  • Identity governance: Manage your organization’s identity through employee, business partner, vendor, service, and app access controls.
  • Enterprise users: Manage license assignments, app access, and setting up delegates using groups and administrator roles.

Azure AD Connect

It is used to integrate the on-premise directories (Active Directories) with Azure Active Directory which provides a common identity for accessing both cloud and on-premise resources.

There are various features of Azure AD Connect:

1) Password Hash Synchronization:  Sign-in method that synchronizes a hashed user on-premised AD password with Azure AD.

2) Pass-through authentication: Sign-in method that provides access to users to use the same password on-premise and on the cloud.

3) Synchronization: Responsible for creating usersgroups, and other objects and also validate if the identity information of your on-premise users and groups match with the cloud.

4) Health Monitoring: A central place to view the activity and also provide monitoring.

azure ad connect


Azure AD Join

  • Azure AD join is used to connect devices directly to Azure AD and we need not join to the on-premises AD.
  • Azure AD joined devices are signed in for using an organizational Azure AD Account
  • Devices that are Azure AD joined can still authenticate to on-premises servers like file, print, and other applications.

azure ad join


Creating And Managing Users & Groups In Azure AD

There are many ways to add users and groups to Azure Active Direct.

  • By syncing from an on-premises Windows Server AD using AAD Sync. This is how most enterprise customers will get their users added to the directory and requires some additional server configuration on-premises to setup.
  • Manually using the Azure Management Portal.
  • Using PowerShell and the Azure Active Directory cmdlets
  • Programmatically using the Azure AD Graph API. This is an extremely powerful option that essentially gives you full control of how users are added to the directory.

users & groups In Azure AD


Access To Azure Resources

It is a very difficult and important task for any organization to manage access to Azure resources.

  • Role-based access control (RBAC) helps you manage who has access to Azure resources, what they can do with those resources, and what areas they have access to.
  • RBAC is an authorization system built on Azure Resource Manager that provides fine-grained access management of Azure resources.
  • We can segregate duties and the amount of access to the users in a team that they need to perform their tasks using RBAC.
  • It’s a best practice to grant users the least privilege to get their work done.

Access control (RBAC)


Conclusion

Azure AD is not simply a cloud version of AD, they do many different things. AD is great at managing traditional on-premise infrastructure and applications while Azure AD is great at managing user access to cloud applications. You can use both together, or if you want to have an experience of a purely cloud-based environment you can just use Azure AD. And it mostly depends on your need of service that for which you want to go and we have already discussed the difference between their services.

Governance and compliance


As you establish corporate policy and plan your governance strategies, you can use tools and services like Azure Policy, Azure Blueprints, and Azure Security Center to enforce and automate your organization’s governance decisions.

Azure Governance

Create an Azure Bastion host

 This guide will show you how to configure Azure Bastion based on your VM settings, and then connect to your VM through the portal. The VM doesn’t need a public IP address, client software, agent, or a special configuration. Once the service is provisioned, the RDP/SSH experience is available to all of the virtual machines in the same virtual network.

Bastion