BretFisher / dogvscat

Sample Docker Swarm cluster stack of tools

Home Page:http://dogvs.cat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PR: create node in parallel (instead of one after the other)

pascalandy opened this issue · comments

As we can execute bash commands to run in parallel, I manage to create y nodes in parallel :)
Much faster.

The current shell script is async AFAIK.

Humm, from what I could observe, docker-machine script creates the node-n1, then once done, it starts the second one and so on.

The & at the end of each command in the bash loop frees the loop to start the next loop before the previous command finishes. See creation here and how the responses are async:

asciicast

Oh! In the script version I have, (dec 2018), the & was not there! That's why I was confused.
Good to know!

The & at the end of each command