cookbook 'azure', '~> 0.2.0'
azure (3) Versions 0.2.0 Follow15
Installs and configures Windows Azure support for Linux VMs
cookbook 'azure', '~> 0.2.0', :supermarket
knife supermarket install azure
knife supermarket download azure
Description
The Azure cookbook installs and configures the Windows Azure Linux agent for your
selected distribution and provides an OHAI plugin that populates the azure
and
cloud
mashes with proper data in the same way the EC2 and Rackspace plugins do.
For RPM-based distributions, you have to provide your own URL for RPM installation.
You can build your own Linux Agent RPM using the .spec file published by Microsoft
on https://github.com/windows-azure/walinuxagent.
Please note that the OHAI plugin currently supports in-VM only discovery of
attributes. That means that external attributes like the VM name, Affinity Groups
and the such are not available, since they need to be discovered via API calls
to the Windows Azure endpoints.
Requirements
Cookbooks
This cookbook depends on the ohai
cookbook for the azure::ohai_plugin
recipe.
Platform
The following platforms are supported and tested:
- Ubuntu 12.04, 12.10
- CentOS 6
Other Debian and RHEL family distributions are assumed to work.
Chef Server
The cookbook converges best on Chef installations >= 10.16.2
Attributes
The following attributes are available on this cookbook. Please use n
for features that you
want disabled and y
for features that you want enabled.
-
node['azure']['rpm']['url']
- By defaultnil
, update it with your agent RPM URL for RPM-based virtual machines. node['azure']['rpm']['checksum']
- The SHA-256 checksum of the above RPM.node['azure']['ohai']['override_embedded']
- Installs the custom OHAI plugin and overrides the one that ships with Chefnode['azure']['ohai']['cleanup_old_versions']
- Removes the older custom azure.rb OHAI plugin, since that is again overriden by the
one shipped with Chef.node['azure']['agent']['provisioning']
- Enables the provisioning code of the Lnux agent.node['azure']['agent']['delete_root_password']
- If provisioning is enabled, disables the root password of the system.node['azure']['agent']['regenerate_ssh_key']
- Recreates the root user SSH private key in the provisioning phase.node['azure']['agent']['ssh_key_type']
- Defines the SSH key type that will be regenerated.node['azure']['agent']['monitor_hostname']
- Detects hostname changes on the VM and updates the service accordinglynode['azure']['agent']['resource_disk_format']
- If enabled, formats the local ephemeral storage attached to the VMnode['azure']['agent']['resource_disk_filesystem']
- The filesystem with which the local ephemeral storage will be formattednode['azure']['agent']['resource_disk_mountpoint']
- The mountpoint of the local ephemeral storage device.node['azure']['agent']['resource_disk_swap']
- Enable if you want to create a swap file on the ephemeral storage device
Recommended, since the ephemeral storage device is very fast! You'll have to have the ephemeral storage device enabled
if you want to use this feature.node['azure']['agent']['resource_disk_swap_size']
- The swap file size (in MB).node['azure']['agent']['verbose_logs']
- Enable verbose logging of the agent.
Recipes
default.rb
The default recipe installs the Windows Azure Linux agent and
configures the waagent.conf
file that enables various services on the virtual machine.
ohai_plugin.rb
The OHAI plugin recipe installs a custom Azure OHAI plugin and reloads OHAI in order to
populate the azure
and cloud
mashes.
OHAI Plugin
The ohai_plugin
recipe includes a custom OHAI plugin that overrides the one shipped with Chef which
only supports bootstrap hints. It provides the following attributes via OHAI:
-
node['azure']['deployment_id']
- The Azure deployment ID -
node['azure']['instance_type']
- The name of the running instance type, i.e. Extra Large node['azure']['instance_code']
- The code of the running instance type, i.e. A6node['azure']['public_hostname']
- The public hostname by which your VM is accessiblenode['azure']['public_ipv4']
- The public IP by which your VM is accessiblenode['azure']['local_hostname']
- The actual hostname you have given to your VMnode['azure']['local_ipv4']
- The internal IP address of the VMnode['azure']['location']
- The region mnemonic you VM is located in, i.e. europewestnode['azure']['location_pretty']
- A more pretty version of the location attribute, i.e. Europe Westnode['azure']['resource_disk']['device']
- The Linux device name of the resource disk attached to the VMnode['azure']['resource_disk']['mount']
- True if you have activated the locally attached ephemeral resource disknode['azure']['resource_disk']['filesystem']
- The filesystem with which the resource disk was formatted withnode['azure']['resource_disk']['mountpoint']
- The mountpoint of the resource disknode['azure']['resource_disk']['swap']['enabled']
- True if you have activated the swap file on the local resource disknode['azure']['resource_disk']['size']
- The size of the swap file on the local resource disk
It also populates standard cloud
attributes in the same way the EC2 and
Rackspace plugins do, such as public_ips
, private_ips
, public_ipv4
,
local_ipv4
, public_hostname
, local_hostname
and provider
.
Usage
Include the recipe on your node or role. Modify the
attributes as required in your role to change how various
configuration is applied per the attributes section above. In general,
override attributes in the role should be used when changing
attributes.
License and Author
- Author:: Panagiotis Papadomitsos (pj@ezgr.net)
Copyright 2013, Panagiotis Papadomitsos
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
ohai >= 1.1.4 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.2.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: azure/metadata.rb:1
FC065: Ensure source_url is set in metadata: azure/metadata.rb:1
FC066: Ensure chef_version is set in metadata: azure/metadata.rb:1
FC069: Ensure standardized license defined in metadata: azure/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: azure/metadata.rb:1
FC065: Ensure source_url is set in metadata: azure/metadata.rb:1
FC066: Ensure chef_version is set in metadata: azure/metadata.rb:1
FC069: Ensure standardized license defined in metadata: azure/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
FC065: Ensure source_url is set in metadata: azure/metadata.rb:1
FC066: Ensure chef_version is set in metadata: azure/metadata.rb:1
FC069: Ensure standardized license defined in metadata: azure/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number