Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa Próxima revisiónAmbos lados, revisión siguiente | ||
docs:virtualizacion:docker:swarm [2019/06/03 16:41] – rodolfo | docs:virtualizacion:docker:swarm [2019/06/03 18:33] – [Service management] rodolfo | ||
---|---|---|---|
Línea 9: | Línea 9: | ||
Read all docker or containerization [[https:// | Read all docker or containerization [[https:// | ||
- | ===== Docker swarm commands for swarm management ===== | + | ===== Swarm management ===== |
This set of command is used mainly to start, manage swarm cluster as a whole. For node management within cluster we have different set of commands following this section. | This set of command is used mainly to start, manage swarm cluster as a whole. For node management within cluster we have different set of commands following this section. | ||
Línea 38: | Línea 38: | ||
* // | * // | ||
- | ===== Docker swarm node commands for swarm node management ===== | + | ===== Node management ===== |
Node is a server participating in Docker swarm. Node can either be worker or manager in swarm. Manager node has ability to manage swarm nodes and services along with serving workloads. Worker nodes can only serve workloads. | Node is a server participating in Docker swarm. Node can either be worker or manager in swarm. Manager node has ability to manage swarm nodes and services along with serving workloads. Worker nodes can only serve workloads. | ||
- | docker node ls : Lists nodes in swarm | + | '' |
- | -q : Only display node Ids | + | * //-q// : Only display node Ids |
- | –format : Format output using GO format | + | * //–format// : Format output using GO format |
- | –filter : Apply filters to output | + | * //–filter// : Apply filters to output |
- | docker node ps : Display tasks running on nodes | + | |
+ | '' | ||
Above all switches applies here too. | Above all switches applies here too. | ||
- | docker node promote : Promote node to manager role | ||
- | docker node demote : Demote node from manager to worker role | ||
- | docker node rm : Remove node from swarm. Run from manager node. | ||
- | -f : Force remove | ||
- | docker node inspect : Detailed information about node | ||
- | –format :Format output using GO format | ||
- | –pretty : Print in human readable friendly format | ||
- | docker node update : Update node configs | ||
- | –role : worker/ | ||
- | –availability : active/ | ||
- | ===== Docker swarm service commands for swarm service | + | '' |
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | * //-f// : Force remove | ||
+ | |||
+ | '' | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | '' | ||
+ | * //–role// : worker/ | ||
+ | * // | ||
+ | |||
+ | ===== Service | ||
Docker service is used to create and spawn workloads to swarm nodes. | Docker service is used to create and spawn workloads to swarm nodes. | ||
- | docker service create : Start new service in Docker swarm | + | '' |
- | Switches of docker container run command like -i (interactive), | + | |
- | docker service ls : List services | + | Switches of docker container run command like //-i// (interactive), |
- | –filter, –format and -q (quiet) switches which we saw above are supported with this command. | + | |
- | docker service ps : Lists tasks of services | + | '' |
- | –filter, –format and -q (quiet) switches which we saw above are supported with this command. | + | * //–filter//, //–format// and //-q// (quiet) switches which we saw above are supported with this command. |
- | docker service logs : Display logs of service or tasks | + | |
- | docker service rm : Remove service | + | '' |
- | -f : Force remove | + | * //–filter//, //–format// and //-q// (quiet) switches which we saw above are supported with this command. |
- | docker service update : Update service config | + | |
+ | '' | ||
+ | |||
+ | '' | ||
+ | * //-f// : Force remove | ||
+ | |||
+ | '' | ||
Most of the parameters defined in service create command can be updated here. | Most of the parameters defined in service create command can be updated here. | ||
- | docker service rollback : Revert back changes done in service config. | + | |
- | docker service scale : Scale one or more replicated services. | + | '' |
+ | |||
+ | '' | ||
servicename=number format | servicename=number format | ||
- | docker service inspect : Detailed in formation about service. | + | |
+ | '' | ||