# Set drs placement rules ( Constraints)
#Add a Label to Node:
docker node update –label-add key=data nodename
docker node update –label-add region=east worker-1
docker node update –label-add datacenter=tp-chassis1 swarm100
docker node update –label-add datacenter=tp-chassis1 swarm101
docker node update –label-add datacenter=tp-chassis2 swarm102
#removing labels
docker node update –label-rm datacenter=tp-chassis1 swarm100
docker node update –label-rm datacenter=tp-chassis1 swarm101
docker node update –label-rm datacenter=tp-chassis2 swarm102
# Create mcd as service task
docker service create –name mcd_drs –constraint node.labels.datacenter==tp-chassis1 –replicas 3 nginx
or
#
Create new Stack
docker stack deploy –compose-file docker-compose.yml <name>
# Existing nodes
docker service update papajones_wordpress –constraint-add node.labels.datacenter==tp-chassis1
#Scaling nodes
docker service scale plumtomato_wordpress=10