docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.76k stars 1.08k forks source link

Grafana v6.6.3 does not work on dockerswarm #2980

Closed restlessankyyy closed 4 years ago

restlessankyyy commented 4 years ago
---------------------------------------------------------------------------------------------docker-compose.yml config
---------------------------------------------------------------------------------------------
version: "3.4"
networks:
  grafana_net_dev:
services:
  grafana_srv_dev:
    image: grafana/grafana:6.6.3
    deploy:
      mode: global
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
      update_config:
        parallelism: 1
        delay: 10s
        order: stop-first
    ports:
      - 4000:4000
    environment:
      - GF_LOG_CONSOLE_LEVEL=debug
      - GF_LOG_LEVEL=debug
      - GF_SERVER_PROTOCOL=http
      - GF_SERVER_HTTP_ADDR=0.0.0.0
      - GF_SERVER_HTTP_PORT=4000
      - GF_SERVER_ENABLE_GZIP=false
      - GF_DATABASE_LOG_QUERIES=false
      - GF_DATABASE_TYPE=mysql
      - GF_DATABASE_HOST=myawesomedb:3306
      - GF_DATABASE_NAME=grafana
      - GF_DATABASE_USER=grafana@myawesomedb
      - GF_DATABASE_PASSWORD=myawesomedb
      - GF_DATABASE_MAX_OPEN_CONN=0
      - GF_DATABASE_MAX_IDLE_CONN=2
      - GF_SESSION_PROVIDER=mysql
      - GF_SESSION_PROVIDER_CONFIG=grafana@myawesomedb:myawesomedb@tcp(myawesomedb:3306)/grafana
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
      - GF_AUTH_BASIC_ENABLED=true
      - GF_INSTALL_PLUGINS=simpod-json-datasource,jdbranham-diagram-panel,grafana-polystat-panel,digiapulssi-breadcrumb-panel,grafana-piechart-panel,flant-statusmap-panel,agenty-flowcharting-panel
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:4000"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 30s
    networks:
      - grafana_net_dev
-----------------------

container status

docker service ls ID NAME MODE REPLICAS IMAGE PORTS 9likcke5hbi5 grafana_grafana_srv_dev global 0/1 grafana/grafana:6.6.3 *:4000->4000/tcp docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1dc7524f4e78 grafana/grafana:6.6.3 "/run.sh" About a minute ago Up About a minute (health: starting) 3000/tcp grafana_grafana_srv_dev.948uoea73xt7jfreibf2qdmmg.5qsr7i4gsoond68cx3vtd5yjh logs

Hi, I am trying to upgrade my current Grafana on the docker swarm set up from 6.2 to 6.6.3. But unable to do so due to frequent container restarts. But the interesting part when I am running the same docker-compose.yml using docker-compose up -d. It is working fine.

Please provide help here... I do not think it is a grafana issue so I am posting it here.

justincormack commented 4 years ago

This repo is not for Docker swarm you are looking for github.com/docker/swarmkit