Skip to content

Commit 2239b1b

Browse files
authored
DOCS-3497: Update deploy software (#3980)
1 parent 4482c51 commit 2239b1b

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

docs/dev/reference/glossary/module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Module
33
id: module
44
full_link:
5-
short_description: A module provides one or more modular resources, which add resource types or models that are not built into Viam.
5+
short_description: A module is a code package which provides one or more modular resources, which add resource types or models that are not built into Viam.
66
---
77

8-
A _module_ provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add {{< glossary_tooltip term_id="resource" text="resource" >}} {{< glossary_tooltip term_id="type" text="types" >}} or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
8+
A _module_ is a code package which provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add {{< glossary_tooltip term_id="resource" text="resource" >}} {{< glossary_tooltip term_id="type" text="types" >}} or {{< glossary_tooltip term_id="model" text="models" >}} that are not built into Viam.
99
Modules run alongside `viam-server` as separate process, communicating with `viam-server` over UNIX sockets.
1010

1111
You can [create your own module](/operate/get-started/other-hardware/) or [add existing modules from the Viam Registry](/operate/get-started/supported-hardware/).

docs/manage/fleet/reuse-configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ languages: []
1515
viamresources: []
1616
platformarea: ["fleet"]
1717
level: "Beginner"
18-
date: "2024-08-09"
18+
date: "2025-02-07"
1919
# updated: "" # When the tutorial was last entirely checked
2020
next: /manage/fleet/provision/setup/
2121
cost: "0"
@@ -39,7 +39,7 @@ You must be an [organization owner](/manage/manage/rbac/) to create fragments fo
3939
Start by configuring one of your machines.
4040

4141
In the [Viam app](https://app.viam.com), use the **CONFIGURE** tab to build a configuration for all resources you want to use on all your machines.
42-
You can use all available resources except [triggers](/data-ai/data/advanced/alert-data/) in the configuration for your machine.
42+
You can use all available resources in the configuration for your machine except [triggers](/data-ai/data/advanced/alert-data/) which aren't supported.
4343
This means you can also use fragments inside a fragment.
4444

4545
{{<imgproc src="/how-tos/one-to-many/config.png" resize="800x" class="fill" style="width: 400px" declaredimensions=true alt="Configuration builder UI">}}
@@ -48,7 +48,7 @@ This means you can also use fragments inside a fragment.
4848
{{% tablestep %}}
4949
**2. Copy the raw JSON**
5050

51-
In your machine's **CONFIGURE** tab, switch to **JSON** and copy the raw JSON.
51+
In your machine's **CONFIGURE** tab, switch to **JSON** and copy the raw JSON configuration object.
5252

5353
{{<imgproc src="/how-tos/one-to-many/raw-json.png" resize="700x" class="fill" style="width: 400px" declaredimensions=true alt="JSON subtab of the CONFIGURE tab">}}
5454

@@ -79,7 +79,7 @@ If you want to edit the fragment later, do it from this screen.
7979
**4. Delete the original configuration (optional)**
8080

8181
Now that the configuration is saved as a fragment, you can delete each resource in the original config from your machine and _replace the config with the fragment_ in the next step.
82-
By using the new fragment, all your machines will use the exact same configuration.
82+
By using the new fragment, this and every other machine you add the fragment to will use the exact same configuration.
8383

8484
{{% /tablestep %}}
8585
{{< /table >}}
@@ -88,7 +88,7 @@ By using the new fragment, all your machines will use the exact same configurati
8888

8989
With your fragment created, you can add it to all machines that should have it.
9090

91-
In the following, you will see how to add a fragment manually. If you are working in a factory setting and need to set up devices before they reach the end user, you can also fragments while [provisioning](/manage/fleet/provision/setup/) your fleet.
91+
In the following steps, you will see how to add a fragment manually. If you are working in a factory setting and need to set up devices before they reach the end user, you can also use fragments to [provision](/manage/fleet/provision/setup/) your machines.
9292

9393
{{< table >}}
9494
{{% tablestep %}}

docs/manage/software/deploy-software.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 30
55
layout: "docs"
66
type: "docs"
77
images: ["/registry/module-puzzle-piece.svg"]
8-
description: You can use a fragment to deploy software packages and ML models to many machines, as well as to update deployed versions of those software packages and ML models.
8+
description: "Deploy code packages with machine control logic to one or more machines."
99
languages: []
1010
viamresources: []
1111
platformarea: ["registry", "fleet"]
@@ -18,26 +18,27 @@ aliases:
1818
cost: "0"
1919
---
2020

21-
To deploy code or other software to individual machines:
21+
{{< glossary_tooltip term_id="module" text="Modules" >}} are code packages that provide most of the functionality on your machines: drivers, integrations, and control logic.
22+
23+
The following steps show you how to create modules with control logic and how to deploy and manage all of your machine's modules over the air (OTA):
2224

2325
1. [Create a module with machine control logic](#create-a-module-with-machine-control-logic)
24-
2. [Create a fragment with the configuration for your machines](#create-a-fragment)
25-
3. [Add the fragment to your machines](#add-the-fragment-to-your-machines)
26+
2. [Create a configuration fragment with the modules for your machine](#create-a-fragment)
27+
3. [Add the fragment to one or more machines](#add-the-fragment-to-your-machines)
2628

2729
## Prerequisites
2830

29-
This guide assumes that you have [at least one machine](/operate/get-started/setup/) with [configured hardware and software resources](/operate/get-started/supported-hardware/).
31+
Start by [setting up one machine](/operate/get-started/setup/).
32+
Then, [configure any hardware and software resources](/operate/get-started/supported-hardware/) that you will use with your machine and that you want to drive with your control logic.
3033

3134
## Create a module with machine control logic
3235

33-
You can operate devices by running control logic on another device, for example using an app, or on the machine itself using a {{< glossary_tooltip term_id="module" text="module" >}}.
34-
If all your machine control logic runs on another device or server, move on to [Create a fragment](#create-a-fragment).
35-
36-
If at least some of your machine control logic should run on your machine, place the control logic in a module by following these steps:
36+
One method of operating your machine is by running control logic on another device, such as an app.
37+
With {{< glossary_tooltip term_id="module" text="modules" >}}, you can run your control logic on the machine itself.
3738

3839
{{% alert title="OTA updates for microcontrollers" color="note" %}}
39-
The following steps do not cover how to create a module with machine control logic for microcontrollers.
40-
For microcontrollers, see [Micro-RDK modules](/operate/get-started/other-hardware/micro-module/) and [Over-the-air firmware updates](/operate/get-started/other-hardware/micro-module/#over-the-air-updates) instead.
40+
The following steps cover how to create a module for machines running `viam-server`.
41+
For microcontrollers, see [Micro-RDK modules](/operate/get-started/other-hardware/micro-module/) and [Over-the-air firmware updates](/operate/get-started/other-hardware/micro-module/#over-the-air-updates).
4142
{{% /alert %}}
4243

4344
{{< table >}}
@@ -79,7 +80,7 @@ When your new model gets added to your machine, its `reconfigure()` method gets
7980
If you want your control logic to run in a loop in the background, you can start this loop here.
8081
Be sure to also implement logic to handle subsequent calls to the reconfigure method gracefully.
8182

82-
For example, in Python, start your logic in <FILE>src/main.py</FILE>:
83+
For example, in Python, start your logic in the `reconfigure()` method of <FILE>src/main.py</FILE>:
8384

8485
```python {class="line-numbers linkable-line-numbers" data-line="20-28"}
8586
# Add these imports
@@ -168,7 +169,7 @@ For complete examples that implement control logic, see:
168169
- [`event-manager`](https://github.com/viam-modules/event-manager)
169170
- [`refill-controller`](https://github.com/viam-devrel/refill-controller)
170171
- [`re-id-object-tracking`](https://github.com/viam-modules/re-id-object-tracking)
171-
- [`detectio-dock`](https://github.com/viam-labs/detection-dock)
172+
- [`detection-dock`](https://github.com/viam-labs/detection-dock)
172173

173174
{{% /tablestep %}}
174175
{{% tablestep link="/operate/get-started/other-hardware/manage-modules/#update-an-existing-module-using-a-github-action" %}}
@@ -189,18 +190,18 @@ Your module will now be built, packaged and pushed to the Viam Registry.
189190
## Create a fragment
190191

191192
Viam has a built-in tool called _{{< glossary_tooltip term_id="fragment" text="fragments" >}}_ for using the same configuration on multiple machines.
192-
When deploying or updating software on many machines, you should use fragments.
193+
When deploying or updating software on many machines, you should use fragments to deploy your modules OTA to your machines.
193194

194-
The following example creates a fragment with a camera and a servo, as well as with the [control logic module](#create-a-module-with-machine-control-logic).
195+
The following example starts with a machine with a camera and a servo and adds the [control logic module](#create-a-module-with-machine-control-logic).
196+
The resulting machine configuration gets used to create the fragment for reuse on other machines.
195197

196198
{{< table >}}
197199
{{% tablestep link="/operate/get-started/supported-hardware/" %}}
198200
**1. Configure your software**
199201

200202
Go to your [machine](#prerequisites) in the [Viam app](https://app.viam.com).
201-
Ensure all hardware and other resources your machine uses are configured.
202203

203-
Add your control logic module.
204+
Then add your control logic module.
204205

205206
{{<imgproc src="/how-tos/deploy-packages/add-package.png" resize="800x" class="fill aligncenter" style="width: 500px" declaredimensions=true alt="Configuration builder UI">}}
206207

@@ -265,7 +266,7 @@ We only created this machine to easily generate the JSON config for the fragment
265266

266267
## Add the fragment to your machines
267268

268-
Generally, you will use [provisioning](/manage/fleet/provision/setup/) to add this fragment to your machines.
269+
Generally, fragments are used with [provisioning](/manage/fleet/provision/setup/) to deploy and manage softwareon many machines.
269270

270271
You can also add the fragment manually to the machines that need it:
271272

0 commit comments

Comments
 (0)