docker-swarm

Which Docker template values are available in docker stack deploy (compose)?

爷,独闯天下 提交于 2019-12-06 08:38:01
Where can I find out which template values are available in my Docker UCP Swarm cluster? With template values I mean things like this https://docs.docker.com/engine/reference/commandline/service_create/#create-services-using-templates . I get the feeling that the tree I'm traversing looks a bit like docker inspect output, but a smaller set of it. Which keys? and which expressions can I use? Besides that, I often get errors like for {{.Engine.Labels}} <.Engine.Labels>: can't evaluate field Engine in type *template.Context So, it seems the context in which the tree is stored is 'Context'. Which

Kubernetes pod distribution

为君一笑 提交于 2019-12-06 07:56:40
I've worked quite a lot with Docker in the past years, but I'm a newbie when it comes to Kubernetes. I'm starting today and I am struggling with the usefulness of the Pod concept in comparison with the way I used to do thinks with Docker swarm. Let's say that I have a cluster with 7 powerful machines and I have the following stack: I want three Cassandra replicas each running in a dedicated machine (3/7) I want two Kafka replicas each running in a dedicated machine (5/7) I want a MyProducer replica running on its own machine, receiving messages from the web and pushing them into Kafka (6/7) I

Need for service discovery for docker engine swarm mode

限于喜欢 提交于 2019-12-05 17:27:21
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. Now I'm confused, if the mechanism is included in swarm mode, or is the documentation incomplete. Where

how get logs for docker service tasks on “preparing” state

ε祈祈猫儿з 提交于 2019-12-05 16:27:53
问题 I'm playing around now with docker 1.12, created a service and noticed there is a stage of "preparing" when I ran "docker service tasks xxx" . I can only guess that on this stage the images are being pulled or updated. My question is: how can I see the logs for this stage? Or more generally: how can I see the logs for docker service tasks? 回答1: I have been using docker-machine for emulating different "hosts" in my development environment. This is what I did to figure out what was going on

How do I filter docker swarm nodes by label?

妖精的绣舞 提交于 2019-12-05 08:59:16
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 is shown when I inspect the node: $ docker node inspect mr-host [ { "ID": "1c48m4msidbqwx7vj0lwib8ef",

Docker container not starting giving “OCI runtime create failed”

女生的网名这么多〃 提交于 2019-12-05 04:33:59
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 Storage Driver: devicemapper Pool Name: docker-8:2-137344840-pool Pool Blocksize: 65.54kB Base Device

How can I use a docker swarm mode manager behind a floating IP

好久不见. 提交于 2019-12-05 02:50:19
问题 Some providers, such as ScaleWay will give your server an IP that is not attached to a local interface on the box. # docker swarm init --advertise-addr <my-external-ip>:2377 --listen-addr 0.0.0.0:2377 Error response from daemon: must specify a listening address because the address to advertise is not recognized as a system address While # docker swarm init --advertise-addr eth0:2377 will advertise a private IP address. How is docker swarm supposed to be setup in such an environment? 回答1:

Deploying docker swarm without using docker machine

大兔子大兔子 提交于 2019-12-05 01:16:04
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? In fact Docker documentation offers you how to set up a swarm cluster 'manually' without using docker-machine: Create a swarm for development Auzias I think that this full step-by-step tutorial might be useful . It details how to deploy Swarm

How to init docker swarm with consul

我们两清 提交于 2019-12-04 22:36:41
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? 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 different things. Swarm Mode uses a raft implementation for the manager state that is not swappable with an

Hyperledger Fabric - Error while Instantiating chaincode (error trying to connect to local peer: context deadline exceeded)

北战南征 提交于 2019-12-04 21:12:27
I am using Hyperledger Fabric v 1.3.0 and trying to deploy using swarm network on multiple hosts. I am facing an issue when trying to instantiate the chaincode. The error i get is below in the image Chaincode Instantiate Error : I keep getting "Error trying to connect to local peer: context deadline exceeded" From some discussions, i added these 2 environment variables in the peer yaml CORE_PEER_ADDRESSAUTODETECT=true CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 But still i get the same error. Any pointers regarding the same? I've seen this issue before when the peer is trying to stand up a