Last active
August 29, 2015 14:11
-
-
Save mlapida/d3358e84b501bb754b96 to your computer and use it in GitHub Desktop.
Azure + Chef VM Creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-AzureVMConfig -ImageName $image.ImageName -Name $VMName -InstanceSize Small -AvailabilitySetName $serviceName | | |
#Add VM to a domain | |
Add-AzureProvisioningConfig -EnableWinRMHttp -AdminUsername $VMUserName -Password $VMPassword -WindowsDomain -DomainUsername $DomainUserName -DomainPassword $DomainPassword -Domain $domain -JoinDomain $domain | | |
#Add a load balanced endpoint | |
Add-AzureEndpoint -Name "HTTP" -Protocol tcp -LocalPort "80" -LBSetName "HTTPforChef" -PublicPort "80" -DefaultProbe | | |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 1023 -DiskLabel "Data" -LUN 0 | | |
Set-AzureSubnet -SubnetNames "Subnet-1" | | |
#Install the Chef extension | |
Set-AzureVMChefExtension -ValidationPem $chefpem -Windows -ClientRb $chefclient -RunList $runlist | | |
New-AzureVM -ServiceName $serviceName -VNetName $vnetName -Location "South Central US" -WaitForBoot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment