def create_instance(self): try: self.stop() except Exception: pass # get a connection to the DS self.ldap_connect() for ip_address in self.ip_addresses: if installutils.record_in_hosts(str(ip_address), self.fqdn) is None: installutils.add_record_to_hosts(str(ip_address), self.fqdn) # Make sure generate-rndc-key.sh runs before named restart self.step("generating rndc key file", self.__generate_rndc_key) if self.first_instance: self.step("adding DNS container", self.__setup_dns_container) if not dns_zone_exists(self.domain, self.api): self.step("setting up our zone", self.__setup_zone) if self.reverse_zones: self.step("setting up reverse zone", self.__setup_reverse_zone) self.step("setting up our own record", self.__add_self) if self.first_instance: self.step("setting up records for other masters", self.__add_others) # all zones must be created before this step self.step("adding NS record to the zones", self.__add_self_ns) self.step("setting up kerberos principal", self.__setup_principal) self.step("setting up named.conf", self.__setup_named_conf) self.step("setting up server configuration", self.__setup_server_configuration) # named has to be started after softhsm initialization # self.step("restarting named", self.__start) self.step("configuring named to start on boot", self.__enable) self.step("changing resolv.conf to point to ourselves", self.__setup_resolv_conf) self.start_creation()
def create_instance(self): try: self.stop() except Exception: pass for ip_address in self.ip_addresses: if installutils.record_in_hosts(str(ip_address), self.fqdn) is None: installutils.add_record_to_hosts(str(ip_address), self.fqdn) # Make sure generate-rndc-key.sh runs before named restart self.step("generating rndc key file", self.__generate_rndc_key) if self.first_instance: self.step("adding DNS container", self.__setup_dns_container) if not dns_zone_exists(self.domain, self.api): self.step("setting up our zone", self.__setup_zone) if self.reverse_zones: self.step("setting up reverse zone", self.__setup_reverse_zone) self.step("setting up our own record", self.__add_self) if self.first_instance: self.step("setting up records for other masters", self.__add_others) # all zones must be created before this step self.step("adding NS record to the zones", self.__add_self_ns) # The service entry is used for LDAPI autobind. The keytab is no # longer used to authenticate the server. The server still needs # the keytab to handle incoming nsupdate requests with TSIG. self.step("setting up kerberos principal", self.__setup_principal) self.step("setting up LDAPI autobind", self.setup_autobind) self.step("setting up named.conf", self.setup_named_conf) self.step("setting up server configuration", self.__setup_server_configuration) # named has to be started after softhsm initialization # self.step("restarting named", self.__start) self.step("configuring named to start on boot", self.switch_service) self.step( "changing resolv.conf to point to ourselves", self.setup_resolv_conf ) self.start_creation()