Docker Swarm Management with Portainer - Really Cool!

Discussion in 'Docker and Containers' started by Patrick, Jan 30, 2017.

  1. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,520
    Likes Received:
    4,450
    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.
     
    #1
    Last edited: Jan 30, 2017
  2. chilipepperz

    chilipepperz Active Member

    Joined:
    Mar 17, 2016
    Messages:
    204
    Likes Received:
    61
    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?
     
    #2
  3. gigatexal

    gigatexal I'm here to learn

    Joined:
    Nov 25, 2012
    Messages:
    2,677
    Likes Received:
    496
    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.
     
    #3
  4. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,520
    Likes Received:
    4,450
    @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.
     
    #4
  5. Marsh

    Marsh Moderator

    Joined:
    May 12, 2013
    Messages:
    2,093
    Likes Received:
    949
    For Persist Portainer data , add the following parameter to your docker run command
    -v /path/on/host/data:/data
     
    #5
    Patrick and T_Minus like this.
  6. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,520
    Likes Received:
    4,450
    I got it up and running as a service in Docker. Check out the thread total:

    Portainer Docker Swarm 1024.PNG
     
    #6
  7. gigatexal

    gigatexal I'm here to learn

    Joined:
    Nov 25, 2012
    Messages:
    2,677
    Likes Received:
    496
    Do you have a favorite? I.e would STH run portainer or rancher? Maybe something bigger like kubernetes?
     
    #7
  8. nitrobass24

    nitrobass24 Moderator

    Joined:
    Dec 26, 2010
    Messages:
    1,081
    Likes Received:
    125
    @Patrick Do you think we are at the point where this is a full replacement for VMware/Proxmox?


    Sent from my iPhone using Tapatalk
     
    #8
  9. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,520
    Likes Received:
    4,450
    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.
     
    #9
    gigatexal likes this.
  10. nitrobass24

    nitrobass24 Moderator

    Joined:
    Dec 26, 2010
    Messages:
    1,081
    Likes Received:
    125
    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
     
    #10
  11. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,520
    Likes Received:
    4,450
    I have just been leaving it up.
     
    #11
Similar Threads: Docker Swarm
Forum Title Date
Docker and Containers DOCKER Swarm Advice Oct 30, 2018
Docker and Containers Docker Swarm + Unifi Switch = Massive Packet Loss? May 11, 2017
Docker and Containers HA Docker Swarm on CentOS 7.3 Apr 30, 2017
Docker and Containers Docker Swarm Management with Rancher - Wow Feb 1, 2017
Docker and Containers Docker Swarm management: Rancher, Shipyard, Portainer or other? Jan 28, 2017

Share This Page