-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aisha M <[email protected]>
- Loading branch information
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
title: Execution Configuration | ||
weight: 1 | ||
--- | ||
|
||
# Execution Configuration Files | ||
|
||
As part of Hipcheck's goal to make Hipcheck flexible for all users, the | ||
Execution Configuration file allows you to configure the Hipcheck execution | ||
to support various needs, such as system requirements. The Execution | ||
Configuration file is a [KDL](https://kdl.dev/) configuration file | ||
that provides custom values required for Hipcheck's execution, including the | ||
plugin start-up process. | ||
|
||
Here's what the default Execution Configuration file looks like: | ||
|
||
``` | ||
plugin { | ||
backoff-interval 100000 | ||
max-spawn-attempts 3 | ||
max-conn-attempts 5 | ||
jitter-percent 10 | ||
grpc-msg-buffer-size 10 | ||
} | ||
``` | ||
|
||
## The `plugin` Section | ||
|
||
During the Hipcheck plugin start-up process, certain values are hardcoded for | ||
the gRPC channel connection. However, depending on system requirements, these | ||
values may need to be adjusted. The `plugin` section contains the variables | ||
required for the `PluginExecutor` module to make the gRPC connection. The configurable | ||
variables are as follows: | ||
|
||
| Variable | Default | Description | | ||
| :-------------------- | :---------:| :--------------- | | ||
| `backoff-interval` | 100000 | (Microseconds) System wait time between connection attempts. | | ||
| `max-spawn-attempts` | 3 | Maximum number of attempts to spawn a gRPC channel. | | ||
| `max-conn-attempts` | 5 | Maximum number of attempts to make a plugin connection. | | ||
| `jitter-percent` | 10 | Percentage used with the `backoff-interval` and `max-conn-attempts` to calculate the sleep duration between connection attempts| | ||
| `grpc-msg-buffer-size` | 10 | The size of the gRPC buffer | | ||
|
||
## How It Works | ||
|
||
The values in the Execution Configuration file are made available to Hipcheck | ||
in three ways, listed in order of priority: | ||
|
||
### Execution Configuration through CLI | ||
|
||
To provide a custom Execution Configuration file for your Hipcheck execution, | ||
there's a sample `Exec.kdl` file in `./config/`. You can use it by copying the | ||
file to your desired location, making and saving your changes while maintaining | ||
KDL format. Use the optional CLI flag `-e <EXEC>`/`--exec <EXEC>` to specify the | ||
file path for your Execution Configuration file. | ||
|
||
### Exec.kdl in Hipcheck Binary | ||
|
||
Alternatively, you can copy your custom Execution Configuration file | ||
to the root directory of Hipcheck. When Hipcheck runs, it will find the file | ||
in `.hipcheck/Exec.kdl`. This search process starts in the current directory | ||
and recursively all parent directories to the user's home directory, similar to | ||
[Cargo's configuration system](https://doc.rust-lang.org/cargo/reference/config.html). | ||
|
||
### Default | ||
|
||
In the case that an `Exec.kdl` file was not resolved using the above methods, | ||
Hipcheck will use in-memory defaults for the values in this file. |