Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

azure_fqdn_fix (4) Versions 1.0.3

Fixes node FQDNs on Azure without hassle

Policyfile
Berkshelf
Knife
cookbook 'azure_fqdn_fix', '~> 1.0.3', :supermarket
cookbook 'azure_fqdn_fix', '~> 1.0.3'
knife supermarket install azure_fqdn_fix
knife supermarket download azure_fqdn_fix
README
Dependencies
Changelog
Quality 17%

azure_fqdn_fix Cookbook

Adjusts /etc/hosts to fix hostname -f which is read by OHAI and sets a node's FQDN

Requirements

Currently this cookbook is designed to work only on Ubuntu flavored VMs on the AZURE PLATFORM.

Platforms

  • Ubuntu Linux 14.04+
  • Support for other Liunx Platforms will not be done by me, but can/will be supported via fork & pull

Chef

  • Chef 12.0 or later

Cookbooks

  • Ohai

Attributes

Default

Key Type Description Default
['azure_fqdn_fix']['domain'] String The domain name of your node 'example.of.long.domain.com'
['azure_fqdn_fix']['hostname'] String The hostname your node 'default-hostname'

If your browser does not support markdown tables, the table is better formatted as JSON here:

{
  'azure_fqdn_fix' :
  {
      'domain' : 
      {
         'type' : 'String',
         'Description' : "The domain name of your node",
         'Default' : 'example.of.long.domain.com'
      },
      'hostname' : 
      {
         'type' : 'String',
         'Description' : "The hostname name of your node",
         'Default' : 'default-hostname'
      }
  }
}

Usage

node['domain'] and node['hostname'] are not a reliable way of putting together a node's FQDN if it is hosted on Azure. Once you set up your public-ip DNS resolver name in the Azure portal, you are ready to use this recipe in your run_list.

['azure_fqdn_fix']['hostname'] is whatever you set your public resolver hostname to. It is whatever you put in the space that you fill in.

['azure_fqdn_fix']['domain'] is the portion of the DNS resolver hostname that you cannot change. It is usually underneath the editable region and has the format of region.cloudapp.azure.com

azure_fqdn_fix::default

  1. Set the attributes node['azure_fqdn_fix']['domain'] and node['azure_fqdn_fix']['hostname'] in your node through some means
  2. Include azure_fqdn_fix in your node's run_list:
{
  "name":"my_node",
  "run_list": [
    "recipe[azure_fqdn_fix]"
  ]
}

Tips

  1. I highly recommend setting the ['azure_fqdn_fix']['domain'] at the environment scope since most of your VM's in a cluster will be in the same geographical resource center.
  2. It is highly advised that you set up the DNS resolver BEFORE you run your bootstrap of your node because you can pass the --json-attributes flag (-j for short) and configure the public resolver as {'azure_fqdn_fix' : { 'hostname' : 'I-picked-this-hostname' }}. If you didn't set the domain attribute at the environment scope, you should include it in your json attributes hash.
  3. If you are fixing the FQDN of a node which has been deployed with this recipe:
    1. Follow usage above
    2. Run sudo chef-client to run the recipe
    3. Run ohai to update the node["fqdn"] attribute
    4. Run sudo chef-client to report the updated FQDN to the chef-server

Gotcha's

If you have a recipe in your run_list which for some reason changes the file permissions or ownership of the files in the /etc/ directory then you should run this recipe before the one(s) that do(es) because this recipe will alter the owner, group, and mode of the /etc/hosts file.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

License: MIT
Contributors: Justin Karnes

Dependent cookbooks

ohai >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

azure_fqdn_fix CHANGELOG

This file is used to list changes made in each version of the azure_fqdn_fix cookbook.

0.1.0

  • [Justin Karnes] - Prototype of azure_fqdn_fix

1.0.0

  • [Justin Karnes] - Initial release of Azure FQDN Fix

1.0.1

  • [Justin Karnes] - Addendum to readme to support supermarket markdown

1.0.2

  • [Justin Karnes] - Update Metadata to include source URL and issues URL

1.0.3

  • [Justin Karnes] - Update Metadata to include supported platforms

Collaborator Number Metric
            

1.0.3 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.3 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
            

1.0.3 failed this metric

FC066: Ensure chef_version is set in metadata: azure_fqdn_fix/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.3 passed this metric

Testing File Metric
            

1.0.3 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
            

1.0.3 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