-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
This manual describes how to install the head node and agents. If you have already installed the head-node, you can jump to Agent.
- Docker
- docker-compose
- sshfs plugin (https://github.com/vieux/docker-volume-sshfs)
docker swarm init --advertise-addr [host]
This will initialize a swarm on the Head node. A join-token is printed.
docker swarm join-token worker
docker node ls
This should print all available nodes in the swarm
docker plugin install vieux/sshfs
docker service create --replicas 1 --constraint 'node.hostname==head-node' --mount source=registry_data,target=/var/lib/registry --name registry --publish 5000:5000 registry:2
Edit /etc/docker/daemon.json
on all workers and add the following:
{
"insecure-registries": ["head-node:5000"]
}
cd ducc/
docker build -t head-node:5000/textimager-server:0.1 .
cd ../ducc-agent/
docker build -t head-node:5000/textimager-agent:0.1 .
cd ..
docker push head-node:5000/textimager-server:0.1
docker push head-node:5000/textimager-agent:0.1
Create two network shared storage directories to be mounted via sshfs later. In this example, we use the following:
ducc@storage-server:/home/ducc/ducc_swarm_shared
ducc@storage-server:/home/ducc/ducc_corpora
cp .env.example .env
Open the file and change the password to allow sshfs mounting and the registry url:
REGISTRY=head-node:5000
SSHFS_PASSWORD=password
This file contains everything about how to setup the TextImager stack.
You need to modify the placement.constraings
of the textimager-server
as well as the agents textimager-agent-*
. Remove or add new agent blocks depending on your amount of servers.
(Update the sshcmd
option of the two volumes).
cd /path/to/textimager-server/
docker stack deploy -c <(docker-compose -f stack.yml config) textimager
You can check on the status of the stack with docker service ls
and remove it again with docker stack rm textimager
. Check the running Docker containers on the workers with docker ps -a
and view the logfile of the server: docker logs -f [id-of-textimager-server-container]
.
- docker
- docker-compose
- sshfs plugin (https://github.com/vieux/docker-volume-sshfs)
docker plugin install vieux/sshfs
- go to head-node
- Get Join token from head node
Edit /etc/docker/daemon.json
on all workers and add the following (replace "xxxxx" with ip-address of head-node):
{
"insecure-registries": ["xxxxx:5000"]
}
Restart docker deamon
service docker restart