segregrated manager node services
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
services:
|
services:
|
||||||
# System Monitoring
|
# System Monitoring
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Netdata Manager
|
||||||
|
# --------------------------
|
||||||
netdata:
|
netdata:
|
||||||
image: netdata/netdata:latest
|
image: netdata/netdata:latest
|
||||||
container_name: netdata
|
container_name: netdata
|
||||||
ports:
|
ports:
|
||||||
- "7001:19999"
|
- "7001:19999"
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
- SYS_ADMIN
|
||||||
|
security_opt:
|
||||||
|
- apparmor:unconfined
|
||||||
volumes:
|
volumes:
|
||||||
- netdata_config:/etc/netdata
|
- netdata_config:/etc/netdata
|
||||||
- netdata_lib:/var/lib/netdata
|
- netdata_lib:/var/lib/netdata
|
||||||
@@ -16,19 +25,19 @@ services:
|
|||||||
- /etc/passwd:/host/etc/passwd:ro
|
- /etc/passwd:/host/etc/passwd:ro
|
||||||
- /etc/group:/host/etc/group:ro
|
- /etc/group:/host/etc/group:ro
|
||||||
- /etc/os-release:/host/etc/os-release:ro
|
- /etc/os-release:/host/etc/os-release:ro
|
||||||
cap_add:
|
|
||||||
- SYS_PTRACE
|
|
||||||
- SYS_ADMIN
|
|
||||||
security_opt:
|
|
||||||
- apparmor:unconfined
|
|
||||||
environment:
|
environment:
|
||||||
- NETDATA_CLAIM_TOKEN=${NETDATA_CLAIM_TOKEN:-}
|
- NETDATA_CLAIM_TOKEN=${NETDATA_CLAIM_TOKEN:-}
|
||||||
- NETDATA_CLAIM_URL=https://app.netdata.cloud
|
- NETDATA_CLAIM_URL=https://app.netdata.cloud
|
||||||
networks:
|
networks:
|
||||||
- monitoring-net
|
- monitoring-net
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
profiles:
|
||||||
|
- netdata-manager
|
||||||
|
|
||||||
# Container Management
|
# Container Management
|
||||||
|
# --------------------------
|
||||||
|
# Portainer Manager
|
||||||
|
# --------------------------
|
||||||
portainer:
|
portainer:
|
||||||
image: portainer/portainer-ce:latest
|
image: portainer/portainer-ce:latest
|
||||||
container_name: portainer
|
container_name: portainer
|
||||||
@@ -45,9 +54,63 @@ services:
|
|||||||
- "private-pi:192.168.1.111"
|
- "private-pi:192.168.1.111"
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
|
profiles:
|
||||||
|
- portainer-manager
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Portainer Agent
|
||||||
|
# --------------------------
|
||||||
|
portainer_agent:
|
||||||
|
image: portainer/agent:latest
|
||||||
|
container_name: portainer_agent
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "9001:9001"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- portainer_agent_data:/data
|
||||||
|
networks:
|
||||||
|
- monitoring-net
|
||||||
|
profiles:
|
||||||
|
- portainer-agent
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Netdata Node (Agent)
|
||||||
|
# --------------------------
|
||||||
|
netdata_node:
|
||||||
|
image: netdata/netdata:latest
|
||||||
|
container_name: netdata_node
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "7003:19999"
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
- SYS_ADMIN
|
||||||
|
security_opt:
|
||||||
|
- apparmor:unconfined
|
||||||
|
volumes:
|
||||||
|
- netdata_config:/etc/netdata
|
||||||
|
- netdata_lib:/var/lib/netdata
|
||||||
|
- netdata_cache:/var/cache/netdata
|
||||||
|
- /proc:/host/proc:ro
|
||||||
|
- /sys:/host/sys:ro
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- /:/host/root:ro,rslave
|
||||||
|
- /etc/passwd:/host/etc/passwd:ro
|
||||||
|
- /etc/group:/host/etc/group:ro
|
||||||
|
- /etc/os-release:/host/etc/os-release:ro
|
||||||
|
environment:
|
||||||
|
- NETDATA_STREAM_PARENT=<MANAGER_IP> # set manager IP here
|
||||||
|
- NETDATA_CLAIM_TOKEN=${NETDATA_CLAIM_TOKEN:-}
|
||||||
|
- NETDATA_CLAIM_URL=https://app.netdata.cloud
|
||||||
|
networks:
|
||||||
|
- monitoring-net
|
||||||
|
profiles:
|
||||||
|
- netdata-node
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
portainer_data:
|
portainer_data:
|
||||||
|
portainer_agent_data:
|
||||||
netdata_config:
|
netdata_config:
|
||||||
netdata_lib:
|
netdata_lib:
|
||||||
netdata_cache:
|
netdata_cache:
|
||||||
|
|||||||
Reference in New Issue
Block a user