vhost IP specification working
[hcoop/domtool2.git] / lib / domain.dtl
CommitLineData
095de39e
AC
1{{Configuring shared daemons with respect to a particular Internet domain name}}
2
f8dfbbcc
AC
3extern type no_spaces;
4{{Any string with no space characters}}
5
d5754b53
AC
6extern type no_newlines;
7{{Any string with no newline characters}}
8
6ae327f8
AC
9extern type ip;
10{{An IP address}}
11
128e7b0b
AC
12extern type your_ip;
13{{An IP address that you're authorized to use; e.g., for an SSL web host}}
14
6ae327f8
AC
15extern type host;
16{{A hostname; that is, (more or less) an alphanumeric string}}
17
095de39e
AC
18extern type domain;
19{{An Internet domain name}}
20
12adf55a
AC
21extern type your_domain;
22{{A domain that you're allowed to configure}}
23
edd38024
AC
24extern type your_domain_host;
25{{Some host (as a fully-qualified domain name) in one of your domains}}
26
e0b0abd2
AC
27extern type node;
28{{The name of a server controlled by domtool}}
29
15e529d6
AC
30extern val ip_of_node : node -> ip;
31{{Look up the IP address of a node.}}
32
2aeb9eec
AC
33extern type user;
34extern type group;
35{{UNIX users and groups}}
36
8a7c40fa
AC
37extern type your_user;
38extern type your_group;
12adf55a
AC
39{{UNIX users and groups that you're allowed to run as}}
40
8a7c40fa 41extern type your_path;
998ed174 42{{A filesystem path that you're allowed to write to.
8a7c40fa
AC
43 The set of permitted values is generated from a set of roots by closing it
44 under the subdirectory relation.}}
12adf55a 45
998ed174
AC
46extern type readable_path;
47{{Like [your_path], but also includes some paths that everyone is allowed to
48 read.}}
49
095de39e
AC
50context Domain;
51{{Configuration directives specific to an Internet domain}}
52
6ae327f8
AC
53extern type serial;
54{{Domain zone serial numbers}}
55extern val serialAuto : serial;
7e197d72 56{{Whenever DNS data changes, choose a sensible serial number automatically.}}
6ae327f8
AC
57extern val serialConst : int -> serial;
58{{Use this particular serial number.}}
59
60extern type soa;
61{{DNS start-of-authority record}}
62extern val soa : domain -> serial -> int -> int -> int -> int -> soa;
63
728f7033 64val defaultSoa = soa "deleuze.hcoop.net" serialAuto 172800 900 1209600 3600;
325285ab 65
be1bea4c
AC
66extern type dns_node;
67{{A node offering DNS services}}
68extern val dns_node_to_node : dns_node -> node;
69
e0b0abd2
AC
70extern type master;
71{{Information on the master DNS server for a domain}}
72extern val externalMaster : ip -> master;
73{{A server not controlled by domtool will serve as master.}}
be1bea4c 74extern val internalMaster : dns_node -> master;
e0b0abd2
AC
75{{A server controlled by domtool will serve as master.}}
76
6ae327f8
AC
77extern type dnsKind;
78{{How should DNS for this domain be handled?}}
be1bea4c 79extern val useDns : soa -> master -> [dns_node] -> dnsKind;
e0b0abd2
AC
80{{We do want DNS services for this domain. Specify the SOA record, information
81 on the server in charge of zone data, and a list of slave servers.}}
6ae327f8 82extern val noDns : dnsKind;
e0b0abd2 83{{No DNS services for this domain.}}
6ae327f8 84
e0b80e65 85extern val domain : your_domain -> Domain => [Root] {Aliases : [your_domain], DNS : dnsKind, TTL : int};
095de39e 86{{Configure a domain to which you have access rights.}}
8c142ff5
AC
87
88extern type mail_node;
89{{A node offering SMTP services}}
e9f528ab
AC
90extern val mail_node_to_node : mail_node -> node;
91
92extern val domainHost : host -> [Domain] {} => { Hostname : domain };
93{{Appends the current domain onto a host.}}