Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-ns.rst @ 84809111

History | View | Annotate | Download (4.4 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:`qh <i-qh>` ||
17
:ref:`cms <i-cms>` ||
18
:ref:`pithos <i-pithos>` ||
19
:ref:`cyclades <i-cyclades>` ||
20
:ref:`kamaki <i-kamaki>` ||
21
:ref:`backends <i-backends>`
22

    
23
Name Server Setup
24
+++++++++++++++++
25

    
26
The following applies to ``ns`` node. You will  create  an DNS to resolve all
27
FQDNs used by both ``synnefo`` and ``backend`` nodes. All we need here is to have
28
a physical node - ip - role mapping.
29

    
30
Assumptions:
31
~~~~~~~~~~~~
32

    
33
 - domain to use:  ``example.com``
34
 - nodes' IPv4 subnet: ``4.3.2.0/24``
35

    
36
For the sake of simplicity we assume we have 6 nodes assinged the following roles:
37

    
38
========  =========  ===========================    ====================
39
hostname  IP         roles                          FQDN
40
========  =========  ===========================    ====================
41
node1     4.3.2.1    ns,router,client,astakos,qh    accounts.example.com
42
node2     4.3.2.2    cyclades                       cyclades.example.com
43
node3     4.3.2.3    pithos                         pithos.example.com
44
node4     4.3.2.4    cms                            cms.example.com
45
node5     4.3.2.5    db                             db.example.com
46
node6     4.3.2.6    mq                             mq.example.com
47
node1     4.3.2.100  master                         ganeti.example.com
48
========  =========  ===========================    ====================
49

    
50

    
51
First install the corresponding package:
52

    
53
.. code-block:: console
54

    
55
   # apt-get install bind9
56

    
57
In `/etc/bind/zones/example.com` add:
58

    
59
.. code-block:: console
60

    
61
    $TTL 14400
62
    $origin example.com.
63
    @               IN      SOA     ns.example.com. admin.example.com. (
64
    2012111903; the Serial Number
65
    172800; the Refresh Rate
66
    7200;  the Retry Time
67
    604800; the Expiration Time
68
    3600; the Minimum Time
69
    )
70

    
71
    @               IN        NS      ns.example.com.
72
    @               IN        A       4.3.2.1
73
    ns              IN        A       4.3.2.1
74

    
75
    localhost       IN        A       127.0.0.1
76
    example.com.    IN        MX      10 example.com.
77

    
78
    mail            IN        CNAME   example.com.
79
    www             IN        CNAME   example.com.
80
    accounts        IN        CNAME   node1.example.com.
81
    cyclades        IN        CNAME   node2.example.com.
82
    pithos          IN        CNAME   node3.example.com.
83
    cms             IN        CNAME   node4.example.com.
84
    db              IN        CNAME   node5.example.com.
85
    mq              IN        CNAME   node6.example.com.
86
    qh              IN        CNAME   node1.example.com.
87

    
88
    node1           IN        A       4.3.2.1
89
    node2           IN        A       4.3.2.2
90
    node3           IN        A       4.3.2.3
91
    node4           IN        A       4.3.2.4
92
    node5           IN        A       4.3.2.5
93
    node6           IN        A       4.3.2.6
94

    
95
    ganeti          IN        A       4.3.2.100
96

    
97

    
98
In `/etc/bind/rev/0-24.2.3.4.in-addr.arpa.zone` add:
99

    
100
.. code-block:: console
101

    
102
    $TTL 86400
103
    $ORIGIN 2.3.4.in-addr.arpa.
104
    @               IN      SOA     ns.example.com. admin.skata.com. (
105
    2012070900; the Serial Number
106
    172800; the Refresh Rate
107
    7200;  the Retry Time
108
    604800; the Expiration Time
109
    3600 ; the Minimum Time
110
    )
111
    @               IN        NS      ns.example.com.
112

    
113
    1               IN        PTR     node1.example.com.
114
    2               IN        PTR     node2.example.com.
115
    3               IN        PTR     node3.example.com.
116
    4               IN        PTR     node4.example.com.
117
    5               IN        PTR     node5.example.com.
118
    6               IN        PTR     node6.example.com.
119

    
120

    
121
In `/etc/bind/named.conf.local` add:
122

    
123
.. code-block:: console
124

    
125
    zone "example.com" in {
126
            type master;
127
            file "/etc/bind/zones/example.com";
128
    };
129

    
130
    zone "0-24.2.3.4.in-addr.arpa" in {
131
            type master;
132
            file "/etc/bind/rev/0-24.2.3.4.in-addr.arpa.zone";
133
    };
134

    
135
And then restart the service:
136

    
137
.. code-block:: console
138

    
139
    # /etc/init.d/bind9 restart
140

    
141

    
142
In all ``synnefo`` and ``backend`` nodes add in `/etc/resolv.conf`:
143

    
144
.. code-block:: console
145

    
146
    domain example.com
147
    search example.com
148
    nameserver 4.3.2.1
149

    
150

    
151
Test your Setup:
152
++++++++++++++++
153

    
154
Try to ping all FQDNs.