ElasticSearch Cluster: Shared Repos Path with Docker Plugin
Setting up an Elastic-only node for an EnterMedia Cluster requires to share the repos path between all the nodes. For environments where is not available a NFS mount, you can use SSHFS to mount the resource in the remote host to be able to access the repos. Install vieux Docker plugin defining the sshkey path where the plugin will found the SSH keys to connect to the remote hosts:
$ sudo docker plugin install vieux/sshfs DEBUG=1 sshkey.source=/home/entermedia/.sshNow create a Docker volume:
$ docker volume create -d vieux/sshfs -o sshcmd=<user@host:path> [-o port=] [-o options ] sshvolumeThis is a working sample of how to mount a volume:
$ sudo docker volume create -d vieux/sshfs -o sshcmd=entermedia@mediaserver01.entermediadb.net:/media/emsites/node01/elastic/repos -o cache_timeout=72000 -o allow_other -o attr_timeout=72000 -o auto_cache,reconnect -o IdentityFile=/root/.ssh/keys/mediadserver01.pk sharedrepos
- Main node hostname: mediaserver01.entermediadb.net
- Main node repo path: /media/emsites/node01/elastic/repos,
- Main node SSH KEY: Viewx plugin mounts the IdentityFile path into the internal Docker root user home, so we specify the SSH key to use in that path
- Volume aname: sharedrepos.
-v sharedrepos:/opt/entermediadb/webapp/WEB-INF/elastic/repos \Now you can build an Elastic-only node for your cluster.