Manage and deploy code versions
While Viam provides built-in support for a variety of components and services, you can use modules to extend support for any hardware components or software services, across both industrial and consumer domains, whether proprietary or not.
Modules allow you to write and deploy custom code to your machine or fleet of machines, with robust control over how changes to your module’s code are distributed to deployed machines.
You can choose to develop your module locally, and deploy to your machine directly using a local module installation, or you can upload your module to the Viam registry, making it easy to deploy to all of your machines. Further, you can determine the accessibility of your module when you upload it - either keeping it private for exclusive access within your organization or making it public for availability to all Viam users.
When you deploy a module, whether its one you’ve written yourself or added from the registry, you maintain complete control over how that module’s code is deployed to your machine when new updates to the module are available.
|1. Search modules
Once you have created a machine in the Viam app, search for modules in the Viam registry that fit your machine's requirements, and then add a module from your machine's configuration page in the Viam app.
|2. Create your own module
Or, you can create your own module to add support for new hardware, or to extend an existing software service.
|3. Deploy your module
Once you have created your new module, you can deploy it to your machine in one of two ways:
If your machine is offline when you deploy a module, it will deploy once your machine comes back online.
|4. Configure your module
Once you've deployed a module to your machine or fleet, configure the module to set any necessary attributes it may require.
You can also configure how a deployed module updates itself when new versions of that module become available from the Viam registry. You can choose to always update to the latest version as soon as it becomes available, pin to a specific code revision and never update it, or upgrade only within a specified major or minor version.
|5. Update your module
When you make code changes to your module, you can update your module with those changes using the Viam CLI. You can also use a GitHub action to automate module releases as part of a continuous integration (CI) workflow.
These options make it easy to push changes to a fleet of machines.
Have questions, or want to meet other people working on robots? Join our Community Discord.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better: