From 274e9c65ef9e79179c43aedf822cac50397ff655 Mon Sep 17 00:00:00 2001 From: Luca Zaninotto Date: Mon, 9 Dec 2024 16:20:03 +0100 Subject: [PATCH] chore(seeds): reconcile tenant when seeding - Reconciling tenant is done directly in seeds when it gets created - Edgehog in 5 minutes does no longer instruct users to manually reconcile the tenant with astarte Signed-off-by: Luca Zaninotto --- backend/priv/repo/seeds.exs | 2 ++ doc/pages/tutorials/edgehog_in_5_minutes.md | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/priv/repo/seeds.exs b/backend/priv/repo/seeds.exs index f93e77030..d27beb417 100644 --- a/backend/priv/repo/seeds.exs +++ b/backend/priv/repo/seeds.exs @@ -142,4 +142,6 @@ Astarte.create_realm!( tenant: tenant ) +Edgehog.Tenants.reconcile_tenant(tenant) + :ok diff --git a/doc/pages/tutorials/edgehog_in_5_minutes.md b/doc/pages/tutorials/edgehog_in_5_minutes.md index 14d287a6b..869ef9e9d 100644 --- a/doc/pages/tutorials/edgehog_in_5_minutes.md +++ b/doc/pages/tutorials/edgehog_in_5_minutes.md @@ -144,14 +144,6 @@ You can finally navigate to `http://edgehog.localhost` in your browser and login ## Test Astarte connection -Astarte connectivity may not work right away, as edgehog has not yet reconciled -its interfaces and triggers with astarte. Without waiting, we can force it to execute -the reconciler using: - -```sh -$ docker compose exec edgehog-backend bin/edgehog rpc "Edgehog.Tenants.list_tenants |> Enum.each(&Edgehog.Tenants.reconcile_tenant/1)" -``` - If you now connect a device to astarte and open or reload the edgehog web page, you should see the new device in the appropriate section.