Skip to content

Commit

Permalink
Address latest feedback and add GIF
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT committed Aug 8, 2024
1 parent 1f08a33 commit 6a89425
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 17 deletions.
Binary file added assets/use-cases/one-to-many/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion assets/use-cases/one-to-many/edit.svg

This file was deleted.

1 change: 0 additions & 1 deletion assets/use-cases/one-to-many/trash-can.svg

This file was deleted.

4 changes: 2 additions & 2 deletions docs/fleet/control.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Control Machines"
linkTitle: "Control Machines"
title: "Machine Control Interface"
linkTitle: "Control Interface"
weight: 45
type: "docs"
description: "A machine is an organizational concept, consisting of either one or multiple parts working closely together to complete tasks."
Expand Down
18 changes: 11 additions & 7 deletions docs/fleet/fragments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Use Fragments to Configure a Fleet of Machines"
linkTitle: "Configure a Fleet"
title: "Configuration Fragments"
linkTitle: "Fragments"
weight: 40
type: "docs"
description: Use fragments to configure many machines at the same time.
Expand All @@ -9,10 +9,6 @@ aliases:
- /fleet/configure-a-fleet/
---

{{< cards >}}
{{% card link="/use-cases/one-to-many/" %}}
{{< /cards >}}

If you have multiple machines with similar configurations, you can use a _fragment_ to configure all of the machines at the same time.
Fragments are a way of sharing and managing [machine configurations](/configure/) across multiple machines.

Expand All @@ -22,7 +18,7 @@ For example, if you have multiple similar rovers but one has an arm attached, yo

When you or one of your collaborators edit a fragment that you've already deployed to one or more machines, the Viam app updates the configuration on each deployed machine that uses that fragment.

{{< alert title="Alert" color="alert" >}}
{{< alert title="Alert" color="caution" >}}
Be cautious when making changes to fragments that have been deployed to production machines.
We recommend that you create a duplicate fragment, make your desired change to that second fragment, and then deploy that fragment to a test machine that is configured identically to your production machines.

Expand All @@ -37,6 +33,14 @@ You must be an [organization owner](/cloud/rbac/#permissions) to create fragment
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.

## Create and use a fragment

Get started with this how-to guide:

{{< cards >}}
{{% card link="/use-cases/one-to-many/" %}}
{{< /cards >}}

## Modify the config of a machine that uses a fragment

When you add a fragment to a machine, the configuration of components and services included in a fragment are _read-only_.
Expand Down
2 changes: 1 addition & 1 deletion docs/fleet/provision.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Provision Machines Using the Viam Agent"
linkTitle: "Provision Machines"
linkTitle: "Provisioning Machines"
weight: 70
type: "docs"
description: "Flexibly provision new machines using the Viam Agent."
Expand Down
13 changes: 8 additions & 5 deletions docs/use-cases/one-to-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ If you want to edit the fragment later, do it from this screen.

{{% /tablestep %}}
{{% tablestep %}}
{{<imgproc src="/use-cases/one-to-many/trash-can.svg" class="fill alignleft" style="max-width: 50px" declaredimensions=true alt="Delete">}}
{{<imgproc src="/use-cases/one-to-many/delete.png" class="fill alignleft" resize="500x" style="max-width: 200px" declaredimensions=true alt="Delete">}}
**3. Delete the original configuration (optional)**

Now that the configuration is saved as a fragment, you can delete the original config from your machine and _replace it with the fragment_ in the next step.
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.
In this way, you can keep all your machines up to date whenever you change the fragment.

{{% /tablestep %}}
Expand All @@ -80,7 +80,7 @@ With your fragment created, you can add it to as many machines as you'd like:

{{< table >}}
{{% tablestep %}}
{{<imgproc src="appendix/try-viam/rover-resources/fragments/fragments_list.png" resize="800x" class="fill alignleft" style="max-width: 300px" declaredimensions=true alt="Add fragment">}}
{{<imgproc src="appendix/try-viam/rover-resources/fragments/fragments_list.png" resize="800x" class="fill alignleft imgzoom" style="max-width: 250px" declaredimensions=true alt="Add fragment">}}
**1. Add the fragment to one machine**

On your machine's **CONFIGURE** tab, click the **+** button and select **Insert fragment**.
Expand Down Expand Up @@ -111,10 +111,13 @@ If you later update the upstream fragment, the updates to the overwritten fields

{{< table >}}
{{% tablestep link="/fleet/fragments/#modify-the-config-of-a-machine-that-uses-a-fragment" %}}
{{<imgproc src="/use-cases/one-to-many/edit.svg" class="fill alignleft" style="max-width: 50px" declaredimensions=true alt="Edit">}}
{{<gif webm_src="/how-tos/fragment-overwrite.webm" mp4_src="/how-tos/fragment-overwrite.mp4" alt="A robot drawing a heart" max-width="500px" class="aligncenter" >}}

**1. Edit your machine's config**

Go to the **CONFIGURE** tab of the machine whose config you want to modify, and make your edits.
Go to the **CONFIGURE** tab of the machine whose config you want to modify, and make your edits just as you would edit a non-fragment resource.

You can click the **{}** button to switch to advanced view and see the changes.

Don't forget to **Save**.

Expand Down
Binary file added static/how-tos/fragment-overwrite.mp4
Binary file not shown.
Binary file added static/how-tos/fragment-overwrite.webm
Binary file not shown.

0 comments on commit 6a89425

Please sign in to comment.