RESOURCE MANAGER DAĞITIM MODELİ İLE AZURE ÜZERİNDE SHAREPOINT 2016 OLUŞTURMAK

Aşağıdaki AzurePowerShell 1.0 komut satırını kullanarak yeni bir Resource Manager tabanlı sanal makine imajı oluşturabilirsiniz.

  • SharePoint VM adı “SP2016Onder”
  • AZDatacenter sanal ap içerisinde FrontEnd subnet
  • Daha önceden oluşturulmuş SPFarm resource group ve SP_WFE_AS availability set

# Daha önceden oluşturulmuş resource group ve storage account için değerler girin

$rgName=”SPFarm”

$locName=”West US”

$saName=”contosospfarmserverssa”

# Sanal ağ ve subnet index girin

$vnetName=”AZDatacenter”

$subnetIndex=0

$vnet=Get-AzureRMVirtualNetwork
-Name $vnetName -ResourceGroupName $rgName

# NIC oluşturun

$nicName=”SP2016onder-NIC”

$dnsName=”onder-vm-sp2016onder”

$pip=New-AzureRMPublicIpAddress
-Name $nicName -ResourceGroupName $rgName -DomainNameLabel $dnsName -Location $locName -AllocationMethod
Dynamic

$nic=New-AzureRMNetworkInterface
-Name $nicName -ResourceGroupName $rgName -Location $locName -SubnetId $vnet.Subnets[$subnetIndex].Id
-PublicIpAddressId $pip.Id

# Varolan availability set, isim ve boyut belirleyin

$vmName=”SP2016onder”

$vmSize=”Standard_A6″

$avName=”SP_WFE_AS”

$avSet=Get-AzureRMAvailabilitySet
–Name $avName –ResourceGroupName $rgName

$vm=New-AzureRMVMConfig
-VMName $vmName -VMSize $vmSize -AvailabilitySetId $avset.Id

# Imaj, local administrator hesabı ve yeni bir NIC ekleyin

$pubName=”MicrosoftSharePoint”

$offerName=”MicrosoftSharePointServer”

$skuName=”2016″

$cred=Get-Credential
-Message
“Local admin hesabının adını ve parolasını girin.”

$vm=Set-AzureRMVMOperatingSystem
VM $vm -Windows
-ComputerName $vmName -Credential $cred -ProvisionVMAgent
-EnableAutoUpdate

$vm=Set-AzureRMVMSourceImage
VM $vm -PublisherName $pubName -Offer $offerName -Skus $skuName -Version
“latest”

$vm=Add-AzureRMVMNetworkInterface
VM $vm -Id $nic.Id

# OS Diski belirleyin ve VM’i oluşturun

$diskName=”OSDisk”

$storageAcc=Get-AzureRMStorageAccount
-ResourceGroupName $rgName -Name $saName

$osDiskUri=$storageAcc.PrimaryEndpoints.Blob.ToString()
+
“vhds/”
+ $vmName + $diskName +
“.vhd”

$vm=Set-AzureRMVMOSDisk
VM $vm -Name $diskName -VhdUri $osDiskUri -CreateOption fromImage

New-AzureRMVM
-ResourceGroupName $rgName -Location $locName VM $vm

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.