root / docs / scale / i-ns.rst @ 301294a9
History | View | Annotate | Download (4.2 kB)
1 |
.. _i-ns: |
---|---|
2 |
|
3 |
Synnefo |
4 |
------- |
5 |
|
6 |
|
7 |
:ref:`synnefo <i-synnefo>` || |
8 |
ns || |
9 |
:ref:`apt <i-apt>` || |
10 |
:ref:`mq <i-mq>` || |
11 |
:ref:`db <i-db>` || |
12 |
:ref:`gunicorn <i-gunicorn>` || |
13 |
:ref:`apache <i-apache>` || |
14 |
:ref:`webproject <i-webproject>` || |
15 |
:ref:`astakos <i-astakos>` || |
16 |
:ref:`cms <i-cms>` || |
17 |
:ref:`pithos <i-pithos>` || |
18 |
:ref:`cyclades <i-cyclades>` || |
19 |
:ref:`kamaki <i-kamaki>` || |
20 |
:ref:`backends <i-backends>` |
21 |
|
22 |
Name Server Setup |
23 |
+++++++++++++++++ |
24 |
|
25 |
The following applies to ``ns`` node. You will create an DNS to resolve all |
26 |
FQDNs used by both ``synnefo`` and ``backend`` nodes. All we need here is to have |
27 |
a physical node - ip - role mapping. |
28 |
|
29 |
Assumptions: |
30 |
~~~~~~~~~~~~ |
31 |
|
32 |
- domain to use: ``example.com`` |
33 |
- nodes' IPv4 subnet: ``4.3.2.0/24`` |
34 |
|
35 |
For the sake of simplicity we assume we have 6 nodes assinged the following roles: |
36 |
|
37 |
======== ========= ======================== ==================== |
38 |
hostname IP roles FQDN |
39 |
======== ========= ======================== ==================== |
40 |
node1 4.3.2.1 ns,router,client,astakos accounts.example.com |
41 |
node2 4.3.2.2 cyclades cyclades.example.com |
42 |
node3 4.3.2.3 pithos pithos.example.com |
43 |
node4 4.3.2.4 cms cms.example.com |
44 |
node5 4.3.2.5 db db.example.com |
45 |
node6 4.3.2.6 mq mq.example.com |
46 |
node1 4.3.2.100 master ganeti.example.com |
47 |
======== ========= ======================== ==================== |
48 |
|
49 |
|
50 |
First install the corresponding package: |
51 |
|
52 |
.. code-block:: console |
53 |
|
54 |
# apt-get install bind9 |
55 |
|
56 |
In `/etc/bind/zones/example.com` add: |
57 |
|
58 |
.. code-block:: console |
59 |
|
60 |
$TTL 14400 |
61 |
$origin example.com. |
62 |
@ IN SOA ns.example.com. admin.example.com. ( |
63 |
2012111903; the Serial Number |
64 |
172800; the Refresh Rate |
65 |
7200; the Retry Time |
66 |
604800; the Expiration Time |
67 |
3600; the Minimum Time |
68 |
) |
69 |
|
70 |
@ IN NS ns.example.com. |
71 |
@ IN A 4.3.2.1 |
72 |
ns IN A 4.3.2.1 |
73 |
|
74 |
localhost IN A 127.0.0.1 |
75 |
example.com. IN MX 10 example.com. |
76 |
|
77 |
mail IN CNAME example.com. |
78 |
www IN CNAME example.com. |
79 |
accounts IN CNAME node1.example.com. |
80 |
cyclades IN CNAME node2.example.com. |
81 |
pithos IN CNAME node3.example.com. |
82 |
cms IN CNAME node4.example.com. |
83 |
db IN CNAME node5.example.com. |
84 |
mq IN CNAME node6.example.com. |
85 |
|
86 |
node1 IN A 4.3.2.1 |
87 |
node2 IN A 4.3.2.2 |
88 |
node3 IN A 4.3.2.3 |
89 |
node4 IN A 4.3.2.4 |
90 |
node5 IN A 4.3.2.5 |
91 |
node6 IN A 4.3.2.6 |
92 |
|
93 |
ganeti IN A 4.3.2.100 |
94 |
|
95 |
|
96 |
In `/etc/bind/rev/0-24.2.3.4.in-addr.arpa.zone` add: |
97 |
|
98 |
.. code-block:: console |
99 |
|
100 |
$TTL 86400 |
101 |
$ORIGIN 0-24.2.3.4.in-addr.arpa. |
102 |
@ IN SOA ns.example.com. admin.skata.com. ( |
103 |
2012070900; the Serial Number |
104 |
172800; the Refresh Rate |
105 |
7200; the Retry Time |
106 |
604800; the Expiration Time |
107 |
3600 ; the Minimum Time |
108 |
) |
109 |
@ IN NS ns.example.com. |
110 |
|
111 |
1 IN PTR node1.example.com. |
112 |
2 IN PTR node2.example.com. |
113 |
3 IN PTR node3.example.com. |
114 |
4 IN PTR node4.example.com. |
115 |
5 IN PTR node5.example.com. |
116 |
6 IN PTR node6.example.com. |
117 |
|
118 |
|
119 |
In `/etc/bind/named.conf.local` add: |
120 |
|
121 |
.. code-block:: console |
122 |
|
123 |
zone "example.com" in { |
124 |
type master; |
125 |
file "/etc/bind/zones/example.com"; |
126 |
}; |
127 |
|
128 |
zone "0-24.2.3.4.in-addr.arpa" in { |
129 |
type master; |
130 |
file "/etc/bind/rev/0-24.2.3.4.in-addr.arpa.zone"; |
131 |
}; |
132 |
|
133 |
And then restart the service: |
134 |
|
135 |
.. code-block:: console |
136 |
|
137 |
# /etc/init.d/bind9 restart |
138 |
|
139 |
|
140 |
In all ``synnefo`` and ``backend`` nodes add in `/etc/resolv.conf`: |
141 |
|
142 |
.. code-block:: console |
143 |
|
144 |
domain example.com |
145 |
search example.com |
146 |
nameserver 4.3.2.1 |
147 |
|
148 |
|
149 |
Test your Setup: |
150 |
++++++++++++++++ |