This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
asterisk_в_отказоустойчивой_конфигурации [2019/04/12 15:52] val [Шаг 4. Технология LXC (часть 1)] |
asterisk_в_отказоустойчивой_конфигурации [2019/07/25 11:29] (current) val [Asterisk в отказоустойчивой конфигурации] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Asterisk в отказоустойчивой конфигурации ====== | ====== Asterisk в отказоустойчивой конфигурации ====== | ||
+ | |||
+ | * [[https://youtu.be/U-LOU6dkBqs|Запись вебинара]] | ||
* Вебинар не про Asterisk))) а реклама курса [[https://www.specialist.ru/course/un5|Linux. Уровень 6. Создание отказоустойчивых кластерных решений.]] | * Вебинар не про Asterisk))) а реклама курса [[https://www.specialist.ru/course/un5|Linux. Уровень 6. Создание отказоустойчивых кластерных решений.]] | ||
Line 13: | Line 15: | ||
===== Шаг 2. Базовая настройка узлов ===== | ===== Шаг 2. Базовая настройка узлов ===== | ||
- | * Импортируем два узла из [[http://val.bmstu.ru/unix/img/My%20Documents/debian_9.5_64_03.ova|образа]] | + | * Импортируем два узла из [[http://val.bmstu.ru/unix/img/My%20Documents/debian_9.5_64_03.ova|образа]] в [[https://www.virtualbox.org/|VirtualBox]] |
* Называем node1 и node2 | * Называем node1 и node2 | ||
* Подключаем к сети класса/дома | * Подключаем к сети класса/дома | ||
Line 26: | Line 28: | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
- | 10.5.12.114 node1 | + | 10.5.7.114 node1 |
- | 10.5.12.214 node2 | + | 10.5.7.214 node2 |
</code><code> | </code><code> | ||
node1:~# cat /etc/resolv.conf | node1:~# cat /etc/resolv.conf | ||
</code><code> | </code><code> | ||
- | nameserver 10.5.12.254 | + | nameserver 10.5.7.254 |
</code><code> | </code><code> | ||
node1:~# cat /etc/network/interfaces | node1:~# cat /etc/network/interfaces | ||
Line 40: | Line 42: | ||
auto eth0 | auto eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
- | address 10.5.12.114 | + | address 10.5.7.114 |
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
- | gateway 10.5.12.254 | + | gateway 10.5.7.254 |
</code><code> | </code><code> | ||
node1:~# init 6 | node1:~# init 6 | ||
Line 73: | Line 75: | ||
auto eth0 | auto eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
- | address 10.5.12.214 | + | address 10.5.7.214 |
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
- | gateway 10.5.12.254 | + | gateway 10.5.7.254 |
</code><code> | </code><code> | ||
node2:~# init 6 | node2:~# init 6 | ||
Line 111: | Line 113: | ||
device /dev/drbd0; | device /dev/drbd0; | ||
disk /dev/sdb; | disk /dev/sdb; | ||
- | address 10.5.12.114:7788; | + | address 10.5.7.114:7788; |
meta-disk internal; | meta-disk internal; | ||
} | } | ||
Line 117: | Line 119: | ||
device /dev/drbd0; | device /dev/drbd0; | ||
disk /dev/sdb; | disk /dev/sdb; | ||
- | address 10.5.12.214:7788; | + | address 10.5.7.214:7788; |
meta-disk internal; | meta-disk internal; | ||
} | } | ||
Line 154: | Line 156: | ||
</code> | </code> | ||
- | * Пока загружается образ, можно выполнить темы 12, 13 и 5 | + | * Пока загружается образ, можно выполнить темы 12, 13, 5 и сделать перерыв |
===== Шаг 5. Настройка bridge ===== | ===== Шаг 5. Настройка bridge ===== | ||
Line 165: | Line 167: | ||
auto br0 | auto br0 | ||
iface br0 inet static | iface br0 inet static | ||
- | address 10.5.12.114 | + | address 10.5.7.114 |
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
- | gateway 10.5.12.254 | + | gateway 10.5.7.254 |
bridge_ports eth0 | bridge_ports eth0 | ||
</code><code> | </code><code> | ||
Line 177: | Line 179: | ||
auto br0 | auto br0 | ||
iface br0 inet static | iface br0 inet static | ||
- | address 10.5.12.214 | + | address 10.5.7.214 |
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
- | gateway 10.5.12.254 | + | gateway 10.5.7.254 |
bridge_ports eth0 | bridge_ports eth0 | ||
</code> | </code> | ||
Line 192: | Line 194: | ||
lxc.network.link = br0 | lxc.network.link = br0 | ||
lxc.network.flags = up | lxc.network.flags = up | ||
- | lxc.network.ipv4 = 10.5.12.123/24 | + | lxc.network.ipv4 = 10.5.7.123/24 |
- | lxc.network.ipv4.gateway = 10.5.12.254 | + | lxc.network.ipv4.gateway = 10.5.7.254 |
</code> | </code> | ||
Line 217: | Line 219: | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
- | 10.5.12.123 server | + | 10.5.7.123 server |
</code><code> | </code><code> | ||
server:/# cat /etc/resolv.conf | server:/# cat /etc/resolv.conf | ||
</code><code> | </code><code> | ||
- | nameserver 10.5.12.254 | + | nameserver 10.5.7.254 |
</code> | </code> | ||
Line 347: | Line 349: | ||
</code><code> | </code><code> | ||
... | ... | ||
- | bindnetaddr: 10.5.12.0 | + | bindnetaddr: 10.5.7.0 |
... | ... | ||
mcastaddr: 239.255.1.14 | mcastaddr: 239.255.1.14 | ||
Line 381: | Line 383: | ||
<code> | <code> | ||
node2:~# umount /disk2 | node2:~# umount /disk2 | ||
+ | |||
+ | node2:~# drbdadm secondary r0 | ||
nodeN:~# systemctl stop drbd | nodeN:~# systemctl stop drbd |