Docker Linux Container - Open vSwitch Containers - Múltiplos Servidores
Neste tutorial, vou abordar de uma forma um pouco mais complexa a configuração do Docker Container. Pensando no conceito de Cloud Computing e também no conceito de múltiplas zonas, resolvi então implementar o Open vSwitch (OVS) no ambiente em que estou estudando.
[ Hits: 16.585 ]
Por: evandro matos couto em 27/05/2015
#!/bin/bash # IP do servidor Docker 2 ( docker-centos6-5-srv2 ). REMOTE_IP=192.168.0.229 # Nome da Bridge do Docker - Padrão docker0 BRIDGE_NAME=docker0 # IP da Brdige do Docker - ( docker-centos6-5-srv1 ). BRIDGE_ADDRESS=172.16.42.1/24 # Configurando # DESATIVANDO ip link set $BRIDGE_NAME down brctl delbr $BRIDGE_NAME ovs-vsctl del-br br0 # brctl addbr $BRIDGE_NAME ip a add $BRIDGE_ADDRESS dev $BRIDGE_NAME ip link set $BRIDGE_NAME up # ovs-vsctl add-br br0 ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre options:remote_ip=$REMOTE_IP brctl addif $BRIDGE_NAME br0 ifconfig br0 up
#!/bin/bash # # IP do servidor Docker 2 ( docker-centos6-5-srv1 ). REMOTE_IP=192.168.0.227 # Nome da Bridge do Docker - Padrão docker0 BRIDGE_NAME=docker0 # IP da Brdige do Docker - ( docker-centos6-5-srv2 ). BRIDGE_ADDRESS=172.16.42.2/24 # Configurando # DESATIVANDO ip link set $BRIDGE_NAME down brctl delbr $BRIDGE_NAME ovs-vsctl del-br br0 # brctl addbr $BRIDGE_NAME ip a add $BRIDGE_ADDRESS dev $BRIDGE_NAME ip link set $BRIDGE_NAME up # ovs-vsctl add-br br0 ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre options:remote_ip=$REMOTE_IP brctl addif $BRIDGE_NAME br0 ifconfig br0 up
br0 Link encap:Ethernet Endereço de HW C2:C6:C6:62:45:4B endereço inet6: fe80::c0c6:c6ff:fe62:454b/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:846 (846.0 b) docker0 Link encap:Ethernet Endereço de HW C2:C6:C6:62:45:4B inet end.: 172.16.42.1 Bcast:0.0.0.0 Masc:255.255.255.0 endereço inet6: fe80::5c8f:a1ff:fe45:f8ac/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:468 (468.0 b) eth0 Link encap:Ethernet Endereço de HW B2:5F:F5:7F:2B:5E inet end.: 192.168.0.227 Bcast:192.168.3.255 Masc:255.255.252.0 endereço inet6: fe80::b05f:f5ff:fe7f:2b5e/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:88903 errors:0 dropped:0 overruns:0 frame:0 TX packets:392 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:1000 RX bytes:12221565 (11.6 MiB) TX bytes:81218 (79.3 KiB) IRQ:24 lo Link encap:Loopback Local inet end.: 127.0.0.1 Masc:255.0.0.0 endereço inet6: ::1/128 Escopo:Máquina UP LOOPBACKRUNNING MTU:65536 Métrica:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:336 (336.0 b) TX bytes:336 (336.0 b)
br0 Link encap:Ethernet Endereço de HW BE:2E:38:27:3B:4E endereço inet6: fe80::bc2e:38ff:fe27:3b4e/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:26 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:1972 (1.9 KiB) TX bytes:1126 (1.0 KiB) docker0 Link encap:Ethernet Endereço de HW BE:2E:38:27:3B:4E inet end.: 172.16.42.2 Bcast:0.0.0.0 Masc:255.255.255.0 endereço inet6: fe80::4f5:7eff:fef4:9309/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:26 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:1608 (1.5 KiB) TX bytes:748 (748.0 b) eth0 Link encap:Ethernet Endereço de HW FE:25:F3:EF:2D:35 inet end.: 192.168.0.229 Bcast:192.168.3.255 Masc:255.255.252.0 endereço inet6: fe80::fc25:f3ff:feef:2d35/64 Escopo:Link UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1 RX packets:90419 errors:0 dropped:0 overruns:0 frame:0 TX packets:1162 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:1000 RX bytes:12366852 (11.7 MiB) TX bytes:199184 (194.5 KiB) IRQ:24 lo Link encap:Loopback Local inet end.: 127.0.0.1 Masc:255.0.0.0 endereço inet6: ::1/128 Escopo:Máquina UP LOOPBACKRUNNING MTU:65536 Métrica:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 colisões:0 txqueuelen:0 RX bytes:336 (336.0 b) TX bytes:336 (336.0 b)
HAproxy + Stunnel (https) + CentOS 6
Nagios 4 com Check_MK 1.2.5i3 no CentOS 6.5 x64
Quota - Criando e administrando no CentOS
Instalação do Nagios Core no CentOS 5.5
CentOS 5.8 - MySQL Cluster 7.1 + HAProxy
Como criar apresentações Flash usando o vnc2swf
Mendeley - Gerenciador de bibliografias e artigos
Instalando o APT-GET no Fedora Core
Instalação do Netscape Navigator 9 no Ubuntu Feisty Fawn
Cacti - O melhor monitor de link (FreeBSD 6.1)
Crie alias para as tarefas que possuam longas linhas de comando - bash e zsh
Criando um gateway de internet com o Debian
Configuração básica do Conky para mostrar informações sobre a sua máquina no Desktop
Aprenda a criar músicas com Inteligência Artificial usando Suno AI
Entendendo o que é URI, URL, URN e conhecendo as diferenças entre POST e GET
Instalando Grub Customizer no Ubuntu 24.04
Preparando pendrive com GNU/Linux [Corretamente!]
Instalando Google Chrome no Fedora 40
Habilitando a importação de senhas no Firefox
Como corrigir o erro do VirtualBox travar a máquina virtual em tela cheia
Como usar 2 programas reproduzindo audio nas mesmas saídas usando o ja... (2)
Som continua saindo no auto-falante mesmo com headphone, como conserto... (0)