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.707 ]
Por: evandro matos couto em 27/05/2015
#!/bin/bash # Iniciando o Container. # Não ativando nenhum tipo de rede pelo docker. # Ativando privilégios do root. # Aqui o legal da brincadeira. Criando uma interface Bridge, passando um IP, MAC, GW e por fim o hostname do Container. # -d o Container rodará em background -t -i para usar o /bin/bash. docker run \ --net="none" \ -v /opt/ubuntu:/map-dir-ubuntu \ --privileged \ --lxc-conf="lxc.network.type = veth" \ --lxc-conf="lxc.network.link = docker0" \ --lxc-conf="lxc.network.flags = up" \ --lxc-conf="lxc.network.hwaddr=5e:1e:bf:52:7c:ac" \ --lxc-conf="lxc.network.ipv4 = 172.16.42.10/24" \ --lxc-conf="lxc.network.ipv4.gateway = 172.16.42.1" \ --lxc-conf="lxc.utsname=docker-ubuntu-1" \ -d -t -i ubuntu /bin/bash
eth0 Link encap:Ethernet HWaddr 5e:1e:bf:52:7c:ac inet addr:172.16.42.10 Bcast:172.16.42.255 Mask:255.255.255.0 inet6 addr: fe80::5c1e:bfff:fe52:7cac/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:468 (468.0 B) TX bytes:468 (468.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#!/bin/bash # Iniciando o Container. # Não ativando nenhum tipo de rede pelo docker. # Ativando privilégios do root. # Aqui o legal da brincadeira. Criando uma interface Bridge, passando um IP, MAC, GW e por fim o hostname do Container. # -d o Container rodará em background -t -i para usar o /bin/bash. docker run \ --net="none" \ -v /opt/ubuntu:/map-dir-ubuntu \ --privileged \ --lxc-conf="lxc.network.type = veth" \ --lxc-conf="lxc.network.link = docker0" \ --lxc-conf="lxc.network.flags = up" \ --lxc-conf="lxc.network.hwaddr=5e:1e:bf:52:7c:bb" \ --lxc-conf="lxc.network.ipv4 = 172.16.42.20/24" \ --lxc-conf="lxc.network.ipv4.gateway = 172.16.42.2" \ --lxc-conf="lxc.utsname=docker-ubuntu-2" \ -d -t -i ubuntu /bin/bash
eth0 Link encap:Ethernet HWaddr 5e:1e:bf:52:7c:ac inet addr:172.16.42.20 Bcast:172.16.42.255 Mask:255.255.255.0 inet6 addr: fe80::5c1e:bfff:fe52:7cac/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:468 (468.0 B) TX bytes:468 (468.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
CentOS 5.8 - MySQL Cluster 7.1 + HAProxy
Clonagem de HDs com o PHANTOM & UDPCAST no CentOS
HAproxy + Stunnel (https) + CentOS 6
Nagios 4 com Check_MK 1.2.5i3 no CentOS 6.5 x64
Quota - Criando e administrando no CentOS
Otimizando o controle e a digitação de comandos no shell
Instalando o KDE 4.1 no Slackware 12.1
Gerenciamento de Lan House com Main Control System
Copiando programas dos LiveCDs (Kurumin) para seu Debian sem usar a internet
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
Inicializaçao lenta (alguns processos rodando) Debian 11 Bullseye [RES... (2)
Erro na atualização dos pacotes (6)