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: 17.712 ]
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)
Instalação do Nagios Core no CentOS 5.5
Alta disponibilidade: CentOS 6 - configurando os pacotes DRBD com gfs2 - parte 1
CentOS 5.8 - MySQL Cluster 7.1 + HAProxy
Nagios 4 com Check_MK 1.2.5i3 no CentOS 6.5 x64
HAproxy + Stunnel (https) + CentOS 6
Integração Contínua com Jenkins - Instalação (Parte 1)
ERPs Open Source (parte 1) - Principais soluções
Compilando e otimizando KDE 3.x
Instalando MetraTrader5 no Linux
Automatizando digitação de códigos 2FA no browser
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Como converter imagens PNG/JPEG para SVG em linha de comando
Fez porcaria no teu repositório Git? Aprenda a restaurar uma versão anterior do seu código!
Restaurando Fontes de Download do Hydra no Linux
Atualizando "na marra" o YT-DLP quando começa a dar erro de downloads
Como instalar o WPS com interface e corretor ortográfico em PT-BR no Arch Linux
Comprei thin client dell wyse tx0 3010 ele tá com Login é senha nao v... (0)
Ubuntu 25.04 não instala. (16)
Erro na atualização dos pacotes (8)
[AJUDA] Problemas ao atualizar BIOS da Gigabyte B550M K rev. 1.1 — “RO... (5)