Skip to content

Commit

Permalink
fix: root user for agent/logspout for docker.sock permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Shahi <prashant@signoz.io>
  • Loading branch information
prashant-shahi committed Jan 24, 2025
1 parent 38ee0d7 commit 62b4aeb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 74 deletions.
6 changes: 6 additions & 0 deletions deploy/docker-swarm/docker-compose.ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ x-db-depend: &db-depend
services:
zookeeper-1:
<<: *zookeeper-defaults
hostname: zookeeper-1
# ports:
# - "2181:2181"
# - "2888:2888"
Expand All @@ -67,6 +68,7 @@ services:
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
zookeeper-2:
<<: *zookeeper-defaults
hostname: zookeeper-2
# ports:
# - "2182:2181"
# - "2889:2888"
Expand All @@ -82,6 +84,7 @@ services:
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
zookeeper-3:
<<: *zookeeper-defaults
hostname: zookeeper-3
# ports:
# - "2183:2181"
# - "2890:2888"
Expand All @@ -97,6 +100,7 @@ services:
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
clickhouse:
<<: *clickhouse-defaults
hostname: clickhouse
# ports:
# - "9000:9000"
# - "8123:8123"
Expand All @@ -111,6 +115,7 @@ services:
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
clickhouse-2:
<<: *clickhouse-defaults
hostname: clickhouse-2
# ports:
# - "9001:9000"
# - "8124:8123"
Expand All @@ -125,6 +130,7 @@ services:
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
clickhouse-3:
<<: *clickhouse-defaults
hostname: clickhouse-3
# ports:
# - "9002:9000"
# - "8125:8123"
Expand Down
4 changes: 4 additions & 0 deletions deploy/docker-swarm/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ x-db-depend: &db-depend
services:
zookeeper-1:
<<: *zookeeper-defaults
hostname: zookeeper-1
# ports:
# - "2181:2181"
# - "2888:2888"
Expand All @@ -62,13 +63,16 @@ services:
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
clickhouse:
<<: *clickhouse-defaults
hostname: clickhouse
# ports:
# - "9000:9000"
# - "8123:8123"
# - "9181:9181"
volumes:
- ../common/clickhouse/config.xml:/etc/clickhouse-server/config.xml
- ../common/clickhouse/users.xml:/etc/clickhouse-server/users.xml
- ../common/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml
- ../common/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
- ../common/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
- ./clickhouse-setup/data/clickhouse/:/var/lib/clickhouse/
# - ../common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml
Expand Down
69 changes: 0 additions & 69 deletions deploy/docker-swarm/generator/docker-compose.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions deploy/docker-swarm/generator/hotrod/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ services:
hotrod:
<<: *common
image: jaegertracing/example-hotrod:1.61.0
container_name: hotrod
command: [ "all" ]
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4318 #
load-hotrod:
<<: *common
image: "signoz/locust:1.2.3"
container_name: load-hotrod
hostname: load-hotrod
environment:
ATTACKED_HOST: http://hotrod:8080
LOCUST_MODE: standalone
Expand Down
6 changes: 4 additions & 2 deletions deploy/docker-swarm/generator/infra/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@ services:
otel-agent:
<<: *common
image: otel/opentelemetry-collector-contrib:0.111.0
user: root
command:
- --config=/etc/otel-collector-config.yaml
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- /:/hostfs:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
- SIGNOZ_COLLECTOR_ENDPOINT=http://host.docker.internal:4317
- SIGNOZ_COLLECTOR_ENDPOINT=http://host.docker.internal:4317 # In case of external SigNoz or cloud, update the endpoint and access token
- OTEL_RESOURCE_ATTRIBUTES=host.name={{.Node.Hostname}},os.type={{.Node.Platform.OS}}
# - SIGNOZ_ACCESS_TOKEN="<your-access-token>"
# Before exposing the ports, make sure the ports are not used by other services
# ports:
# - "4317:4317"
# - "4318:4318"
logspout:
<<: *common
image: "gliderlabs/logspout:v3.2.14"
container_name: signoz-logspout
user: root
volumes:
- /etc/hostname:/etc/host_hostname:ro
- /var/run/docker.sock:/var/run/docker.sock
Expand Down
2 changes: 2 additions & 0 deletions deploy/docker/generator/infra/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
otel-agent:
<<: *common
image: otel/opentelemetry-collector-contrib:0.111.0
user: root
command:
- --config=/etc/otel-collector-config.yaml
volumes:
Expand All @@ -29,6 +30,7 @@ services:
<<: *common
image: "gliderlabs/logspout:v3.2.14"
container_name: signoz-logspout
user: root
volumes:
- /etc/hostname:/etc/host_hostname:ro
- /var/run/docker.sock:/var/run/docker.sock
Expand Down

0 comments on commit 62b4aeb

Please sign in to comment.