Exported on 09-Sep-2021 13:19:54
Parameters
1 - Docker Swarm - Drain Node
Before the Docker Swarm node can be taken down, it should process all the tasks assigned to it. This is a safe way to stop a node in the Docker Swam that ensures no jobs are lost or held up.
Login as user {Linux User with Sudo} on node {Linux Node}
# List the docker nodes
docker node ls
# Drain the node of tasks so it can be taken offline safely
docker node update --availability drain {swarmNode}
2 - Docker Swarm - Apt Update Node
Perform maintenance on the docker node. Update the Linux packages, including and docker security patches.
Login as user {Linux User with Sudo} on node {Linux Node}
# Update the host
apt update
apt dist-upgrade -y
3 - Docker Swarm - Activate Node
Enable the node to become an active part of the docker swarm again.
Login as user {Linux User with Sudo} on node {Linux Node}
# Renable the node
docker node update --availability active {swarmNode}
This Attune Blueprint safely stops a docker swarm node, then performs routine maintenance tasks on it to ensure the Linux packages and Docker Packages are up to date.
This maintenance tasks is best run with the built in Attune Scheduler to ensure all nodes have the lates docker swarm security vulnerability patches applied.