Microsoft Open Technologies, Inc. (MS Open Tech) is pleased to announce that the release of a new Windows Azure Puppet Module that makes it possible to provision both Linux and Windows virtual machines on Windows Azure using the popular open source DevOps tool, Puppet. Support is provided in the form of a Windows Azure module for Puppet published in the Puppet Forge. In addition, management of key services such as network configuration and databases are supported. As a result, Puppet users can now leverage over 1800 community-defined configurations found in the Puppet Forge on Windows Azure.
MS Open Tech engineers have undertaken this work through our focus on enhancing interoperability across popular DevOps tools. DevOps focuses on the management of the intersection between software development and IT operations. It emphasizes collaboration and integration between the increasingly agile software development team (where rapid change is necessary), and the operations team who are required to provide maximum up time (where change may impact reliability). DevOps seeks to enable these two groups to communicate and collaborate more effectively. The contribution of a Puppet Module for Windows Azure is an important step in ensuring that users of Puppet are able to leverage their skills in a Windows Azure environment.
The Windows Azure Puppet module provides everything you need to provision the following Windows Azure services:
- Virtual Machines – both Linux and Windows
- Virtual Networks – create logically isolated sections of Azure and securely connect them to your on premise clients and servers
- SQL Server – create and maintain your SQL database
In addition Windows Azure users will now be able to access more than 1800 existing community-defined modules in the Puppet Forge.
“The ability to use Puppet to provision virtual machines on Windows Azure and thus to leverage the extensive repository of community provided modules in Puppet Forge should be compelling for many Puppet users” said Mitch Sonies, Vice President of Business and Corporate Development of Puppet Labs, Inc. “We think this contribution is a great step toward driving adoption of Azure within the Puppet community, and we look forward to seeing community uptake and ecosystem contributions grow.”
Getting Started with Puppet and Azure
Puppet is open source software that automates the configuration, provisioning and management of IT infrastructure, both in development and production. Machine configurations are described in terms of a “desired state” using an easy-to-read declarative language. Puppet uses this description to bring systems into the desired state and keep them there. For more information about Puppet see the extensive documentation available on the Puppet Labs website.
There are two parts to this MS Open Tech contribution. The first is the Puppet Manifests that describe the Windows Azure resources that can be managed using Puppet. The second is a cross platform command line interface (CLI). Using the CLI and Manifests it is easy to manage both Linux and Windows Virtual Machines, Virtual Networks and Affinity Groups and SQL servers. The goal is to maximize performance of your development, test and deployment environments.
Virtual Machine Management
Virtual machines deliver on demand, scalable compute infrastructure. Windows Azure provides both Windows Servers and Linux Servers in multiple configurations. To launch a new virtual machine and install the Puppet agent (so that it can later be managed by Puppet) you would us a command similar to the following:
puppet azure_vm create \
–management-certificate pem-or-pfx-file-path \
–image b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_04-amd64-server-20130501-en-us-30GB \
–location ‘west us’ \
–vm-name vmname \
–vm-user username \
–password ComplexPassword \
The full list of actions is shown in the table below, to see a list of options available for that action execute the command “puppet help node-azure ACTION-NAME”.
|bootstrap||Install Puppet node on an existing Windows Azure VM|
|create||Create Windows Azure VM|
|delete||Delete Windows Azure node instances|
|images||List Windows Azure images|
|locations||List Windows Azure locations|
|servers||List Windows Azure node instances|
|shutdown||Shutdown Windows Azure node instances|
|start||Start Windows Azure node instances|
Manage Virtual Networks
An Azure virtual network enables you to create a logically isolated section in Azure and securely connect it to your on premise data-center or clients machines using an IPsec connection. This allows you to more easily remote debug your applications through a direct connection between your local development machine and virtual machines hosted in Azure. Using virtual networks you will be able to troubleshoot and debug your applications using the same tools you would for on premise development work.
In addition this feature enables you to build distributed applications in a hybrid environment. For example, a web application hosted in Windows Azure can securely access an on premise database server or authenticate users against an on premise authentication server.
To create a virtual network you would execute a command something like this:
puppet azure_vnet set –management-certificate pem-or-pfx-file-path \
–virtual-network-name vnetname \
–affinity-group-name ag-name \
–address-space ‘172.16.0.0/12,192.168.0.0/16’ \
–dns-servers ‘dns1-1:10.10.8.8,dns2:220.127.116.11’ \
Other available actions are:
|list||List virtual networks|
|set||Configure the virtual network|
|set_xml_schema||Configure the virtual network using xml schema|
Manage SQL database server
Many applications require a database server, we are therefore providing commands to create and configure a SQL database using Puppet. To create a server use a command such as:
puppet azure_sqldb create –management-certificate pem-or-pfx-file-path \
–login loginname \
–password ComplexPassword \
–location ‘West Us’
Manifest files are collections of definitions, references and commands that enable you to quickly and repeatably deploy virtual machines in a defined “desired state”. In addition to the CLI described above we are contributing manifest files that can be used by Puppet to configure Windows Azure services. These Manifests are available as part of the Windows Azure module in the Puppet Forge and can be further adapted to suit your specific needs. The manifests provided are:
- bootstrap.pp – allows the creation of a new Puppet node
- db.pp – create a new instance of SQL server
- init.pp – defines a Windows Azure class that will allow easy deployment to the associated Windows Azure account
- vm.pp – create a new virtual machine instance from a virtual machine image
- vnet.pp – create a new virtual network
What is next?
MS Open Tech is pleased to enable Windows Azure provisioning using Puppet. This is an important component of our ongoing commitment to ensure that users of DevOps tools can leverage their skills within a Windows Azure environment.