This is the module that will enable the ability to extract and build a TinyDNS DNS server configurations from the database. It will output the configuration text that would normally be located in something like /service/tinydns or similar.
For now this module is in pre-release. It still needs quite a bit of real world testing. If you are interested in testing and are willing to provide feedback, please email support@opennetadmin.com to request a download.
Run make install_module to install the server side code that enables the ONA system to extract the configuration. This would be ran on the same system you installed the core ONA application to.
Run make install_server to install just the build script that would be run via cron or on demand to retrieve the configuration and refresh the DNS server daemon. If your DNS server is on the same box as the ONA system then run both install methods on the same box.
Run make install_docs to install basic documentation into the ONA docs directory
Run make all to install everything above.
You must set up your tinydns server on your own before you use this script. The assumption is that you have run something similar to the following command to set up the tinydns environment under the ONA directory structure:
tinydns-conf tinydns multilog /opt/ona/etc/tinydns x.x.x.x
If you choose not to run this under the ONA directory structure, you will need to change the ONA_PATH variable in the build_tinydns script.
First off, you must have at least one DNS domain defined in the database as well as a host definition for the server you will be running the DNS server on. This host definition should have the same name and IP address as what your server is actually configured to use.
The host within ONA should be defined as a DNS server for whatever domains you expect it to be responsible for.
You should now see the configuration being built real time in the web interface each time you select the server host and view its DNS server display page.
This now also exposes the dcm.pl module called build_tinydns_conf as well as a few others. It is used by the build_bind script to extract the configuration. It is also used by the web interface to generate configuration data.
In the event that you are unable to manage certain data types or records in ONA you can still place them in the file ‘data.header’. This is an arbitrary filename that will get merged together with the data from ONA to create your configuration. It is expected that this file be in the tinydns/root directory with the other data files.
This script uses the standard tinydns make file in tinydns/root to rebuild the data file. You should continue to use that makefile to do things like rsync or scp the data file to other servers etc.
Now that it is installed you should be able to execute /opt/ona/bin/build_tinydns as root. This will build a configuration file from the data in ONA and place it into the file /opt/ona/etc/tinydns/data. Assuming you have proper information in the database then your server will now test that configuration and restart.
Once you have a successful rebuild of your configuration, you can then put the /opt/ona/bin/build_tinydns build script into a cron that runs at whatever interval you see as appropriate for your environment. I would suggest at least 2 times a day all the way down to once every hour. Remember, you can always run it on demand if needed. You will need to run it as root since it needs to restart the named daemon.