As in quite a few cases before, we'll start by creating the already familiar nodes (swarm-1, swarm-2, and swarm-3):
cd cloud-provisioning
git pull
scripts/dm-swarm.sh
All the commands from this chapter are available in the 08-logging.sh (https://gist.github.com/vfarcic/c89b73ebd32dbf8f849531a842739c4d) Gist.
The first service we'll create is Elastic Search (https://hub.docker.com/_/elasticsearch). Since we'll need it to be accessible from a few other services, we'll also create a network called elk:
eval $(docker-machine env swarm-1)
docker network create --driver overlay elk
docker service create \
--name elasticsearch \
--network elk \
--reserve-memory 500m \
elasticsearch:2.4
After a few moments, the elasticsearch service will be up and running.
We can check the status using the service ps command:
docker service ps elasticsearch...