Skip to content

Commit

Permalink
Update networking and port configuration
Browse files Browse the repository at this point in the history
 - Grafana port exposed with host mode to bypass the swarm routing mesh
 - Loki plugin forwarder to use swarm routing mesh from swarm worker nodes
  • Loading branch information
Jozef Volak authored and marosmars committed Mar 21, 2023
1 parent baa7430 commit 8302b27
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
12 changes: 8 additions & 4 deletions composefiles/support/swarm-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.7"
x-logging: &logging_loki
driver: loki
options:
loki-url: "http://${MANAGER_IP_ADDR}:3100/loki/api/v1/push"
loki-url: "http://127.0.0.1:3100/loki/api/v1/push"
max-file: "3"
max-size: "10m"
mode: non-blocking
Expand Down Expand Up @@ -75,7 +75,9 @@ services:
cpus: ${MG_RES_LIMIT_CPUS}
memory: ${MG_RES_LIMIT_MEM}
ports:
- 3000:3000
- target: 3000
published: 3000
mode: host

loki:
image: grafana/loki:2.2.1
Expand Down Expand Up @@ -119,8 +121,9 @@ services:
cpus: ${ML_RES_LIMIT_CPUS}
memory: ${ML_RES_LIMIT_MEM}
ports:
- 3100:3100

- target: 3100
published: 3100

influxdb:
image: influxdb:2.1
logging: *logging_loki
Expand Down Expand Up @@ -258,3 +261,4 @@ volumes:
networks:
default:
name: frinx-machine
driver: overlay
3 changes: 2 additions & 1 deletion composefiles/swarm-uniconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: "3.7"
x-logging: &logging_loki
driver: loki
options:
loki-url: "http://${MANAGER_IP_ADDR}:3100/loki/api/v1/push"
loki-url: "http://127.0.0.1:3100/loki/api/v1/push"
max-file: "3"
max-size: "10m"
mode: non-blocking
Expand Down Expand Up @@ -308,6 +308,7 @@ volumes:
networks:
default:
name: frinx-machine
driver: overlay

uniconfig-network:
name: uniconfig-network
3 changes: 2 additions & 1 deletion composefiles/swarm-unistore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: "3.7"
x-logging: &logging_loki
driver: loki
options:
loki-url: "http://${MANAGER_IP_ADDR}:3100/loki/api/v1/push"
loki-url: "http://127.0.0.1:3100/loki/api/v1/push"
max-file: "3"
max-size: "10m"
mode: non-blocking
Expand Down Expand Up @@ -181,3 +181,4 @@ secrets:
networks:
default:
name: frinx-machine
driver: overlay
3 changes: 2 additions & 1 deletion composefiles/swarm-workflow-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "3.7"
x-logging: &logging_loki
driver: loki
options:
loki-url: "http://${MANAGER_IP_ADDR}:3100/loki/api/v1/push"
loki-url: "http://127.0.0.1:3100/loki/api/v1/push"
max-file: "3"
max-size: "10m"
mode: non-blocking
Expand Down Expand Up @@ -571,3 +571,4 @@ volumes:
networks:
default:
name: frinx-machine
driver: overlay
7 changes: 0 additions & 7 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ function startContainers {

setUniconfigZoneEnv
setNodeIdLocalDeploy
setManagerIpAddrEnv

case $startupType in
workflow-manager)
Expand Down Expand Up @@ -452,12 +451,6 @@ function setProxyEnv {
}


function setManagerIpAddrEnv {
MANAGER_IP_ADDR=$(hostname -I | cut -d ' ' -f 1)
export MANAGER_IP_ADDR
}


function addEnvToFile {
unset __old_env_var
unset __new_env_var
Expand Down

0 comments on commit 8302b27

Please sign in to comment.