This is how to install portainer on the swarm you created using this gist note this should work on non-swarm installs too!
Download the portain stack yaml that will do this for you
curl -L https://downloads.portainer.io/ce2-17/portainer-agent-stack.yml -o portainer-agent-stack.yml
now run it
sudo docker stack deploy -c portainer-agent-stack.yml portainer
this will create a single portainer container that runs on the management node and deploy the agent to all worker nodes, once complete you can now access portainer at http://docker-host-ip:9000 and define your admin users etc
You now have a fully function docker swarm with portainer and can deploy containers, stacks or templates.
How to use portainer is beyond the scope of this gist
This is the portainer install doc at time of writing for reference but the instructions above will work just fine
I killed all the machines (which can happen after a long power surge). Then bringing them up and nothing works anymore. The scripted mount command, anything you documented ?
I can get it to work again when I run the
mount -a
command manually.Strange thing is that last server booting up - it mounts correctly.
If only 1 server goes down, all work as expected. If 2 go down, the last one will mount correctly, but the first one doesn't.
Please note that I added the following to
/etc/fstab
localhost:/staging-gfs /mnt glusterfs defaults,_netdev,backupvolfile-server=localhost 0 0