Setup the environment
Open the .env file in your favorite text editor.
Here you can edit docker's variables to match your current environment.
Right now we're only interested in the SEEDS_* variables, which are used to populate the database.
| Variable | Description |
|---|---|
SEEDS_REALM | The name of your Astarte realm. It should match what you've created in your Astarte setup |
SEEDS_REALM_PRIVATE_KEY_FILE | The location of the realm's private key file (test_private.pem from the Astarte in 5 minutes guide) |
SEEDS_TENANT_PRIVATE_KEY_FILE | The location of the tenant's private key file |
SEEDS_ASTARTE_BASE_API_URL | The endpoint for Astarte API. |
If for whatever reason you don't want to edit the .env file, you can also export
environment variables of the same name.
SEEDS_REALM and SEEDS_ASTARTE_BASE_API_URL should already be set for you, so only edit those if
needed.
SEEDS_REALM_PRIVATE_KEY_FILE must point to the private key of the test realm you created in
Astarte. If you followed the "Astarte in 5 minutes" guide, astartectl generated the key as
test_private.pem in the Astarte repository, so set this variable to its full path, for example
../astarte/test_private.pem. Keeping the default value (the bundled realm_private.pem) would
prevent Device Manager from communicating with your Astarte instance.
Generate a key pair for the tenant
Although it is possible to use a default key, it is recommended to have your own key pair for the tenant.
You should already have astartectl installed from the Astarte in 5 minutes guide.
astartectl utils gen-keypair acme
Remember to update the .env file with the acme_private.pem location!