Tag: docker swarm

PHP api requests outgoing IP on docker swarm & HAproxy

I have something very strange that I can’t solve. I have an application that communicates with an API that both run on the same docker swarm cluster. When an API request is made from the application, I get an error returned that the IP is not in the trusted list. But when I investigate this […]

How to perform zookeeper health checks in docker swarm mode?

We have a docker swarm cluster with 3 nodes. One of the components we deploy in swarm has native cluster capabilities and relies on zookeeper for cluster coordination and leader selection. So we deployed zookeeper in the swarm with the config below (pinning each zookeeper instance to a specific node, and using the swarm overlay […]

How do I remove old service images after an update?

I’m toying around with Docker Swarm. I’ve deployed a service an performed a couple of updates to see how it works. I’m observing that docker is keeping the old images around for the service. How do I clean those up? root@picday-manager:~# docker service ps picday ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS […]

Cannot connect to the Docker daemon at tcp:// Is the docker daemon running?

I setup native swarm cluster in docker with 3 managers and 3 nodes. Below are the results: docker node ls (dev-manager1) ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 2ms0ibflqj3jlsgcv8y1flmrn dev-node1 Ready Active 68p6nhjlrl5x05msgsannhzxt * dev-manager1 Ready Active Leader avqmsub8zbqhrc0p55wgq1vtg dev-node2 Ready Active bicmmx2gxiq57ydycm65vca0u dev-node3 Ready Active bszstgcdzhhnnu4xz86dqso3m dev-manager2 Ready Active Reachable dnp4yy7661fa3ob6mal9090v5 dev-manager3 Ready Active Reachable […]

Why Can't I Access Service in Docker Swarm by its Name or VIP?

So I have a docker engine (version 1.12.6, build 78d1802) running in an Ubuntu host. I created initiated a swarm using docker swarm init –advertise-addr I have a locally prebuilt image using which I create a service called nodeapp as follows docker service create –name nodeapp –publish 3000:3000 –replicas 2 node-app-image Now when I […]

Use Container Metrics from Prometheus

I deployed Prometheus on my cluster as well as cAdvisor and Grafana. It works tremendously well. I get all the data I need on Grafana’s UI. I started using Prometheus Java API in order to use this data. For example get the CPU usage and if it has a certain value something will be done. […]

Docker Swarm discovery is “file”,Can not create success

manage: node: and Docker Swarm discovery is file://path/to/file cluster file content: manage( command: docker run -d -it -h node-m –name=node-m –restart=always -v $(pwd)/cluster:/tmp/cluster -p 3375:3375 swarm manage -H file:///tmp/cluster node1( command: docker run -d -it -h node-1 –name=node-1 -v $(pwd)/cluster:/tmp/cluster swarm join –addr= file:///tmp/cluster node2( command: docker run -d -it -h […]

Docker swarm specific signal when down-scale replication number

Is there a way to specify the shutdown message when we reduce the replication number. by default it’s SIGTERM, but I would like to send SIGINT instead. Like docker kill –signal=SIGINT container_name

Docker composer, constraint – did not find expected key

We using docker CE(latest) and docker composer version 3.I have a .yml for for 3 services but I want to constraint grafana to the master of the swarm. When adding the constraint I get yaml: line 32: did not find expected key Tthe script is this: version: ‘3’ services: influxdb: image: “influxdb:latest” volumes: – /mount/set/influxdb:/var/lib/influxdb […]

Docker Swarm using remote servers

What I want to accomplish is creating Swarm manager in one server and a worker on a different server. For this I’m using the following commands: – First I create the discovery service with: docker-machine create -d virtualbox mh-keystore eval “$(docker-machine env mh-keystore)” docker run -d \ -p “8500:8500” \ -h “consul” \ progrium/consul -server […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.