## Testing inter-service connectivity This test uses the redis server and client. You will schedule redis to run on a worker, then log into the manager and connect with a redis client image. On the manager: ``` root@scw-93f02d:~# docker service create --network=testnet --name redis --publish 6379 --replicas=1 --constraint='node.role != manager' redis:latest xa5f3uiseu7k6rz45x41a3nem ``` Check service started: ``` root@scw-93f02d:~# docker service ps redis ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS psrpw5akjjl5 redis.1 redis:latest worker Running Running 2 seconds ago ``` From the manager: run a container to attach to redis: ``` root@scw-93f02d:~# docker run --net=testnet -ti redis:latest redis-cli -h redis redis:6379> incr docker-awesome (integer) 1 redis:6379> ``` Control + D to exit, then check swarm status: ``` root@scw-93f02d:~# docker service ls ID NAME MODE REPLICAS IMAGE sjkhmujg1ehi web replicated 5/5 nginx:latest xa5f3uiseu7k redis replicated 1/1 redis:latest ``` ``` root@scw-93f02d:~# docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 39kw5i5aix9mxzw06h6y3v07e worker Ready Active z4vpwtut5v66nwi0jijco6mjn * scw-93f02d Ready Active Leader root@scw-93f02d:~# ```