-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update machine settings information #3772
base: v3.0
Are you sure you want to change the base?
Changes from 3 commits
4e05dd2
77536bc
daf1819
d53ce8f
9bc7a31
425248a
ab7a57b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
--- | ||
linkTitle: "Configure machine settings" | ||
title: "Configure machine operating system settings" | ||
weight: 50 | ||
layout: "docs" | ||
type: "docs" | ||
description: "Configure network settings, operating system package updates and logging defaults." | ||
--- | ||
|
||
The `viam-agent` configuration allows you to configure: | ||
|
||
- [settings for package updates for the host operating system](#configure-os-package-updates) | ||
- [networks a machine can connect to](#configure-networks) | ||
- [parameters for operating system logging](#configure-operating-system-logging) | ||
|
||
## Configure OS package updates | ||
|
||
By default, the configuration in <FILE>/etc/apt/apt.conf.d/</FILE> determines the behavior for updating operating system packages. | ||
To adjust these settings update the `"agent"` value in the machine's JSON configuration. | ||
|
||
For complete reference information, see [viam-agent](/configure/agent/#agent-syscfg). | ||
|
||
### Automatically upgrade all packages | ||
|
||
When set, `viam-agent` will install the `unattended-upgrades` package and replace `20auto-upgrades` and `50unattended-upgrades` in <FILE>/etc/apt/apt.conf.d/</FILE> with an Origins-Pattern list generated automatically from configured repositories on the system. | ||
Custom repos installed on the system at the time the setting is enabled will be included. | ||
|
||
To set automatic upgrades for all packages, add the `upgrades` field to the `agent-syscfg`'s `attributes` object as following. | ||
You may need to add the `agent-syscfg` object to the `agent` object if it doesn't already exist. | ||
|
||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"upgrades": { | ||
"type": "all" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Automatically upgrade security packages | ||
|
||
When set, `viam-agent` will install the `unattended-upgrades` package and replace `20auto-upgrades` and `50unattended-upgrades` in <FILE>/etc/apt/apt.conf.d/</FILE> with an Origins-Pattern list generated automatically from configured repositories on the system. | ||
Custom repos installed on the system at the time the setting is enabled will be included. | ||
|
||
To set automatic upgrades for packages containing `"security"` in their codename (for example `bookworm-security`), add the `upgrades` field to the `agent-syscfg`'s `attributes` object as following. | ||
You may need to add the `agent-syscfg` object to the `agent` object if it doesn't already exist. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this explanation repeated for every option here? Wouldn't it make more sense to just explain the overall purpose once at the top? |
||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"upgrades": { | ||
"type": "security" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Disable automatic upgrades | ||
|
||
When set, `viam-agent` will install the `unattended-upgrades` package and replace `20auto-upgrades` and `50unattended-upgrades` in <FILE>/etc/apt/apt.conf.d/</FILE> with an Origins-Pattern list generated automatically from configured repositories on the system. | ||
Custom repos installed on the system at the time the setting is enabled will be included. | ||
|
||
To set automatic upgrades, add the `upgrades` field to the `agent-syscfg`'s `attributes` object. | ||
You may need to add the `agent-syscfg` object to the `agent` object if it doesn't already exist. | ||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"upgrades": { | ||
"type": "disabled" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Configure networks | ||
|
||
By default, your machine can connect to networks added at the operating system level, for example, directly in NetworkManager. | ||
|
||
For an already-online device, you can add new WiFi networks by updating the `"agent"` value in the machine's JSON configuration. | ||
This is primarily useful for a machine that moves between different networks, so the machine can automatically connect when moved between locations. | ||
|
||
To add networks, add the `networks` field to the `agent-provisioning`'s `attributes` object and set `"roaming_mode": true`. | ||
You may need to add the `agent-provisioning` object to the `agent` object if it doesn't already exist. | ||
|
||
{{< alert title="Note" color="note" >}} | ||
If you are using the Viam app to add networks to a machine’s configuration, the machine will need to be connected to the internet to retrieve the configuration information containing the network credentials before it can use them. | ||
{{< /alert >}} | ||
|
||
The following configuration defines the connection information and credentials for two WiFi networks named `fallbackNetOne` and `fallbackNetTwo`. | ||
`viam-agent` will try to connect to `fallbackNetOne` first, since its priority is highest. | ||
If the `fallbackNetOne` is not available or the machine can connect but internet is not available, `viam-agent` will then attempt to connect to `fallbackNetTwo`. | ||
|
||
```json | ||
"agent": { | ||
"agent-provisioning": { | ||
... | ||
"attributes": { | ||
"roaming_mode": true, | ||
"networks": [ | ||
{ | ||
"type": "wifi", | ||
"ssid": "fallbackNetOne", | ||
"psk": "myFirstPassword", | ||
"priority": 30 | ||
}, | ||
{ | ||
"type": "wifi", | ||
"ssid": "fallbackNetTwo", | ||
"psk": "mySecondPassword", | ||
"priority": 10 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
For complete reference information, see [viam-agent](/configure/agent/#networks). | ||
|
||
## Configure operating system logging | ||
|
||
By default, the operating system defaults determine the disk space that `journald` uses to persist logs. | ||
To adjust these settings update the `"agent"` value in the machine's JSON configuration. | ||
|
||
For complete reference information, see [viam-agent](/configure/agent/#agent-syscfg). | ||
npentrel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably link to the docs for journald, which better explain what exactly these two fields mean. https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html#SystemMaxUse= There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should mention that if NOT set, both of these fields are set to 512MB by default (unless disable is set.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that mean this sentence is wrong or that the moment we set a logging value even if it is empty the value 512 is used?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. We enforce 512MB by default (per request from Eliot) when this is not set, which is typically smaller than most OS defaults. That's why I added the "disable" option to avoid this for people that don't want it changed. |
||
### Set the maximum disk space | ||
|
||
To set the maximum disk space `journald` will use to persist logs, add the `system_max_use` field to the `agent-syscfg`'s `attributes` object. | ||
You may need to add the `agent-syscfg` object to the `agent` object if it doesn't already exist. | ||
|
||
The configured values will take precedence over operating system defaults. | ||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"logging": { | ||
"system_max_use": "512M" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Set the runtime space limit space | ||
|
||
To set the temporary space limit for logs, add the `runtime_max_use` field to the `agent-syscfg`'s `attributes` object. | ||
You may need to add the `agent-syscfg` object to the `agent` object if it doesn't already exist. | ||
|
||
The configured values will take precedence over operating system defaults. | ||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"logging": { | ||
"runtime_max_use": "512M" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Use the default operating system settings | ||
|
||
This configuration does not modify the OS-level logging configuration. | ||
The operating system defaults will be used: | ||
|
||
```json | ||
"agent": { | ||
"agent-syscfg": { | ||
"release_channel": "stable", | ||
"attributes": { | ||
"logging": { | ||
"disable": true | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear why a single field is explained in full three different times, with full json examples for each, when all that changes is one word. Wouldn't it be a lot easier to understand if the field was explained, and then just state that there are three options for "type"?