GithubHelp home page GithubHelp logo

agent's Introduction

swarmpit

Lightweight mobile-friendly Docker Swarm management UI

version gitter Test, Build & Deploy PRs Welcome Financial Contributors on Open Collective

Twitter URL

Swarmpit provides simple and easy to use interface for your Docker Swarm cluster. You can manage your stacks, services, secrets, volumes, networks etc. After linking your Docker Hub account or custom registry, private repositories can be easily deployed on Swarm. Best of all, you can share this management console securely with your whole team.

More details about future and past releases can be found in ROADMAP.md

opencollective

Installation

The only dependency for Swarmpit deployment is Docker with Swarm initialized, we are supporting Docker 1.13 and newer. Linux hosts on x86 and ARM architectures are supported as well.

Package installer

Installer is your guide to setup Swarmpit platform. For more details see the installer

Stable version

Deploy our current milestone version

docker run -it --rm \
  --name swarmpit-installer \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  swarmpit/install:1.9

Edge version

Deploy latest version for the brave and true

docker run -it --rm \
  --name swarmpit-installer \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  swarmpit/install:edge

Manual installation

Deploy Swarmpit by using a compose file from our git repo with branch of corresponding version.

git clone https://github.com/swarmpit/swarmpit -b master
docker stack deploy -c swarmpit/docker-compose.yml swarmpit

For ARM based cluster use custom compose file.

git clone https://github.com/swarmpit/swarmpit -b master
docker stack deploy -c swarmpit/docker-compose.arm.yml swarmpit

This stack is a composition of 4 services:

  • app - Swarmpit
  • agent - Swarmpit agent
  • db - CouchDB (Application data)
  • influxdb - InfluxDB (Cluster statistics)

Feel free to edit the stackfile to change an application port and we strongly recommend to specify following volumes:

  • db-data
  • influxdb-data

to shared-volume driver type of your choice. Alternatively, you can link db service to the specific node by using constraint.

Swarmpit is published on port 888 by default.

Configuration

Refer to following document

User Types

Refer to following document

Development

Swarmpit is written purely in Clojure and utilizes React on front-end. CouchDB is used to persist application data & InfluxDB for cluster statistics.

Everything about building, issue reporting and setting up development environment can be found in CONTRIBUTING.md

Demo

Try in PWD

Deploys Swarmpit to play-with-docker sandbox. Please wait few moments till application is up and running before accessing port 888. Initialization might take a few seconds.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

agent's People

Contributors

kenits avatar mrq1911 avatar nohaapav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

agent's Issues

client version is too new

The collector is in a reboot loop.

$ docker version
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:10:14 2017
 OS/Arch:	linux/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:12:46 2017
  OS/Arch:	linux/amd64
  Experimental:	false
swarmpit_event-collector.0.h6673zkgu7y0@dfw-dev-swm-w-1    | 2018/02/12 16:07:06 INFO: Waiting for Swarmpit...
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:06 INFO: Swarmpit event collector starting...
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:06 INFO: EVENT_ENDPOINT: http://app:8080/events
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:06 INFO: HEALTH_CHECK_ENDPOINT: http://app:8080/version
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:06 INFO: Waiting for Swarmpit...
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:06 INFO: Swarmpit event collector starting...
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:06 INFO: EVENT_ENDPOINT: http://app:8080/events
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:06 INFO: HEALTH_CHECK_ENDPOINT: http://app:8080/version
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:06 INFO: Waiting for Swarmpit...
swarmpit_event-collector.0.f4pvin159be4@dfw-dev-swm-w-2    | 2018/02/12 16:07:07 INFO: Swarmpit event collector starting...
swarmpit_event-collector.0.f4pvin159be4@dfw-dev-swm-w-2    | 2018/02/12 16:07:07 INFO: EVENT_ENDPOINT: http://app:8080/events
swarmpit_event-collector.0.f4pvin159be4@dfw-dev-swm-w-2    | 2018/02/12 16:07:07 INFO: HEALTH_CHECK_ENDPOINT: http://app:8080/version
swarmpit_event-collector.0.f4pvin159be4@dfw-dev-swm-w-2    | 2018/02/12 16:07:07 INFO: Waiting for Swarmpit...
swarmpit_event-collector.0.fgagscfwjpno@dfw-dev-swm-m-1    | 2018/02/12 16:07:09 INFO: Swarmpit OK
swarmpit_event-collector.0.fgagscfwjpno@dfw-dev-swm-m-1    | 2018/02/12 16:07:09 ERROR: Event channel error: Error response from daemon: client version 1.36 is too new. Maximum supported API version is 1.35
swarmpit_event-collector.0.h6673zkgu7y0@dfw-dev-swm-w-1    | 2018/02/12 16:07:11 INFO: Swarmpit OK
swarmpit_event-collector.0.h6673zkgu7y0@dfw-dev-swm-w-1    | 2018/02/12 16:07:11 ERROR: Event channel error: Error response from daemon: client version 1.36 is too new. Maximum supported API version is 1.35
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:11 INFO: Swarmpit OK
swarmpit_event-collector.0.ntu22r0endlq@dfw-dev-swm-w-3    | 2018/02/12 16:07:11 ERROR: Event channel error: Error response from daemon: client version 1.36 is too new. Maximum supported API version is 1.35
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:11 INFO: Swarmpit OK
swarmpit_event-collector.0.5yr31ttt3pg9@dfw-dev-swm-m-3    | 2018/02/12 16:07:11 ERROR: Event channel error: Error response from daemon: client version 1.36 is too new. Maximum supported API version is 1.35

multi-arch docker image

Hello.
I propose to make a multiarch docker image for agent.
What do you think about that?
I made fork and some changes.

  • add go.mod for dependency resolution and fixation version
  • remove makefile in faver of use go.mod
  • some code formatting changes
  • make travis file for multi-arch build (I know it's terrible, but work)

and some question about swarmpit/task/stats.go

func calculateCPUPercentUnix(previousCPU, previousSystem uint64, v *types.StatsJSON) float64

CPUStats don't have OnlineCPUs and as I understand always go to in if block

	var (
		cpuPercent  = 0.0
		cpuDelta    = float64(v.CPUStats.CPUUsage.TotalUsage) - float64(previousCPU)
		systemDelta = float64(v.CPUStats.SystemUsage) - float64(previousSystem)
		onlineCPUs  = float64(v.CPUStats.OnlineCPUs)
	)

	if onlineCPUs == 0.0 {
		onlineCPUs = float64(len(v.CPUStats.CPUUsage.PercpuUsage))
	}

I use manifest-tool to create a single tag for docker image and have some problem with travis and manifest-tool, don't know how to make it work together.

May some test https://hub.docker.com/r/kenits/swarmpit_agent edge? It's build by travis

Windows Agent

We have a multi-os swarm cluster and we cant check the windows based nodes resources.

Adding ENV to use socket proxy

It would be nice to also configure the agent to use a socket proxy like the main app can:

Swarmpits behavior can be reconfigured via Environment Variables.
SWARMPIT_DOCKER_SOCK

Docker SOCK location used by docker client. In case of socket proxy use following format: http://TCPENDPOINT:2375. Default is /var/run/docker.sock.

Thanks in advance, also for any hints, ideas, considersations in the meantime :)

Enable viewing logs when Docker version >= 20.10

I'm currently running Swarmpit but also using Loki (using their custom log-driver) for logging from all containers.
Now those longs aren't currently available in Swarmpit.
I believe that is because the buttons are disabled when the driver is not json-file our journald.
However, the logs are indeed available using "docker service logs", since i'm running docker 20.10.1, which supports "dual logging".

https://www.docker.com/blog/introducing-docker-engine-20-10/

Starting with Docker Engine 20.10, you can use docker logs to read container logs regardless of the configured logging driver or plugin. This capability, sometimes referred to as dual logging, allows you to use docker logs to read container logs locally in a consistent format, regardless of the remote log driver used, because the Engine is configured to log information to the “local” logging driver. Refer to “Configure the default logging driver “ in the Docker documentation for additional information

Any chance to get Logs in Swarmpit enabled when available, without having to change log-drivers on the containers?

How do I set up swarmpit agent timzone?

When I tried to easily install swarmpit with docker, the timezone-related argument did not exist, so I manually specified it in docker-compose, but the swarmpit agent did not set the timezone.
How can I set the swarmpit agent timezone?

My docker-compose.yml

version: '3.8'

services:
  app:
    image: swarmpit/swarmpit:latest
    environment:
      - SWARMPIT_DB=http://db:5984
      - SWARMPIT_INFLUXDB=http://influxdb:8086
      - INTERACTIVE=0
      - ADMIN_USERNAME=${SWARMPIT_ADMIN_USERNAME}
      - ADMIN_PASSWORD=${SWARMPIT_ADMIN_PASSWORD}
      - TZ=Asia/Seoul
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 888:8080
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080"]
      interval: 60s
      timeout: 10s
      retries: 3
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 1024M
        reservations:
          cpus: '0.25'
          memory: 512M
      placement:
        constraints:
          - node.role == manager

  db:
    image: couchdb:2.3.0
    environment:
      - TZ=Asia/Seoul
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - db-data:/opt/couchdb/data
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.30'
          memory: 256M
        reservations:
          cpus: '0.15'
          memory: 128M

  influxdb:
    image: influxdb:1.8
    environment:
      - TZ=Asia/Seoul
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - influx-data:/var/lib/influxdb
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.60'
          memory: 512M
        reservations:
          cpus: '0.30'
          memory: 128M

  agent:
    image: swarmpit/agent:latest
    environment:
      - DOCKER_API_VERSION=1.35
      - TZ=Asia/Seoul
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /etc/localtime:/etc/localtime:ro
    networks:
      - net
    deploy:
      mode: global
      labels:
        swarmpit.agent: 'true'
      resources:
        limits:
          cpus: '0.10'
          memory: 64M
        reservations:
          cpus: '0.05'
          memory: 32M

networks:
  net:
    driver: overlay

volumes:
  db-data:
    driver: local
  influx-data:
    driver: local

Monitor all disk usage not only root

Only root partition usage is monitoring, this is not useful when data are mounted on another partition.
Quick modification, can be to use env variable to know partition to monitor and default if not present is root partition.
Better way is to monitor all data partitions (not /sys, /proc, ...), but some modification must be done in front end to display that.

Do you think the quick modification is acceptable ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.