Total Pageviews

Friday, December 31, 2021

Azure Pricing

 

  • Azure offers pay-as-you-go and reserved instances for pricing.
  • Azure Pricing Factors:
    • Resource size and resource type.
    • Different Azure locations have different prices for services.
    • The bandwidth of your services.
    • Any data transfer between two different billing zones is charged.
      • Ingress (data in) = free
      • Egress (data out) = charged based on data going out of Azure datacenters
  • Factors that can reduce costs:
    • By purchasing a reserved instance (one-year or three-year terms), you can significantly reduce costs up to 72 percent compared to pay-as-you-go pricing.
    • reserved capacity is a commitment for a period of one or three years for SQL Database and SQL Managed Instance.
    • Hybrid Benefit allows you to use your on-premises Software Assurance-enabled Windows Server and SQL Server licenses on Azure.
    • If you purchase an unused compute capacity, you can get deep discounts up to 90 percent compared to pay-as-you-go pricing. A spot virtual machine is for workloads that can tolerate interruptions.
  • All resources belong to a subscription.
    • An Azure account can have multiple subscriptions.
    • Organize your resources and subscriptions using Azure management groups.
  • Azure Cost Management gives you a detailed view of current and projected costs.
  • For new accounts, the Azure Free Tier is available.
      • Free Tier offers limited usage of Azure products at no charge for 12 months.
      • You also get $200 credit that you can spend during the first 30 days.
      • More details at https://azure.microsoft.com/en-us/free/
    • Estimate your expected monthly costs using Azure Pricing Calculator.
  • Total Cost of Ownership (TCO) Calculator
    • Estimate total savings over a period of time by using Azure.
    • Compares costs and savings against on-premises and co-location environments.
  • Azure Support Plans:
    • Basic – included for all Azure customers.
    • Developer – recommended for non-production environments. Limited access to technical support during business hours by email only.
    • Standard – appropriate for production workload environments. Has 24/7 access to Azure’s technical support engineers by phone or email.
    • Professional Direct – suitable for business-critical workloads. Has 24/7 access to Azure’s technical support engineers by phone or email. Provides access to Operations Support, ProDirect delivery managers, and Support APIs.
  • Service Level Agreement (SLA)

    • It is the commitment of Microsoft for the uptime and connectivity of a service.
    • You could obtain a service credit if the service level agreement is not met by Microsoft.
    • Composite SLAs include several resources (with different availability levels) to support an application.
    • SLAs for multi-region deployments distribute the application in more than one region for high availability and use Azure Traffic Manager for failover if one region fails.

    Service Lifecycle

    • Private Preview is only available to a few customers for early access to new technologies and features.
    • Public Preview makes the service in the public phase and can be used by any customers to evaluate the new features but SLA does not apply.
    • General Availability is the release of service to the general public and is fully supported by SLAs.
    • Azure updates allow you to get the latest updates on any Azure products and features.

Wednesday, September 15, 2021

Azure cmdlets required for day today work


# Force policies to start , will take around 15minutes 

Start-AzPolicyComplianceScan -ResourceGroupName "cloud*"


#Delete az resources

Get-AzResourceGroup -Name 'Ne*' | Remove-AzResourceGroup -Force -AsJob


#Policy Related

Get-AzPolicyDefinition | Where-Object { $_.Properties.DisplayName -eq "Allowed virtual machine size SKUs" }

New-AzPolicyAssignment -Name "VMCheckingRule" -DisplayName "Checking the Rule" -Scope $rg1.Resourceid -PolicyDefinition $def


#Create new resources Group

New-AzResourceGroup -Name "MyNewRG" -Location "East US"

Get-AzResourceGroup -Name "MyNewRG"


#Check PS Version

Get-Host | Select-Object Version


#Conncet local machine to AZ portal

Install-Module -Name Az -AllowClobber -Repository PSGallery -Force

Connect-AzAccount


#new Resource group

New-AzResourceGroup -Name "NewTest" -Location "East US"


#Create Vertual Machine

New-AzVM -ResourceGroupName "NewTest" -Name "MyVM1" -Location "East US" -VirtualNetworkName "VMnet1" -SubnetName "sub1" -SecurityGroupName "NewSG" -PublicIPAddressName "myIpaddress" -OpenPorts "3389"


#Stop the VM

Stop-AzVM -ResourceGroupName "NewTest" -Name "MyVM1"


#Start the VM

Start-AzVM -ResourceGroupName "NewTest" -Name "MyVM1"


#Install Web-Server & display Hellow world

powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername


#Crete New Z: disk on VM

New-StoragePool -FriendlyName storagepool1 -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $true)

New-VirtualDisk -StoragePoolFriendlyName storagepool1 -FriendlyName virtualdisk1 -Size 2046GB -ResiliencySettingName Simple -ProvisioningType Fixed

Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName virtualdisk1)

New-Partition -DiskNumber 4 -UseMaximumSize -DriveLetter Z


#GetVM Public ip adress

(Get-AzPublicIpAddress -ResourceGroupName $rgName -Name $lbpipName).IpAddress


#Create a managed image of a generalized VM in Azure

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource#code-try-1


#Get azure avaialable image list

az vm image list --output table


#redeploy a VM

Set-AzureRmVm -Redeploy -ResourceGroupName NewTest -Name MyVM1 




Azure Pricing

  Azure offers pay-as-you-go and reserved instances for pricing. Azure Pricing Factors: Resource size and resource type. Different Azure loc...