New to Chef and Puppet ? Overview of Chef and Puppet and how they can automate infrastructure and application deployment on Azure. Existing Chef/Puppet Users? Learn about extending Chef & Puppet to Azure. Other automated VM customization options? Learn about VM customization using standard scripts.
Mastering Chef/Puppet DSL. Writing cookbooks/modules. Azure IaaS components. DevOps workflows and tooling.
Provision/ Manage Infrastructure Bootstrap Agents Customize VM
Author the scripts Upload them to Azure Storage or GitHub Deploy them to a remote VM – New or running Workflow Scripting Languages Supported: Linux : Ruby, Python,, Bash, perl Windows : PowerShell, DSC CLI Supported: Azure CLI or Azure Powershell
Managing Azure VMs using Knife Bootstrapping chef agent using Chef Extension Leveraging DSC resources using Chef
Chef Server Account: Sign up for Hosted Chef account : Setting up Chef Workstation: Download the starter kit from Chef server. Setup the workstation by downloading the chef-client : Install knife azure : gem install knife-azure The workstation is now ready to manage VMs in Azure!
Create a VM : Download publish settings file from here : Knife azure image list --azure-publish-settings-file '/path/to/your/cert.publishsettingsfile' knife azure server create --azure-publish-settings-file '/path/to/your/cert.publishsettingsfile' --azure-dns-name 'myservice' --azure-source-image 'windows-image-name' --ssh-user ‘testuser' --ssh-password ‘azuredemo' --azure-service-location "West US"
Azure Powershell : Set-AzureVMChefExtension-VM -ValidationPem - ClientRb -RunList Knife Command: knife azure server create --azure-dns-name 'knifetest2' --bootstrap-protocol 'cloud- api‘ --azure-source-image '3422a428aaf cbb90d3__DreamFactory_ _-_Ubuntu_14.04' -- azure-service-location 'West US' --ssh-user 'kundanap' --ssh-password 'Azuredemo4'
Admins who manage a mix of both windows and linux deployments can leverage DSC using Chef. Preview of DSC cookbook which exposes DSC resources as Chef resources is available : All the DSC resources returned by get-dscresource can be managed by Chef using the cookbook. Simple rules for transforming DSC resource into Chef resource published here :
Provisioning using Puppet Azure module Bootstrapping puppet agent using Puppet Extension Leveraging DSC resources using Puppet
Puppet Commands for Azure VM provisioning puppet module install msopentech-microsoftazure puppet azure_vm create \ #> --management-certificate pem-or-pfx-file-path \ --azure-subscription-id=your-subscription-id \ --image b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_04-amd64- server en-us-30GB \ --location 'west us' \ --vm-name vmname \ --vm-user username \ --password ComplexPassword \ --puppet-master-ip yourPuppetMasterIPAddress