From 3f3ba27ac9df5a45e4d3021ea43e9546b71e2cbd Mon Sep 17 00:00:00 2001 From: TheJoKlLa Date: Tue, 21 Sep 2021 16:26:51 +0200 Subject: [PATCH] Added Mosquitto Config --- config/bffh.dhall | 48 --------------------------------------------- config/pass.toml | 1 - config/roles.toml | 19 ------------------ config/users.toml | 11 ----------- docker-compose.yaml | 7 ++++++- 5 files changed, 6 insertions(+), 80 deletions(-) delete mode 100644 config/bffh.dhall delete mode 100644 config/pass.toml delete mode 100644 config/roles.toml delete mode 100644 config/users.toml diff --git a/config/bffh.dhall b/config/bffh.dhall deleted file mode 100644 index c1cc0a3..0000000 --- a/config/bffh.dhall +++ /dev/null @@ -1,48 +0,0 @@ --- { actor_connections = [] : List { _1 : Text, _2 : Text } -{ actor_connections = [{ _1 = "Testmachine", _2 = "Actor" }] -, actors = - { Actor = { module = "Shelly", params = {=} } - } - , init_connections = [] : List { _1 : Text, _2 : Text } ---, init_connections = [{ _1 = "Initiator", _2 = "Testmachine" }] -, initiators = - { Initiator = { module = "Dummy", params = {=} } - } -, listens = - [ { address = "::", port = Some 59661 } - ] -, machines = - { Testmachine = - { description = Some "A test machine" - , disclose = "lab.test.read" - , manage = "lab.test.admin" - , name = "Testmachine" - , read = "lab.test.read" - , write = "lab.test.write" - }, - Another = - { description = Some "Another test machine" - , disclose = "lab.test.read" - , manage = "lab.test.admin" - , name = "Another" - , read = "lab.test.read" - , write = "lab.test.write" - }, - Yetmore = - { description = Some "Yet more test machines" - , disclose = "lab.test.read" - , manage = "lab.test.admin" - , name = "Yetmore" - , read = "lab.test.read" - , write = "lab.test.write" - } - } -, mqtt_url = "tcp://mqtt:1883" -, db_path = "/tmp/bffh" -, roles = - { Testrole = - { parents = [] : List Text - , permissions = [] : List Text - } - } -} diff --git a/config/pass.toml b/config/pass.toml deleted file mode 100644 index 6d4855d..0000000 --- a/config/pass.toml +++ /dev/null @@ -1 +0,0 @@ -Testuser = "secret" diff --git a/config/roles.toml b/config/roles.toml deleted file mode 100644 index 2c91a30..0000000 --- a/config/roles.toml +++ /dev/null @@ -1,19 +0,0 @@ -[anotherrole] - -[testrole] -permissions = [ - "lab.test.*" -] - -[somerole] -parents = ["testparent/lmdb"] -permissions = [ - "lab.some.admin" -] - -[testparent] -permissions = [ - "lab.some.write", - "lab.some.read", - "lab.some.disclose", -] diff --git a/config/users.toml b/config/users.toml deleted file mode 100644 index 2d5ef75..0000000 --- a/config/users.toml +++ /dev/null @@ -1,11 +0,0 @@ -[Testuser] -# Define them in roles.toml as well -roles = ["somerole/lmdb", "testrole/lmdb"] - -# If two or more users want to use the same machine at once the higher prio -# wins -priority = 0 - -# You can add whatever random data you want. -# It will get stored in the `kv` field in UserData. -noot = "noot!" diff --git a/docker-compose.yaml b/docker-compose.yaml index 0b8de33..a814cf8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,8 +8,13 @@ services: - "59661:59661" volumes: # generate a sample config.toml by running "docker run registry.gitlab.com/fabinfra/fabaccess/bffh:dev-latest --print-default > examples/config.toml" from the project root. You may have to delete the ipv6 listen section. - - "./config:/etc/bffh" + - "./config/bffh:/etc/bffh" links: - mqtt mqtt: image: eclipse-mosquitto:1.6.13 + restart: always + ports: + - "1883:1883" + volumes: + - "./config/mosquitto:/mosquitto/config"