Creating and configuring a virtual machine in Microsoft Azure
For the knife azure
plugin to communicate with Azure's REST API, we need to provide information to knife regarding our Azure account and credentials:
Sign in into the Azure portal and download a publish-settings file by visiting https://manage.windowsazure.com/publishsettings/index?client=xplat .
Store it on a Chef workstation on the a local filesystem and refer to this local file by creating an entry in
knife.rb
:knife[:azure_publish_settings_file] = "~/<name>.publishsettings"
Here are the parameters used to create a virtual machine in Microsoft Azure:
Parameter
Value
Description
--azure-
dns-name
distechnodemo
DNS name
--azure-
vm-name
dtserver02
Virtual machine name
--azure-
vm-size
Small
Virtual machine size
-N
DevOpsVMonAzure2
Name of the Chef node
--azure-storage-account
classicstorage9883
Azure storage account
--bootstrap-protocol
cloud-api
Bootstrap protocol
...