Skip to content

Commit

Permalink
DOCS-2257: Document merged Viam agent (#2922)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyleilani authored and npentrel committed May 23, 2024
1 parent 82ef6bd commit 9f8ea08
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 73 deletions.
38 changes: 18 additions & 20 deletions docs/data/trigger-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,26 +218,24 @@ On your machine's **CONFIGURE** tab, switch to **JSON** mode and add a `selectiv
"type": "data_manager"
}
],
"agent_config": {
"subsystems": {
"viam-server": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
},
"agent-provisioning": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
},
"viam-agent": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
}
"agent": {
"viam-server": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
},
"agent-provisioning": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
},
"viam-agent": {
"release_channel": "stable",
"pin_version": "",
"pin_url": "",
"disable_subsystem": false
}
},
"modules": [
Expand Down
6 changes: 0 additions & 6 deletions docs/fleet/configure-a-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ You must be an [organization owner](/fleet/rbac/#permissions) in order to create
A fragment can define one, several, or all resources on a machine.
You can add multiple fragments to a single machine, and you can add additional resources to a machine that has already been configured with a fragment.

{{% alert title="Support Notice" color="note" %}}

While you can [use the Viam Agent to deploy a fragment](/fleet/provision/#use-a-provisioning-configuration-file) to your machine or fleet, you cannot configure the Viam Agent itself using fragments.

{{% /alert %}}

## Create a fragment

Before you create a fragment, you'll need a JSON configuration file.
Expand Down
68 changes: 29 additions & 39 deletions docs/fleet/provision.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,35 +151,33 @@ This provisioning functionality uses the [Viam Agent provisioning subsystem](htt

If you specify a WiFi network to connect to in your configuration file, the Viam Agent will automatically connect to that network when in range.

You can configure one or more WiFi networks to connect to in the `agent_config` configuration object in your `viam-server` configuration file.
You can configure one or more WiFi networks to connect to in the `agent` configuration object in your `viam-server` configuration file.
For example, to configure SSIDs and passwords for two WiFi networks named `primaryNet` and `fallbackNet`, you can use the following configuration:

```json {class="line-numbers linkable-line-numbers"}
...
"agent_config": {
"subsystems": {
"agent-provisioning": {
"agent": {
"agent-provisioning": {
...
"attributes": {
...
"attributes": {
...
"networks": [
{
"type": "wifi",
"ssid": "primaryNet",
"psk": "myFirstPassword",
"priority": 30
},
{
"type": "wifi",
"ssid": "fallbackNet",
"psk": "mySecondPassword",
"priority": 10
}
]
}
}
}
}
"networks": [
{
"type": "wifi",
"ssid": "primaryNet",
"psk": "myFirstPassword",
"priority": 30
},
{
"type": "wifi",
"ssid": "fallbackNet",
"psk": "mySecondPassword",
"priority": 10
}
]
}
}
}
```

You can add this configuration to the <file>/etc/viam.json</file> configuration file you deploy to your machine, or from the **CONFIGURE** tab in the [Viam app](https://app.viam.com/) for your machine, using **Raw JSON** mode.
Expand All @@ -195,20 +193,18 @@ If you did not include a `viam-server` configuration file on your machine, or no
By default, the hotspot network is named `viam-setup-HOSTNAME`, where `HOSTNAME` is replaced with the hostname of your machine.
The WiFi password for this network is `viamsetup` by default.

You can customize these values in the `agent_config` configuration object in your `viam-server` configuration file.
You can customize these values in the `agent` configuration object in your `viam-server` configuration file.
For example, to set the hotspot password to `acme123`, you can use the following configuration:

```json {class="line-numbers linkable-line-numbers"}
...
"agent_config": {
"subsystems": {
"agent-provisioning": {
"agent": {
"agent-provisioning": {
...
"attributes": {
"hotspot_password": "acme123"
...
"attributes": {
"hotspot_password": "acme123"
...
}
}
}
}
}
```
Expand Down Expand Up @@ -252,12 +248,6 @@ To provision your machine, create a <file>/etc/viam-provisioning.json</file> con

This file configures some basic metadata, specifies a [fragment](/fleet/configure-a-fleet/) to use to configure the machine, and provides the WiFi network name and password to allow your machine to connect automatically on startup.

{{% alert title="Support Notice" color="note" %}}

You cannot configure the Viam Agent itself using fragments.

{{% /alert %}}

## Use the Viam mobile app

You can use the [Viam mobile application](/fleet/#the-viam-mobile-app), available for download from the [Apple](https://apps.apple.com/us/app/viam-robotics/id6451424162) and [Google Play](https://play.google.com/store/apps/details?id=com.viam.viammobile&hl=en&gl=US) app stores, to connect to the Viam Agent on deployed machines.
Expand Down
10 changes: 2 additions & 8 deletions docs/tutorials/control/air-quality-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,8 @@ In any case, now that the JSON is generated, you are ready to create a {{< gloss
2. Navigate to the **FLEET** page and click [**Fragments**](https://app.viam.com/fragments) at the bottom of the left nav.
3. Type in a name for your fragment, such as `air-sensing-machine` and click **Add fragment**.
4. Replace the empty curly braces `{}` with the config you copied from your machine.
5. Because the [Viam Agent](/fleet/provision/) config auto-populates into every machine's config, and configuring the agent using a fragment isn't supported, you do not need to include it in the fragment.

Delete the entire `agent_config` section including the comma just above it:

![The section of the raw JSON that you should delete: the entire agent section.](/tutorials/air-quality-fleet/delete-agent-config.png)

6. Click **Save fragment**.
7. Now, you can actually delete the entire config from your machine!
5. Click **Save fragment**.
6. Now, you can actually delete the entire config from your machine!
In the next section, you will replace it with the fragment you just created so that it gets updated alongside all your other machines when you update the fragment in the future.

Navigate back to your machine's **CONFIGURE** tab, select **JSON** mode, and delete the entire contents of the config.
Expand Down

0 comments on commit 9f8ea08

Please sign in to comment.