Add labs
This commit is contained in:
9
04-mosquitto/lab11/0-duplicate/alpha/mosquitto.conf
Normal file
9
04-mosquitto/lab11/0-duplicate/alpha/mosquitto.conf
Normal file
@ -0,0 +1,9 @@
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection beta
|
||||
try_private false
|
||||
address localhost:1884
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
2
04-mosquitto/lab11/0-duplicate/beta/mosquitto.conf
Normal file
2
04-mosquitto/lab11/0-duplicate/beta/mosquitto.conf
Normal file
@ -0,0 +1,2 @@
|
||||
listener 1884
|
||||
listener_allow_anonymous true
|
||||
11
04-mosquitto/lab11/0-duplicate/docker-compose.yml
Normal file
11
04-mosquitto/lab11/0-duplicate/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
alpha:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./alpha/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
beta:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./beta/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
9
04-mosquitto/lab11/1-unique/alpha/mosquitto.conf
Normal file
9
04-mosquitto/lab11/1-unique/alpha/mosquitto.conf
Normal file
@ -0,0 +1,9 @@
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection beta
|
||||
# try_private true
|
||||
address localhost:1884
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
2
04-mosquitto/lab11/1-unique/beta/mosquitto.conf
Normal file
2
04-mosquitto/lab11/1-unique/beta/mosquitto.conf
Normal file
@ -0,0 +1,2 @@
|
||||
listener 1884
|
||||
listener_allow_anonymous true
|
||||
11
04-mosquitto/lab11/1-unique/docker-compose.yml
Normal file
11
04-mosquitto/lab11/1-unique/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
alpha:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./alpha/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
beta:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./beta/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
9
04-mosquitto/lab11/2-bidi-unique/alpha/mosquitto.conf
Normal file
9
04-mosquitto/lab11/2-bidi-unique/alpha/mosquitto.conf
Normal file
@ -0,0 +1,9 @@
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection beta
|
||||
try_private false
|
||||
address localhost:1884
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
11
04-mosquitto/lab11/2-bidi-unique/beta/mosquitto.conf
Normal file
11
04-mosquitto/lab11/2-bidi-unique/beta/mosquitto.conf
Normal file
@ -0,0 +1,11 @@
|
||||
listener 1884
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection alpha
|
||||
try_private true
|
||||
address localhost:1883
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
|
||||
|
||||
11
04-mosquitto/lab11/2-bidi-unique/docker-compose.yml
Normal file
11
04-mosquitto/lab11/2-bidi-unique/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
alpha:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./alpha/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
beta:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./beta/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
9
04-mosquitto/lab11/3-bidi-loop/alpha/mosquitto.conf
Normal file
9
04-mosquitto/lab11/3-bidi-loop/alpha/mosquitto.conf
Normal file
@ -0,0 +1,9 @@
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection beta
|
||||
try_private true
|
||||
address localhost:1884
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
10
04-mosquitto/lab11/3-bidi-loop/beta/mosquitto.conf
Normal file
10
04-mosquitto/lab11/3-bidi-loop/beta/mosquitto.conf
Normal file
@ -0,0 +1,10 @@
|
||||
listener 1884
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection alpha
|
||||
try_private false
|
||||
address localhost:1883
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
|
||||
11
04-mosquitto/lab11/3-bidi-loop/docker-compose.yml
Normal file
11
04-mosquitto/lab11/3-bidi-loop/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
alpha:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./alpha/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
beta:
|
||||
image: eclipse-mosquitto
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./beta/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
42
04-mosquitto/lab11/lab.txt
Normal file
42
04-mosquitto/lab11/lab.txt
Normal file
@ -0,0 +1,42 @@
|
||||
= Loops (lab11)
|
||||
|
||||
Konfigurieren Sie zwei Bridges "alpha" und "beta", die miteinander über verschiedene
|
||||
Ports verbunden sind.
|
||||
Starten Sie mit einer unidirektionalen Bridge ("beta" als reiner Broker),
|
||||
deaktivieren Sie `try_private` und mappen local/# nach remote: local/# und umgekehrt.
|
||||
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection beta
|
||||
try_private false
|
||||
address localhost:1884
|
||||
|
||||
topic # out 1 local/ local/
|
||||
topic # in 1 local/ local/
|
||||
...
|
||||
listener 1884
|
||||
listener_allow_anonymous true
|
||||
|
||||
|
||||
$ docker run --rm -it --init --net host -v $PWD/alpha:/mosquitto/config eclipse-mosquitto
|
||||
$ docker run --rm -it --init --net host -v $PWD/beta:/mosquitto/config eclipse-mosquitto
|
||||
|
||||
Senden Sie eine Testnachricht nach `local/loop`.
|
||||
|
||||
$ docker run --rm -it --init --net host eclipse-mosquitto \
|
||||
mosquitto_sub --port 1883 --qos 1 --topic '#' --debug
|
||||
|
||||
$ docker run --rm -it --init --net host eclipse-mosquitto \
|
||||
mosquitto_pub --qos 1 --topic 'local/loop' --message "demo" --debug
|
||||
|
||||
Erstellen Sie eine Bridge von "beta" zu "alpha" mit gleicher Konfiguration
|
||||
|
||||
|
||||
Testen Sie `try_private`, nicht überlappende Hierarchien als Lösungen.
|
||||
|
||||
|
||||
try_private true
|
||||
|
||||
topic # out 1 cloud/ local/
|
||||
topic # in 1 local/ cloud/
|
||||
Reference in New Issue
Block a user