Docker Swarm Management with Portainer - Really Cool!

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Patrick

Administrator
Staff member
Dec 21, 2010
12,512
5,800
113
For those who saw the Monero CPU Mining with Docker Swarm Mode post today, I decided to use that test cluster (coming down Friday) to try Portainer.

I logged into the swarm manager node and ran:

Code:
docker run -d -p 9000:9000 -v "/var/run/docker.sock:/var/run/docker.sock" portainer/portainer
That fired up Portainer and connected it to the local node. It exposed port 9000 so you can point a web browser to Portainer.

Cluster overview:

upload_2017-1-30_13-20-8.png

Running Monero CPU Mining Global Service Detail
upload_2017-1-30_13-21-11.png

Remove containers from the GUI:
upload_2017-1-30_13-22-3.png

Deploy Application Templates from a GUI:
upload_2017-1-30_13-23-37.png

Overall, this may not be the greatest solution (or it may be), but it was seconds to setup and is already useful.

Will be trying Shipyard and Rancher soon and hope to have a comparison on the main site with what we find.
 
Last edited:

chilipepperz

Active Member
Mar 17, 2016
212
64
28
54
WAIT so is this like a Docker GUI? Does it use its own stuff like Rancher?

I've never heard of it. Gonna try this week.

How do you deal with if the Portainer.io controller container goes down? Is there a way to do a persistent volume? I'd LOVE LOVE LOVE to see that solution. Your run command will kill all the config if you turn off that node right?
 

gigatexal

I'm here to learn
Nov 25, 2012
2,913
607
113
Portland, Oregon
alexandarnarayan.com
I've been playing with Docker a lot lately now that Microsoft has released SQLServer for Docker and windows containers. Hella cool imo. I have thought, though, that a GUI is almost a must given the amount of containers one could run with multiple hosts and such.

i'm looking forward to the Rancher writeup. Haven't heard of shipyard, but I'll start googling that now.
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,512
5,800
113
@chilipepperz - you are right. Actually, I tried killing the container and bringing it back up. The only real issue was that the user management credentials were pulled. I think it is pulling most of the data from the swarm cluster.
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,512
5,800
113
I got it up and running as a service in Docker. Check out the thread total:

Portainer Docker Swarm 1024.PNG
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,512
5,800
113
Made a post on the main site Friday with a video. This is on the Lab cluster. May swap out for Rancher as rancher has better visibility on a host basis. If you are running a CLI swarm, portainer is great.
 
  • Like
Reactions: gigatexal

nitrobass24

Moderator
Dec 26, 2010
1,087
131
63
TX
Did you get portainer working with persistent data storage?

I have it running as a service on my swarm, but am getting tired of setting up the authentication everytime I go to use it.

Code:
docker service create   \
--name portainer \
--publish 9000:9000 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock portainer/portainer \
-H unix:///var/run/docker.sock