Administration Guides
How to run commands across all nodes
Home
© Superna Inc
How to run commands across all nodes
For example, to get the hostname of each node, do:
- ecactl cluster exec hostname
To get the running containers on each node, do:
- ecactl cluster exec ecactl containers ps
To restart the turboaudit container on all three nodes, do:
- ecactl cluster exec "ecactl containers stop turboaudit && ecactl containers rm -r turboaudit && ecactl containers up -d turboaudit"
This will work with sudo commands too, but you'll be prompted for the ecaadmin password each time. For example:
- ecactl cluster exec sudo systemctl restart docker