Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove manual install option
Browse files Browse the repository at this point in the history
npentrel authored Oct 18, 2024
1 parent c813e77 commit c68aa94
Showing 1 changed file with 2 additions and 98 deletions.
100 changes: 2 additions & 98 deletions docs/how-tos/provision-setup.md
Original file line number Diff line number Diff line change
@@ -175,12 +175,8 @@ Create a file called <FILE>/etc/viam-provisioning.json</FILE> with the following
`viam-agent` is a self-updating service manager that maintains the lifecycle for several Viam services and keeps them updated.
If you intend to use `viam-agent` to keep your device's Viam software up-to-date or to use its provisioning plugin to let end users set up their own machines, you need to use `viam-agent` and install it on the machine before sending it to the user.

You can [install `viam-agent` on live systems](/installation/viam-server-setup/) or preinstall it:

{{< tabs >}}
{{% tab name="Preinstall on an SD card (or other image)" %}}

Viam provides a preinstall script that works with images to add `viam-agent`.
You can [install `viam-agent` on live systems](/installation/viam-server-setup/) or preinstall it.
The following instructions will preinstall it using a preinstall script that adds `viam-agent` to images:

{{< alert title="Support notice" color="note" >}}
Please note this script works only under POSIX (MacOS and Linux) at the moment.
@@ -307,98 +303,6 @@ sudo ./preinstall.sh /path/to/rootfs
{{< /tablestep >}}
{{< /table >}}

{{% /tab %}}
{{% tab name="Manual install" %}}

{{< table >}}
{{< tablestep >}}
**1. Create and download files**

As root on the target device, run the following commands to create directories for the provisioning binaries, then download the binaries and make them executable:

{{< tabs >}}
{{% tab name="x86_64" %}}

```sh {class="command-line" data-prompt="$"}
mkdir -p /opt/viam/bin/ /opt/viam/tmp/
curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent/viam-agent-stable-x86_64 -o /opt/viam/tmp/viam-agent-stable-x86_64
curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent-provisioning/viam-agent-provisioning-stable-x86_64 -o /opt/viam/tmp/viam-agent-provisioning-stable-x86_64
chmod 755 /opt/viam/tmp/viam-agent*
```

{{% /tab %}}
{{% tab name="aarch64" %}}

```sh {class="command-line" data-prompt="$"}
mkdir -p /opt/viam/bin/ /opt/viam/tmp/
curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent/viam-agent-stable-aarch64 -o /opt/viam/tmp/viam-agent-stable-aarch64
curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent-provisioning/viam-agent-provisioning-stable-aarch64 -o /opt/viam/tmp/viam-agent-provisioning-stable-aarch64
chmod 755 /opt/viam/tmp/viam-agent*
```

{{% /tab %}}
{{< /tabs >}}

{{< /tablestep >}}
{{< tablestep >}}
**2. Symlink the binaries**

Symlink the two binaries:

{{< tabs >}}
{{% tab name="x86_64" %}}

```sh {class="command-line" data-prompt="$"}
cd /opt/viam/bin
ln -s ../tmp/viam-agent-stable-x86_64 viam-agent
ln -s ../tmp/viam-agent-provisioning-stable-x86_64 agent-provisioning
```

{{% /tab %}}
{{% tab name="aarch64" %}}

```sh {class="command-line" data-prompt="$"}
cd /opt/viam/bin
ln -s ../tmp/viam-agent-stable-aarch64 viam-agent
ln -s ../tmp/viam-agent-provisioning-stable-aarch64 agent-provisioning
```

{{% /tab %}}
{{< /tabs >}}

{{< /tablestep >}}
{{< tablestep >}}
**3. Create the systemd service file**

Copy the systemd [service file](https://github.com/viamrobotics/agent/blob/main/subsystems/viamagent/viam-agent.service) from the agent repo to `/etc/systemd/system/viam-agent.service`.

Then, symlink the service file to <FILE>/etc/systemd/system/multi-user.target.wants/viam-agent.service</FILE>

```sh {class="command-line" data-prompt="$"}
curl -fsSL https://github.com/viamrobotics/agent/raw/main/subsystems/viamagent/viam-agent.service -o /etc/systemd/system/viam-agent.service
ln -s /etc/systemd/system/viam-agent.service /etc/systemd/system/multi-user.target.wants/viam-agent.service
```

And when you're ready, start the service with `systemctl start viam-agent.service`.

{{< /tablestep >}}
{{< tablestep >}}
**4. Ensure NetworkManager is installed**

Make sure NetworkManager version 1.42 or newer is installed and enabled in `systemd`.

{{< /tablestep >}}
{{< tablestep >}}

If you create a provisioning file, the file must be at <file>/etc/viam-provisioning.json</file> on the machine that will be provisioned.
If you follow the installation instructions in the next section

{{< /tablestep >}}
{{< /table >}}

{{% /tab %}}
{{< /tabs >}}

## Troubleshooting

If you need to test the GRPC components of the provisioning service, there is a CLI client available.

0 comments on commit c68aa94

Please sign in to comment.