Skip to content

Commit d36dee0

Browse files
authored
(doc): Documented update_os_packages and reboot_after_s (#137)
1 parent 85573c3 commit d36dee0

2 files changed

Lines changed: 34 additions & 5 deletions

File tree

content/en/docs/cluster/installation.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,33 @@ If you are using the *NOP Linux* setup with the `client.py` service you must als
130130

131131
Since we are using our [lm_sensors provider →]({{< relref "/docs/measuring/metric-providers/lm-sensors" >}}) to query the temperature you must also set the `base_temperature_chip` and `base_temperature_feature` to query from. Refer to the [provider documentation →]({{< relref "/docs/measuring/metric-providers/lm-sensors" >}}) for more details.
132132

133+
#### Auto-Updating
134+
135+
The cluster is capable of automatically running updates. You can trigger this behaviour by setting
136+
the `update_os_packages` to *true* in the `config.yml`.
137+
138+
The permissions to run the OS package manager updates are automatically given by giving sudo permissions to the
139+
`maintenance.sh` file during installation.
140+
141+
#### Regular Reboots
142+
143+
We recommend having your machines to undergo regular reboots especially when you have auto-updating enabled
144+
via `update_os_packages`.
145+
146+
This ensures that in case for instance a new kernel is installed the machine will load it at some point.
147+
148+
To enable this behaviour you need to set the `reboot_after_seconds` flag in the `config.yml` to a time in seconds.
149+
Setting it to `0`, `False`, `None` or `null` will disable it.
150+
A typical setting is `86400` to reboot every 24 hours.
151+
152+
Furthermore you must allow the parameter to be run without sudo password entry:
153+
154+
```bash
155+
echo "${USER} ALL=(ALL) NOPASSWD:/usr/bin/systemctl reboot" | sudo tee /etc/sudoers.d/green-coding-reboot
156+
sudo chmod 500 /etc/sudoers.d/green-coding-reboot
157+
```
158+
159+
133160
#### Profiling Machines
134161

135162
Machines that are intended to create a carbon profile *as it would be seen in a user machine* should have:

content/en/docs/measuring/configuration.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ cluster:
4444
sleep_time_no_job: 300
4545
jobs_processing: "random"
4646
shutdown_on_job_no: False
47+
update_os_packages: True
48+
reboot_after_seconds: False
4749
# These two parameters have only effect in cluster mode. When using CLI they will be set via flags --docker-prune and --full-docker-prune only
4850
docker_prune: True
4951
full_docker_prune: False
@@ -121,14 +123,14 @@ Also see [Resource Limits]({{< relref "/docs/measuring/resource-limits" >}}) to
121123

122124
- `full_docker_prune_whitelist` **[list]**: A list of image names (without tag) or image IDs (short form) that will be whitelisted when `--full-docker-prune` is active. Images listed here will not be pruned. Useful for cluster installations where non security critical images shall be kept that take long to download.
123125
- `metric-providers`:
124-
+ `linux`/`macos`/`common` **[string]**: Specifies under what system the metric provider can run. Common implies it could run on either.
125-
* `METRIC_PROVIDER_NAME` **[string]**: Key specifies the Metric Provider. [Possible Metric Providers →]({{< relref "/docs/measuring/metric-providers/metric-providers-overview" >}})
126-
* `METRIC_PROVIDER_NAME.sampling_rate` **[integer]**: sampling rate in ms
126+
+ `linux`/`macos`/`common` **[string]**: Specifies under what system the metric provider can run. Common implies it could run on either.
127+
* `METRIC_PROVIDER_NAME` **[string]**: Key specifies the Metric Provider. [Possible Metric Providers →]({{< relref "/docs/measuring/metric-providers/metric-providers-overview" >}})
128+
* `METRIC_PROVIDER_NAME.sampling_rate` **[integer]**: sampling rate in ms
127129

128130
Some metric providers have unique configuration params:
129131

130132
- PsuEnergyAcXgboostSystemProvider
131-
+ Please look at the always current documentation to understand what values to plug in here: [XGBoost SPECPower Model documentation](https://github.com/green-coding-solutions/spec-power-model)
133+
+ Please look at the always current documentation to understand what values to plug in here: [XGBoost SPECPower Model documentation](https://github.com/green-coding-solutions/spec-power-model)
132134

133135
Also note that some providers are deactivated by default, because they either need
134136
additional configuration parameters, extra hardware or a specially configured system.
@@ -183,7 +185,7 @@ Settings that are specifc to a user and apply to all machines that you are measu
183185
For local installations these are to be found under [https://metrics.green-coding.internal:9142/settings.html](https://metrics.green-coding.internal:9142/settings.html). If you use our [Hosted Service](https://metrics.green-coding.io/) you find it at [https://metrics.green-coding.io/settings.html](https://metrics.green-coding.io/settings.html)
184186
185187
- `disabled_metric_providers` **[list]**: Providers to disable in CamelCase format.
186-
+ Example: *NetworkConnectionsProxyContainerProvider*
188+
+ Example: *NetworkConnectionsProxyContainerProvider*
187189
- `flow-process-duration` **[integer]**: Max. duration in seconds for how long one flow should take. Timeout-Exception is thrown if exceeded.
188190
- `total-duration` **[integer]**: Max. duration in seconds for how long the whole run may take. Including building containers, baseline, idle, runtime and removal phases.
189191
- `phase-padding` **[integer]**: Phase padding is by default applied to the end of the phase to capture the last sampling tick, which might be cut-off. GMT applies one extra tick to the end of the phase. If your phase cut-offs must me microsecond exact you can turn this off. Typically not recommended and should be left on. See [https://github.com/green-coding-solutions/green-metrics-tool/issues/1129](https://github.com/green-coding-solutions/green-metrics-tool/issues/1129) for details.

0 commit comments

Comments
 (0)