Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

Pluggable dnsadmin Modules

For cPanel & WHM 11.30

Introduction

You can create custom dnsadmin modules for your cPanel & WHM and DNSONLY systems. These modules can update DNS records on external systems in real time.

A dnsadmin plugin consists of 2 modules:

  1. The Setup module — This module handles the plugin's initial configuration, defines to whom the module is available, and creates configuration files for your DNS cluster.
  2. The Remote module — This module communicates with external systems in your DNS cluster. It accepts, handles, and builds dnsadmin commands to pass to other systems.

How does dnsadmin work?

dnsadmin is our system for managing DNS. It manages zones stored locally and communicates with remote systems in your DNS cluster. The dnsadmin system can interact with numerous remote systems, called nodes.

The dnsadmin system receives a cPanel & WHM API call, such as savezone or getzone, then responds with another API call based on the first call's result.

When dnsadmin receives a request for an action, it iterates over every node in the cluster and passes the action to nodes associated with the account that made the request. Each action is assigned a dnsuniqid identification value. This ID is a random string that prevents duplicate actions in complicated peering setups where a single request might be repeated.

How do I configure additional nodes?

You can configure additional nodes for an account by creating a file in /var/cpanel/cluster/$username/config/. You will need to replace the $username section of the path with the username that corresponds to the account whose node you are configuring.

You will need to enter key-value pairs in this file. Each of the key pairs specifies how data should be passed to the remote module when it interacts with remote systems in the DNS cluster.

#version 2.0
user=root
host=node.example.com
pass=PasswordGoesHere
module=cPanel
debug=on

note Note: Only the user, host, pass, and module values are required.

Node roles

Each node in your DNS cluster will have a specific role that determines which commands it can send and receive. Node roles are defined in /var/cpanel/cluster/$username/config/node-dnsrole. You will need to replace the $username value in the path with the username that corresponds to the account whose node you are configuring.

The available roles are:

Role Description
synchronize All actions received by this node are sent to remote DNS servers in the cluster.
write-only This node will only receive actions from other nodes.
standalone This node will not send or receive any action.

Getting started

  • Writing setup modules — This module of your dnsadmin plugin controls how a node's configuration file is written and how it appears in the interface.
  • Writing remote modules — Your dnsadmin plugin's remote module is responsible for communicating with other systems in your DNS cluster.

Topic revision: r10 - 23 Aug 2011 - 16:21:22 - Main.JustinSchaefer
SoftwareDevelopmentKit.PluggableDnsAdminModules moved from Sandbox.PluggableDnsAdminModules on 23 Aug 2011 - 16:20 by Main.JustinSchaefer - put it back