Advertisement
huezohuezo1990

docker

Aug 20th, 2018
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.49 KB | None | 0 0
  1. Usar IP estatica.
  2. https://huezohuezo1990.wordpress.com/configurar-una-interfaz/
  3.  
  4.  
  5. Docker Swarm, es necesario abrir los puertos de comunicación entre nodos
  6.  
  7.  
  8. Firewall en CentOS
  9. systemctl status firewalld
  10.  
  11. firewall-cmd --add-port=2376/tcp --permanent && firewall-cmd --add-port=2377/tcp --permanent && firewall-cmd --add-port=7946/tcp --permanent && firewall-cmd --add-port=7946/udp --permanent && firewall-cmd --add-port=4789/udp --permanent && firewall-cmd --add-port=12376/tcp --permanent && firewall-cmd --add-port=12379/tcp --permanent && firewall-cmd --add-port=12380/tcp --permanent
  12.  
  13.  
  14. firewall-cmd --reload
  15.  
  16.  
  17. firewall-cmd --zone=public --add-port=5000/tcp && firewall-cmd --zone=public --add-port=5000/tcp --permanent
  18.  
  19.  
  20. firewall-cmd --reload
  21.  
  22.  
  23. Firewall en Ubuntu y debian ( UFW )
  24. https://help.ubuntu.com/community/UFW
  25.  
  26. sudo ufw allow ssh
  27. sudo ufw allow 2376/tcp && sudo ufw allow 2377/tcp && sudo ufw allow 7946/tcp && sudo ufw allow 7946/udp && sudo ufw allow 4789/udp && sudo ufw allow 12376/tcp && sudo ufw allow 12379/tcp && sudo ufw allow 12380/tcp
  28.  
  29.  
  30. sudo ufw allow 5000/tcp
  31.  
  32.  
  33.  
  34. inciar el cluster de Docker Swarm
  35.  
  36. docker swarm init --advertise-addr IP_Servidor
  37.  
  38. docker swarm init --advertise-addr 192.168.10.135
  39.  
  40.  
  41. Para agregar, Otros Nodos al swarm:
  42. docker swarm join-token manager
  43.  
  44.  
  45. docker swarm init --advertise-addr 192.168.20.50
  46.  
  47. docker swarm join --token SWMTKN-1-6a3s1kjcb2f6whixgtzj84f6wh7iomuav9w3zofvbxxxa97jxi-1tz1cjkdb0jryg7wfjeuvq3ve 192.168.20.50:2377
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement