The following section contains a download for a script that automates the importing of Creator Owned GSS-TSIG records into the Data Node. The script uses the input of a CSV file to import the Creator Owned GSS-TSIG records.
Before you begin
- Copy the script to the Data Node container using the following
docker cp <path_to_script> <database_node_container_name>:/usr/local/bin/
- Change the permissions of the script to ensure that it is executable using the
docker exec -it <database_node_container_name> chmod +x /usr/local/bin/import_creator_owned_records
Creating the CSV file
- zone_name: the name of the zone in which the resource record resides.
- rr_name: the name of the resource record.
- ttl: the TTL value of the resource record.
- rr_type: the resource record type.Note: The following resource record types are supported: A, AAAA, SRV, CNAME
- rr_data: the resource record data. When entering the
rr_data, depending on the type of resource recording
being configured, the content must be one of the following formats:
- A records: IPv4 address
- AAAA records: IPv6 address
- SRV records: <priority> <weight> <port> <target>
- CNAME records: a canonical name
- client_name: the name of the client.
- client_domain: the domain of the client.
zone_name,rr_name,ttl,rr_type,rr_data,client_name,client_domain example.com,rr1,1000,A,18.104.22.168,client1,example.com example.com,rr2,1000,AAAA,2404:6800:4003:c03::8b,client2,example.com example.com,rr3,1000,SRV,1 50 88 srv-target,client3,example.com example.com,rr4,1000,CNAME,cname_data,client4,example.com
docker cp <path_to_CSV_file> <database_node_container_name>:/usr/local/bin/
Executing the script to import Creator Owned GSS-TSIG records
- Add zones and Creator Owned GSS-TSIG Record permissions for each of the zones that you are importing records into. For more information, refer to Permissions.
- Log in to the console of the Data Node that contains the import script and CSV file.
- Navigate to the /usr/local/bin/ directory that contains the import script and CSV file.
- Import the Creator Owned GSS-TSIG records using the following
import_creator_owned_records --file <CSV_file_name>
Once you execute the script, the script reads the input file and raises any exceptions when the zone or permissions of "Creator Owned GSS-TSIG records" do not exist in the database. The script continues to the next row of the CSV file and sends dynamic updates to the primary DNS zone for each record. If the dynamic update fails, it does not import the data to the database and continues to the next row of the CSV file. Once the script has successfully completed running, INFO logs are displayed in the console and DEBUG logs are logged in the log fire working directory.