Algemeen Flashcards
(119 cards)
Cmdlet for provisioninig new virtual machine
Via Powershell New-AzVM (NOT create-AzVM)
Via Azure CLI az vm create
Configuring linux machines at first boot after provisioning (f.i. installing packages, writing files, injecting certificates)
Use cloud-init. This only works on Linux VMs, and requires that the VM is created via the Azure CLI with az vm create. Use the – custom-date parameter to provide the cloud-init config file.
Powershell modules
For Powershell use AZ module: Azure Powershell, a collection of powershell modules. The AzureRM module is deprecated.
For other shells use Azure CLI.
Azure Cloud Shell is a hosted Azure shell environment on an Ubuntu container, offering both Azure CLI over bash or Azure Powershell.
Organization of resources
A management group contains many subscriptions or other management groups contains many resource groups. Subs and management groups must trust the same AD tenant.
Each tenant has a root management group, other groups may be nested below this group. Between root and subscription level up to six levels. At each level, groups can contain subscriptions.
Bij default no-one has permissions on the root management group, but global administrators can elevate themselves to User Access Administrator on the root mg and assign other permissions to everyone on everything.
Policy assignments and role assignments cascade down. Allowed resource type policy has the implied effect of denying all non-named resources.
Tags can be assigned to resources, but do not inherit inside resource groups or subscriptions.
Resource groups have an associated location, but can contain resources from all location. Their location only determines where the rg metadata is stored. Moving a resource to a different rg does not change its location.
Conditional access
AD policies applied after first factor authentication. Signals are used as input, which can include user/group, device, IP/location, which application is being accessed, device/platform. Based on the signals rules can be defined that either:
- grant controls: block access, or require specific options, such as: MFA, device being marked as compliant or joined, authentication strength, password change.
- session controls: enabled limited session functionality in the accessed application.
Enabling MFA on Azure AD.
Use MFA configuration page to enable per user.
Basic through security defaults which enabled several policies, such as: for all users of administrators MFA, all users must register for MFA, block legacy authentication, MFA when privileged operations. Included in the free tier.
For more granular controls, use conditional access, which requires a paid Azure AD license.
Upload on-premise vhd to Azure storage account
Add-AzVhd cmdlet
Static IP VM
Set-AzureStaticVNetIP is for legacy
Set-AzNetworkInterface is new
VM availability?
Availability set: logical grouping: allocated so they don’t share same fault domains, within one datacenter. Less latency than availability zones. No extra cost. Configure with platformFaultDomainCount to 1, 2, or 3 (default of 3 if not specified), to choose how many different fault domains, depends on region. Configure with platformUpdateDomainCount up to 20 (default 5), to choose how many update domains. If 1 fault domain, then only one update domain allowed.
To resize with change of physical hardware required, first stop vms in the set.
Availability zones: three per region in supported regions, no extra cost, seperate datacenters. No extra cost.
Network security groups
Layer 4 filtering rules going from 5-tuple to allow/deny. Assigned at the NIC or subnet level.
If multiple nsgs apply, they are processed in order. Both must allow!
Service tags
A service tag represents a group of IP address prefixes from a given Azure service. Microsoft manages the address prefixes encompassed by the service tag and automatically updates the service tag as addresses change, minimizing the complexity of frequent updates to network security rules.
Azure Backup Instant Restore
Snapshot of VM files, retained locally for several days (default 2, configurable). Recovery to any existing VM in the same subscription at file level.
Means less downtime during a restore because no WAN traffic.
Collect and analyze performance metrics and logs in Azure
Azure Monitor, which builds on top of Azure Log Analytics, the platform service that gathers log and metrics data from all your resources. The basic building block is a workspace, which lives in one region.
Azure Monitor is the tool to get the data from the Azure resources, and Log Analytics is the tool to query that data if you want to query over multiple resources.
Insights is a curated list of pre-prepared queries, visualizations, and dashboards.
Azure VM backup, which configs/states supported
Supports backing up the entire VM. Support for VMs that are running or shutdown/offline, Linux distros endorsed bij Azure, all Windows Server since 2008, all personal Windows since Windows 10. Only 64-bit OS-es.
Automated user adding
Powershell:
- New-AzureADUser cmdlet creates native user in the AD
- New-AzureADMSInvitation creates an invitation for an external user
Portal:
- Bulk create for native from csv
- Bulk invite for external from csv, required fields:
Email address to invite - the user who will receive an invitation
Redirection url - the URL to which the invited user is forwarded after accepting the invitation. - Bulk add from csv, required fields:
Name
Upn
Initpasswd
Block Signin
AKS (Azure Kubernetes Services)
Managed Kubernetes cluster. Control plane is created automatically and managed by Azure; no user access. Only pay for the nodes running in the cluster. Each node is a VM, created from image Ubuntu Linux, Azure Linux, or Windows Server 2019. Nodes are grouped in node pools. Nodes run pods that are often 1:1 with containers, but can contain multiple containers.
The cluster is created in a resource group, and creates a node resource group automatically that contains all the node resources, such as VMs, storage and Vnet. This can’t be an existing resource group, name cannot be changed, it must be in the same subscription. Automatically deleted when cluster resource is deleted.
Resources are logically grouped into namespaces, by default there are three: default, kube-system, kube-public. Users can only interact with resources within their assigned namespaces.
Permissions through Kubernetes roles (Kubernetes RBAC), that grant (not deny) permissions. Then assign roles to users through RoleBindings. Users must come from external identity solution, for AKS this is Azure AD. It is also possible to use Azure RBAC.
Azure AD authentication is provided to AKS clusters with OpenID Connect, an identity layer built on top of the OAuth 2.0 protocol. Previously OAuth2 client and server applications had to be configured in the AD tenant, now this is deprecated and managed Azure integration by the cluster is the default, this means creating or updating the cluster with –enable-aad option.
If using Kubnetes Networking then pods receive an IP address from logically different address space to the Azure Virtual Network Subnet and NAT is then used to translate IPs from the PODs to the Azure virtual Network. If using Azure Container Networking Interface (ACNI) then all PODs get IP from the subnet and can be accessed directly.
To support node pools for Windows containers you need to use a network policy that uses Azure CNI, not kubenet. To pull images from ACR you must enable AKS-managed Active Directory.
Office 365 groups
With Microsoft 365 Groups, you can give a group of people access to a collection of shared resources. Unlike regular groups they support automatic deletion after a certain time period.
These groups cannot be members of other groups.
Moving resources to another subscription
Possible for Vnets, Storage accounts, Vms with associated disks, recovery services vaults.
Powershell subscription cmdlets
New/Get/Set/Remove-AzApiManagementSubscription
Accept or reject legal terms for marketplace item programmatically
Set-AzMarketplaceTerms
IT Service Management Connector (ITSMC)
The IT Service Management Connector (ITSMC) allows you to connect Azure and a supported IT Service Management (ITSM) product/service, such as the
Microsoft System Center Service Manager.
Local administrators on Azure joined devices
When you connect a Windows device with Azure AD using an Azure AD join, Azure AD adds the following security principles to the local administrators group on the device:
✑ The Azure AD global administrator role
✑ The Azure AD device administrator role
✑ The user performing the Azure AD join
Configure device administrator role members (also) through the devices blade (requires premium tenant).
Cloud Device Administrator AD role
Can perform certain administrative functions on devices, such as removing, enabling or disabling, but cannot change group membership or any other device properties.
Deleting resource group
Deleting rg deletes all resources contained in it. Running or stopped vms, dbs or storage accounts do not block deletion. Backup recovery vaults that contain data cannot be deleted.