A DNS server which stores domain information in Cassandra.
CDNS will use the Keyspace with the name "cdns". If it doesn't exist yet it will be created with the following settings:
CREATE KEYSPACE cdns WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': 1
}
In any non-testing environment the Keyspace should probably be pre-created.
CDNS will use the Column-Family "cdns.cdns" which it will automatically create:
CREATE COLUMNFAMILY cdns.cdns (
question text,
type text,
answers list<text>,
shuffle boolean,
PRIMARY KEY (question, type)
)
Entries can be added using the following statement:
UPDATE cdns.cdns SET
answers = ['1.2.3.4', '2.3.4.5'],
shuffle = True
WHERE question = 'example.com'
AND type = 'A';
docker-compose up -d
Cassandra
docker run -d --name cassandra cassandra
cqlsh
docker exec -it cassandra cqlsh
cdns
docker run --name cdns -d --link cassandra:cassandra -p 53:53/udp mkroli/cdns