swarm

Docker 1.12 以前的: swarm 搭建 docker 集群

余生长醉 提交于 2019-12-03 09:37:58
什么是Swarm Swarm是Docker公司在2014年12月初发布的一套较为简单的工具,用来管理Docker集群,它将一群Docker宿主机变成一个单一的,虚拟的主机。Swarm使用标准的Docker API接口作为其前端访问入口,换言之,各种形式的Docker Client(docker client in go, docker_py, docker等)均可以直接与Swarm通信。Swarm几乎全部用Go语言来完成开发,上周五,4月17号,Swarm0.2发布,相比0.1版本,0.2版本增加了一个新的策略来调度集群中的容器,使得在可用的节点上传播它们,以及支持更多的Docker命令以及集群驱动。 Swarm deamon只是一个调度器(Scheduler)加路由器(router),Swarm自己不运行容器,它只是接受docker客户端发送过来的请求,调度适合的节点来运行容器,这意味着,即使Swarm由于某些原因挂掉了,集群中的节点也会照常运行,当Swarm重新恢复运行之后,它会收集重建集群信息。下面是Swarm的结构图: 能干什么 搭建一个dockers 集群 怎么玩 安装 env :A,B,C 三台机 ,A 将作管理机 ,centos 系统 ,root 用户 每一台机执行: sudo docker pull swarm 修改 docker 配置文件 sudo vi /etc

Docker1.12 Worker not able to join in cluster(Swarm: Pending)

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Manager Version Docker version 1.12.0-rc5, build a3f2063 , Worker version Docker version 1.12.0-rc5, build a3f2063 . Created Swarm manger: docker swarm init --advertise-addr "172.25.30.2:4243" Swarm initialized: current node (3kmewyb10p8xj3ke5rpjyw4s8) is now a manager. To add a worker to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-5lwzvv7au6hosiqqmdwmcxvmlmhtz4ts04jsg06284fq3posn0-enq26dqnwma38ij48hymtnioq \ 172.25.30.2:4243 To add a manager to this swarm, run the following command: docker swarm join \ -

How to specify Memory & CPU limit in docker compose version 3

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am unable to specify CPU & memory for services specified in version 3 . With version 2 it works fine with "mem_limit" & "cpu_shares" parameters under the services . But it fails while using version 3 , putting them under deploy section doesn't seem worthy unless i am using swarm mode . Can somebody help ? version: "3" services: node: build: context: . dockerfile: ./docker-build/Dockerfile.node restart: always environment: - VIRTUAL_HOST=localhost volumes: - logs:/app/out/ expose: - 8083 command: ["npm","start"] cap_drop: - NET_ADMIN - SYS

docker-compose.yml vs docker-stack.yml what difference?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new docker-user. And in difference manuals I have find usually docker-compose.yml file for description docker job, but on docker site for this goal used docker-stack.yml file. What difference? 回答1: docker-compose.yml is for the docker-compose tool which is for multi container docker applications on a single docker engine. its called with docker-compose up docker-stack.yml is for the docker swarm tool. (for orchestration and scheduling). its called with docker stack 回答2: To add to Gabbax0r reply: Docker Swarm was a standalone component

docker swarm环境搭建

£可爱£侵袭症+ 提交于 2019-12-03 02:46:28
docker swarm 是什么?   swarm 是 Docker 官方提供的一款集群管理工具,其主要作用是把若干台 Docker 主机抽象为一个整体,并且通过一个入口统一管理这些 Docker 主机上的各种 Docker 资源。   docker swarm 跟 k8s 一样,只是swarm比k8s上手简单,当然功能上也比k8s少一些,对于一些小型企业也够用了。 docker swarm的一些概念   node节点: swarm是一系列节点的集合,而节点可以是一台裸机或者一台虚拟机。一个节点能扮演一个或者两个角色,manager或者worker。    service: 是一个抽象的概念,它只是一个对运行在swarm集群上的应用服务,所期望状态的描述。也可以看作就是你希望运行的一个服务,比如一个nginx服务。    stack: stack 是一组服务的集合。    Yaml文件:服务定义文件参考 https://docs.docker.com/compose/compose-file/ 部署Docker swarm   两台安装docker的Ubuntu主机。找一台当manager节点。   运行命令 docker swarm init --advertise-addr 192.168.0.100   运行成功后,会出现 join 的命令

What are some good resources on flocking and swarm algorithms?

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Awhile ago I read the novel Prey . Even though it is definitely in the realm of fun science fiction, it piqued my interest in swarm/flock AI. I've been seeing some examples of these demos recently on reddit such as the Nvidia plane flocking video and Chris Benjaminsen's flocking sandbox ( source ). I'm interested in writing some simulation demos involving swarm or flocking AI. I've taken Artificial Intelligence in college but we never approached the subject of simulating swarming/flocking behaviors and a quick flip through my textbook

Docker-swarm >> Cannot connect to the docker engine endpoint

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: docker version 1.9 . 1 swarm version 1.0 . 1 why on connecting 3 VMs (bridged net) to swarm. "docker info" shows me all nodes Status pending. 1 of 3 hosts is manager all output is from this host. I don't know where to look for. On running swarm --debug manage token://XXXXX output >> * INFO [ 0000 ] Listening for HTTP addr = 127.0 . 0.1 : 2375 proto = tcp DEBU [ 0000 ] Failed to validate pending node : Cannot connect to the docker engine endpoint Addr = 10.32 . 1.38 : 2375 DEBU [ 0000 ] Failed to validate pending node : Cannot

Elk on Docker Swarm and glusterFS crash

匿名 (未验证) 提交于 2019-12-03 01:40:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to deploy an ELK stack on docker swarm. If I bind the elastic data directory to a Docker volume there is no problem. The problems comes as soon as I try to bind the elstastic data directory to a glusterFS volume. I use glusterFS to synchronise the data between all the swarm nodes in the cluster. I deploy ELK using the following code: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3 # container_name: elasticsearch environment: - "http.host=0.0.0.0" - "transport.host=127.0.0.1" - "ELASTIC_PASSWORD=changeme"

Node cannot join Swarm Cluster

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have 3 VM's. They all have docker 1.12 and they are running on centos7. All the ports are opened and the vm's are able to ping eachother I started my cluster with docker swarm init --advertise-addr 192.168.140.12 Docker info showed me: Swarm: active NodeID: 0drcj2nku1mv8t16fxva48edxx Is Manager: true ClusterID: cchn0yzospwoe1h9f55d7omxx Managers: 1 Nodes: 1 Now I try to join nodes (other vms) to the cluster. I use the command which was recommended after starting my manager. docker swarm join \ --token SWMTKN-1

Docker Swarm - Can’t pull from private registry

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running a service on a Swarm cluster, thanks to docker stack deploy --with-registry-auth and this compose file: version: "3.1" services: builder-consumer: image: us.gcr.io/my-gcloud-project/my/image:123 stop_grace_period: 30m volumes: - [...] environment: - [...] deploy: mode: global placement: constraints: - node.role == worker secrets: - [...] secrets: [...] This works fine when I deploy, but when I add a worker node to the swarm later on, the new worker can't pull the image required to run the task. The system logs report this: level