docker-swarm

Need for service discovery for docker engine swarm mode

Deadly 提交于 2019-12-07 11:37:24
问题 I'm confused about docker swarm. As far as I know, the old way to run a swarm was to run manager and workers in containers, before docker engine provided native support for swarm mode. Documentation for the old, containerized swarm explained how to setup service discovery using consul, etcd or zookeeper. Service discovery is necessary, as services are ran at random ports to avoid collisions, right? Documentation for the docker engine swarm mode doesn't explain how to setup service discovery.

How do I filter docker swarm nodes by label?

Deadly 提交于 2019-12-07 06:35:13
问题 I'm running docker 1.12.1 and can't get node filtering by label to work. I first add the "test" label: $ docker node update --label-add test mr-host mr-host When I attempt to filter by it, no nodes are shown: $ docker node ls --filter label=test ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS Filtering by other criteria such as name works fine: $ docker node ls --filter name=mr-host ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 1c48m4msidbqwx7vj0lwib8ef * mr-host Ready Active Leader The label

Docker container not starting giving “OCI runtime create failed”

若如初见. 提交于 2019-12-06 22:38:30
问题 I have installed the Docker version 17.12.0-ce, build c97c6d6 When I try to start any container it gives the following error docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/2c910acea8a0cdd4ea6e2dd87616897b4e62b0913ba5014415bd6066eaf36868/ docker info : [root@MDMNext99001 /]# docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 1 Server Version: 17.12.0-ce

Deploying docker swarm without using docker machine

心不动则不痛 提交于 2019-12-06 19:24:01
问题 Currently I have a bunch of RHEL7 VMs running on RackSpace and want to deploy docker swarm for testing purpose. The Docker Docs only describes the method to deploy docker swarm by using docker machine. Question: Since VirtualBox cannot be used in VMs, are any other ways such that I can directly deploy docker swarm on my VMs without using docker machine? 回答1: In fact Docker documentation offers you how to set up a swarm cluster 'manually' without using docker-machine: Create a swarm for

“network not manually attachable” when running one-off command against docker swarm network

烂漫一生 提交于 2019-12-06 17:18:32
问题 I'm trying to run a one-off command to initialise a database schema in a new docker swarm which is deployed with 1.13's new support for docker-compose files. The swarm has the following network: $ docker network ls NETWORK ID NAME DRIVER SCOPE ... b7dptlu8zyqa vme_internal overlay swarm ... defined in the docker-compose.yml file as: networks: internal: The command I run is docker run --rm --network vme_internal app:0.1 db upgrade with the extra vme_ prefix coming from the name that I gave the

How to init docker swarm with consul

点点圈 提交于 2019-12-06 15:34:13
问题 How do I start a docker swarm cluster with consul back-end? I can't see any discovery param in the docker swarm init command? or the docker swarm join command? I successfully ran docker swarm init .... and than docker swarm join to start a cluster on the internal swarm discovery mechanism, but it's not recommended for production. So what am I missing? 回答1: You are running the newer Swarm Mode commands but asking about the usage of the classic Swarm that runs as a container, these are two very

Should swarm loadbalancing perform healthchecks on its nodes?

六眼飞鱼酱① 提交于 2019-12-06 11:42:02
问题 The Load Balancing section in the swarm docs don't make it clear if the internal loadbalancer also does health checks, and if it removes nodes that aren't running the service anymore (because it got killed or the node got rebooted). In the following case I've got a service with replicas 3, 1 instance running on each of the 3 nodes. Manager: [root@centosvm ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a593d485050a ddewaele/springboot.crud.sample:latest "sh -c 'java $JAVA

Kubernetes vs Docker Swarm

情到浓时终转凉″ 提交于 2019-12-06 11:41:40
I am evaluating Kubernetes (with Docker containers, not Kubernetes) and Docker Swarm and could use your input. If I'm looking at 3 (8.76 hours) or 4 (52 min) 9's reliability in a server farm that is < 100 servers, would Kubernetes be overkill due to its complexity? Would Docker Swarm suffice? Docker swarm will be able to meet your requirements. I recommend you start with Docker swarm as it is robust and very straightforward to use for anyone who has used Docker before. For a Docker user, there are many new concepts that you need to learn to be able to use Kubernetes. Moreover, setting up

Set up of Hyperledger fabric on 2 different PCs

折月煮酒 提交于 2019-12-06 10:03:29
I need to run Hyperledger-Fabric instances on 4 different machines PC-1 should contain CA and peers of ORG-1 in containers, Pc-2 should contain CA and peers of ORG-2, PC-3 should contain orderer(solo) and PC-4 should Node api Is my approach missing something ? if not how can I achieve this? I would recommend that you look at the Ansible driver in Hyperledger Cello project to manage deployment across multiple hosts/vms. In short, you need to establish network visibility across the set of host/vm nodes such that the peer knows about the orderer to which it will connect and so that gossip can

Prometheus dns service discovery in docker swarm relabel instance

那年仲夏 提交于 2019-12-06 09:50:39
My question is an addition to Prometheus dns service discovery in docker swarm . I define the prometheus scrape targets as follows: - job_name: 'node-exporter' dns_sd_configs: - names: - 'tasks.nodeexporter' type: 'A' port: 9100 This works fine but results in prometheus using the IP of the docker container as instance label. I tried to relabel the instance label as follows: relabel_configs: - source_labels: [__meta_dns_name] target_label: instance But doing so results in all instances of node-exporter having the same label "tasks.nodeexporter". Is it somehow possible to relabel the instance