Three virtual machines: CentOS 6.5 system,
The environment for each set:
1 after installing Docker and starting the service
2 Download Image:
Docker Pull Zeroc/icegridregistry
Docker Pull Zeroc/icegridnode
View the images that are downloaded below:
Docker images
Two have seen, prove the download OK
3 Start Deployment:
Deployment Mode 1:
Registry deployed on Virtual Machine 1,
Node deployed to another virtual machine's Docker,
The Start command is:
Docker run--name dnode1--net=host-v/usr/local/share/config/icegridnode.conf:/etc/icegridnode.conf:ro-d zeroc/ Icegridnode
Deployment Mode 2: Bridging mode
The idea is to set up a virtual bridge on the host (which can be understood as a switch), and then add other NICs, such as Eth0,eth0,vth0,wth0, to here,
Then add the IP address to the virtual bridge and start it, then remove the IP from the other NIC and reconfigure a default route
This is how the other host does it.
Then the final maximum to one effect:
This is how the overall network topology is structured:
The Network Bridge configuration for the virtual machine is as follows:
Ifconfig Viewing Configurations sudo brctl addbr br0 add a new bridge sudo ifconfig br0 192.168.12.2 netmask 255.255.255.0 add an IP address to the bridge (the IP address here can be set to the original eth0 address) sudo brctl addif br0 eth0 (add eth0 interface) Brctl Show (view bridge information) ifconfig eth0 0.0.0.0 (the original network card IP is empty) NETSTAT-NR (can gateway Info) route add default GW 192.168.12.1 (custom default gateway) sudo ifconfig br0 192.168.12.18 netmask 255.255.255.0 (Reconfigure bridge IP) by completing the above steps, the computer can continue to connect.
#sudo ifconfig Docker0 Down (Stop bridge) #brctl delbr Docker0 (remove bridge)
The virtual machine where registry node resides is then started normally within the virtual machine where the registry resides , and you need to stop Docker and open the Docker default boot profile Vi/etc/sysconfig/docker Add the following configuration
other_args= "-b=br0--fixed-cidr= ' 192.168.12.64/26 '"
Then restart Docker
Run the command with Docker
Docker run--name dnode1-v/usr/local/share/config/icegridnode.conf:/etc/icegridnode.conf:ro-d zeroc/icegridnode Boot Node
Then node can register to the registry
Note that the firewall needs to be shut down.