Skip to content

Remove processes #4271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/dev/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ aliases:
- "/components/sensor/bme280/"
- "/components/sensor/ds18b20/"
- "/components/sensor/sensirion-sht3xd/"
- /build/configure/processes/
- /configure/processes/
- /manage/reference/processes
- /appendix/changelog/
layout: "changelog"
outputs:
Expand All @@ -41,6 +44,13 @@ date: "2024-09-18"

<!-- If there is no concrete date for a change that makes sense, use the end of the month it was released in. -->

{{% changelog color="removed" title="Processes" date="2025-05-06" %}}

Processes were removed in `viam-server` v0.74.0.
Instead [use modules for control logic](/manage/software/control-logic/#add-control-logic-to-your-module).

{{% /changelog %}}

{{% changelog color="changed" title="Viam provisioning" date="2025-03-24" %}}

You can now set any `viam-agent` configuration values to customized defaults.
Expand Down Expand Up @@ -154,7 +164,7 @@ Backward compatibility is maintained for existing configurations.

{{% changelog color="removed" title="Managed Processes" date="2025-02-01" %}}

[Managed Processes](/manage/reference/processes/) are now deprecated and will be removed in a future version of `viam-server`.
Managed Processes are now deprecated and will be removed in a future version of `viam-server`.
Instead [use modules for control logic](/manage/software/control-logic/#add-control-logic-to-your-module).

{{% /changelog %}}
Expand Down
86 changes: 0 additions & 86 deletions docs/manage/reference/processes.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To add a custom resource as a [remote part](/operate/reference/architecture/part
The new model must implement any functions of the built-in resource type marked as required in its [RDK API definition](/dev/reference/apis/).
2. Register the custom component on a new gRPC server instance and start the server.
3. Add the server as a [remote part](/operate/reference/architecture/parts/) of your machine.
4. (Optional) [Configure a process](/manage/reference/processes/) to launch this remote server to ensure the remote server is always running alongside the rest of your machine.
4. (Optional) Ensure the remote server automatically starts when the machine boots.

Each remote server can host one or many custom components.

Expand All @@ -53,7 +53,7 @@ For more detailed instructions, see the full example in the [Python SDK document
1. Register the custom component on a new gRPC server instance and start the server.
You can do this with the [`viam.rpc` library](https://python.viam.dev/autoapi/viam/rpc/index.html) by creating a new `rpc.server.Server` instance.
1. Add the server as a [remote part](/operate/reference/architecture/parts/) of your machine.
1. (Optional) [Configure a process](/manage/reference/processes/) to launch this remote server to ensure the remote server is always running alongside the rest of your machine.
1. (Optional) Ensure the remote server automatically starts when the machine boots.

Each remote server can host one or many custom components.

Expand Down
52 changes: 5 additions & 47 deletions docs/tutorials/custom/custom-base-dog.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,59 +423,17 @@ Your local component configuration should look similar to the following:
## Start the Freenove server

To operate the dog, you need to start the Freenove robot dog server (which you saved as <file>/home/fido/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/main.py</file>).
You can do this manually by SSHing into the Pi and running the following command from the <file>home/fido/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/</file> directory:

Configure a [_process_](/manage/reference/processes/) to automatically start the server on boot so it is ready to receive commands from `viam-server`.

Click the **+** (Create) button next to your main part in the left-hand menu and select **Process**.

In the process configuration panel that appears, click on the name in the top left corner and rename it to `freenove`.
Fill out the configuration panel as follows:

- **Executable**: The path to Python on your Pi, for example `/usr/bin/python`.
If you're not sure what this path should be, run `which python` on your Pi command line to find it.
- **Arguments**: Type in `main.py` and click **Add argument**.
Then type `-tn` and click **Add argument** again.
This flag starts the Freenove server without launching Freenove's GUI (which you don't need for this use case).
- **Working directory**: `/home/fido/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server` (changing "/home/fido" to the name of your home directory where you downloaded the Freenove code).
- **Logging**: Toggle to the **on** position so you can view logs for this server process.
- **Execute once**: Leave this **off** so that the Freenove server will continue to run, and will restart if it crashes.

Click **Save**.

{{<imgproc src="/tutorials/custom-base-dog/process-config.png" resize="400x" declaredimensions=true alt="Screenshot of the Processes subtab of the Config tab, showing a process configured as detailed above." class="shadow">}}
<br>

{{% expand "Click to see what the processes config looks like in JSON mode." %}}

```json
"processes": [
{
"log": true,
"name": "/usr/bin/python",
"cwd": "/home/fido/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server",
"args": [
"main.py",
"-tn"
],
"one_shot": false,
"id": "freenove"
}
]
```sh {class="command-line" data-prompt="$"}
sudo python main.py -tn
```

{{% /expand %}}
Alternatively you can add this command to your module's `run.sh` file.
That way the Freenove robot dog server will start running when the module starts.

{{% alert title="Tip" color="tip" %}}

If you prefer not to start the Freenove server every time the machine boots, you can instead start it manually from your command line.

SSH into the Pi.
From the <file>home/fido/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/</file> directory, start the Freenove robot dog server:

```sh {class="command-line" data-prompt="$"}
sudo python main.py -tn
```

{{% /alert %}}

## Driving the robot from the Viam app
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
[plugins.inputs]

# change this key to a new one any time you need to restart from scratch
cacheKey = ["Apr242025"]
cacheKey = ["May022025"]
# either "warn" or "error"
failBuildOnError = true

Expand Down
Loading