# Stack deployment is not working

**URL:** https://discuss.elastic.co/t/stack-deployment-is-not-working/129794
**Category:** Beats
**Tags:** filebeat
**Created:** [April 27, 2018, 9:19am UTC](https://discuss.elastic.co/t/stack-deployment-is-not-working/129794 "2018-04-27T09:19:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![siva1](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@siva1](https://discuss.elastic.co/u/siva1)
#### Post date: [April 27, 2018, 9:19am UTC](https://discuss.elastic.co/t/stack-deployment-is-not-working/129794/1 "2018-04-27T09:19:56Z")

</div>

Hi Guys,

I am running my containers in swarm mode. From the Master node I want to do stack deploy filebeat container to all the worker nodes. I want to collect the logs from the other nodes. Any other idea using filebeat.  
I am trying to do like this

version: '3.1'  
services:  
filebeat:  
image: some/filebeat:latest  
environment:  
- LOGSTASH\_HOST=13.12.11.71  
- LOGSTASH\_PORT=5000  
- SHIPPER\_NAME=hostname  
networks:  
- filebeatnetwork  
volumes:  
- /var/run/docker.sock:/tmp/docker.sock  
deploy:  
mode: global  
placement:  
constraints:  
- node.role == worker  
update\_config:  
parallelism: 3  
delay: 10s  
restart\_policy:  
condition: on-failure  
max\_attempts: 10  
networks:  
filebeatnetwork:  
external: true

any help!

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [April 27, 2018, 11:31am UTC](https://discuss.elastic.co/t/stack-deployment-is-not-working/129794/2 "2018-04-27T11:31:43Z")

</div>

Filebeat instances can be deployed in containers dynamically using Autodiscover. It seems to me that using this feature fits your usecase: [https://www.elastic.co/guide/en/beats/filebeat/current/configuration-autodiscover.html](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-autodiscover.html)

If it's not, could you please provide more context?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 25, 2018, 11:31am UTC](https://discuss.elastic.co/t/stack-deployment-is-not-working/129794/3 "2018-05-25T11:31:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
