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.851 ]
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)
Instalação do Nagios Core no CentOS 5.5
Nagios 4 com Check_MK 1.2.5i3 no CentOS 6.5 x64
CentOS 5.8 - MySQL Cluster 7.1 + HAProxy
Quota - Criando e administrando no CentOS
Alta disponibilidade: CentOS 6 - configurando os pacotes DRBD com gfs2 - parte 1
Instalando o IBExpert no Linux e acessando o Firebird
Compilador Clipper open-source, compile sem problemas os sistemas .PRG no Linux!
Planejando e migrando softwares do Windows para o Linux
Gerenciamento de Lan House com Main Control System
Atualizando o Passado: Linux no Lenovo G460 em 2025
aaPanel - Um Painel de Hospedagem Gratuito e Poderoso
O macete do Warsaw no Linux Mint e cia
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Instalação de Ubuntu em SSD (interno) como se fosse um dispositivo ext... (1)
Mikrotik não abre o webmail-segur... da Locaweb (10)