7. Finalize DNS configuration
The DNS configuration is missing because cobbler doesn’t know which
subnets and domains it is responsible for. You have to inform the
cobblerd
daemon that it should create forward- and reverse-zone
files for particular domains.
7.1. Forward zones
Remember that forward zones map a name such as c01.hpc
to its IP
192.168.17.1
. Cobbler already has the necessary information in its
database since you added the system. Now all you need to do is tell it
which zone files it should create.
Edit /etc/cobbler/settings
and change the following value:
manage_forward_zones: ['mgmt', 'hpc']
This will add all .hpc
and .mgmt
IPs to their corresponding
forward zone file. After editing settings
remember to restart
cobblerd
. Then run cobbler sync
.
The generated /etc/named.conf
will now contain two zone definitions
for mgmt
and hpc
.
zone "hpc." {
type master;
file "hpc";
};
zone "mgmt." {
type master;
file "mgmt";
};
These point to two newly created zone files /var/named/mgmt
and
/var/named/hpc
.
$TTL 300
@ IN SOA 192.168.16.1. nobody.example.com. (
2019021807 ; Serial
600 ; Refresh
1800 ; Retry
604800 ; Expire
300 ; TTL
)
IN NS 192.168.16.1.
c01 IN A 192.168.1.1;
$TTL 300
@ IN SOA 192.168.16.1. nobody.example.com. (
2019021807 ; Serial
600 ; Refresh
1800 ; Retry
604800 ; Expire
300 ; TTL
)
IN NS 192.168.16.1.
c01 IN A 192.168.17.1;
These files are based on a default zone template found at
/etc/cobbler/zone.template
. You can create a custom template for
each zone by copying and modifying the default template and placing them
in /etc/cobbler/zone_templates
. The filename has to match the final
zone file name. E.g., for generating /var/named/mgmt
create a
template with the name /etc/cobbler/zone_templates/mgmt
.
Do this now for both mgmt
and hpc
and try to make them similar
to the files created in exercise 2. Keep template variables such as
$cname_record
and $host_record
in place. This is where cobbler
will insert content during sync
.
7.2. Reverse zones
Recall that reverse zone definitions are used to lookup the name for a given IP. Cobbler can also generate those zone files. The mechanism is exactly the same as with forward zone file, the only difference now is that you will have to define zone template for every IP range.
Edit /etc/cobbler/settings
and change the following value:
manage_reverse_zones: ['192.168.0', '192.168.1', '192.168.16', '192.168.17']
Similar to the forward zones, create templates such as
/etc/cobbler/zone_templates/192.168.17
to ensure cobbler creates
files that resemble to the ones you had during exercise 2.
7.2.1. Verify that DNS resolution and IPMI works
Make sure to verify DNS resolution and IPMI works before trying to
proceed. Run cobbler sync
to apply all configuration changes. Use
the commands used in exercise 2 to verify DNS lookup in both directions.
7.2.2. Add the remaining systems to cobbler
Add the remaining compute nodes to cobbler by using cobbler system add
and cobbler system edit
. Finally run cobbler sync
to update the
configuration.
All of their interfaces should be configured, DNS forward and reverse lookup should work, and they should be reachable through IPMI.