Giter Club home page Giter Club logo

dynect's Introduction

DESCRIPTION

Automatically configures system DNS using Dyn's API.

REQUIREMENTS

Chef 0.8+.

A Dynect account.

The dynect_rest gem. The dynect::default recipe installs this gem from http://rubygems.org

Works on any platform Chef runs on that can install gems from Rubygems.org.

ATTRIBUTES

The following attributes need to be set either in a role or on a node directly, they are not set at the cookbook level:

  • dynect.customer - Customer ID
  • dynect.username - Username
  • dynect.password - Password
  • dynect.zone - Zone
  • dynect.domain - Domain

Example JSON:

{
  "dynect": {
    "customer": "CUSTOMER",
    "username": "USERNAME",
    "password": "PASSWORD",
    "zone": "ZONE",
    "domain": "DOMAIN"
  }
}

EC2 specific attributes:

  • dynect.ec2.type - type of system, web, db, etc. Default is 'ec2'.
  • dynect.ec2.env - logical application environment the system is in. Default is 'prod'.

RESOURCES

rr

DNS Resource Record.

Actions:

Applies to the DNS record being managed.

  • :create
  • :replace
  • :update
  • :delete

Attribute Parameters:

  • record_type - DNS record type (CNAME, A, etc)
  • rdata - record data, see the Dyn API documentation.
  • ttl - time to live in seconds
  • fqdn - fully qualified domain name
  • username - dyn username
  • password - dyn password
  • customer - dyn customer id
  • zone - DNS zone

None of the parameters have default values.

Example:

dynect_rr "webprod" do
  record_type "A"
  rdata({"address" => "10.1.1.10"})
  fqdn "webprod.#{node.dynect.domain}"
  customer node[:dynect][:customer]
  username node[:dynect][:username]
  password node[:dynect][:password]
  zone     node[:dynect][:zone]
end

RECIPES

This cookbook provides the following recipes.

default

The default recipe installs Adam Jacob's dynect_rest gem during the Chef run's compile time to ensure it is available in the same run as utilizing the dynect_rr resource/provider.

ec2

Only use this recipe on Amazon AWS EC2 hosts!

The dynect::ec2 recipe provides an example of working with the Dyn API with EC2 instances. It creates CNAME records based on the EC2 instance ID (node.ec2.instance_id), and a constructed hostname from the dynect.ec2 attributes.

The recipe also edits /etc/resolv.conf to search compute-1.internal and the dynect.domain and use dynect.domain as the default domain, and it will set the nodes hostname per the DNS settings.

a_record

The dynect::a_record recipe will create an A record for the node using the detected hostname and IP address from ohai.

FURTHER READING

Information on the Dynect API:

Dynect REST Ruby Library:

LICENSE AND AUTHOR

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.

dynect's People

Contributors

miketheman avatar nathenharvey avatar rafaelmagu avatar stevendanna avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.