#!/bin/bash

# deploy a global service -- one instance on every node
# NOTE: must be run on the master node

DESCRIPTOR=`pwd`/descriptors/global-service-definition.yml
STACK_NAME=global-test

echo Deploying service
docker stack deploy --compose-file ${DESCRIPTOR} ${STACK_NAME}
sleep 1

echo Inspecting service
docker service inspect --pretty global-service
sleep 1

echo Listing all services
docker service ls
sleep 1

echo Watching service get deployed
watch 'docker service ps global-service'

#!/bin/bash

# deploy a global service -- one instance on every node
# NOTE: must be run on the master node

DESCRIPTOR=`pwd`/descriptors/global-service-definition.yml
STACK_NAME=global-test

echo Deploying Stack
docker stack deploy --compose-file ${DESCRIPTOR} ${STACK_NAME}
sleep 1

echo List all stacks
docker stacks ls
sleep 1

echo Listing all tasks in the stack
docker stack ps ${STACK_NAME}
sleep 1

echo Listing all services in the stack
docker stack services ${STACK_NAME}
sleep 1

Use the new commands to list services and tasks
Use the new commands to list services and tasks
