Guest User

Untitled

a guest
Aug 25th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. In this step we'll create a swarm cluster from two nodes. You should've received access to two nodes in AWS.
  2.  
  3. 1. SSH in to the first node: `ssh -i docker_demo.pem ubuntu@IP1`
  4. 2. Figure out the internal IP address of the node: `ifconfig` and check the eth0 address (`10.0....`)
  5. 3. Initialize the Swarm cluster: `docker swarm init --listen-addr INTERNAL_IP --advertise-addr INTERNAL_IP
  6. 4. Open a new tab and SSH to the other node: `ssh -i docker_demo.pem ubuntu@IP2`
  7. 5. Check the internal IP of that node: `ifconfig` and eth0
  8. 6. Join to the cluster with the command the previous command printed out. Before executing the command, you need to the extend it with the `--listen-addr` and `--advertise-addr` parameters (using the internal IP of the second node): `docker swarm join TOKEN --listen-addr 10.0.... --advertise-addr 10.0..... node1...`
  9. 7. Get back to the first node and verify the results: `docker node ls`
Add Comment
Please, Sign In to add comment