...
Now create a file with the name .env
in the repo root folder:
Code Block |
---|
my-docker-repo._azurecr._io_USERNAME=username my-docker-repo._azurecr._io_PASSWORD=password |
Please note that you need to replace dots (.) with underscores (_) in the hostname of the respository in the .env file
This file will contain credentials for your container registry. Note that this file is not saved in .git to prevent credentials being stored in version control.
You also need to login to docker repo if you haven’t done it already:
docker login my-docker-repo.azurecr.io -u username -p password
Now your module is ready to be built.
...
In other words, for each change in your local files, a new image will be built and a patch version of the image will be increased: 0.0.1 -> 0.0.2 -> 0.0.3 etc. After you commit your changes, a minor version will be bumped instead: 0.0.3->0.1.0.
Now, before you push your new module to the device you’ll need to build the settings schema for it. Settings schema is a specification for the form that will be displayed in a list of modules on the device configuration page.
yarn schema
Now after the settings are built, it is time to deploy your module.
First, you’ll need to know your what you’ll need next is your device name. Device names have org-name.device-name
format. To see all devices that are available for you, just run omg dev list
. Lets assume your device name is acme.my-device
.
Now that you know your device name, run Lets deploy your module by running this command:
omg module yarn deploy acme.my-device
The module is now saved in the device configuration, along with its configuration files and settings schema.
Note that the module is not yet being installed on the device because it is not enabled yet. To enable the module, go to your device page in the grid console, find an entry for your new module, and click the ‘enabled’ checkbox. You can also specify additional parameters for the module. List of parameters and their type are defined by settings schema in schema.ts
file.
Monitoring
Now, after you have enabled the module, it will be downloaded and started on the device. To monitor current status of the module run omg dev modules <devicename>
.
...