The bacalhau config
command is a parent command that offers sub-commands to modify and query information about the Bacalhau config. This can be useful for debugging, monitoring, or managing the nodes configuration.
list:
Description: Lists the configuration keys and values of the bacalhau node. This command is useful for understanding how configuration keys map to their respective values, aiding in the use of the bacalhau config set
command.
Usage:
set:
Description: Sets a value in the bacalhau node's configuration file. This command is used to modify the configuration file that the bacalhau node will reference for its settings.
Usage:
Description: Prints the default configuration of a bacalhau node to the standard output (stdout). This command is beneficial for viewing the baseline settings a bacalhau node will use before any user-defined configuration changes are applied.
Usage:
Description: Automatically sets compute resource values in the bacalhau node's configuration file based on the hardware resources of the user's machine. This command simplifies the process of allocating resources for jobs by dynamically adjusting the settings to match the machine's capabilities.
Usage:
The bacalhau config list
command lists the configuration keys and values of the bacalhau node. This command is useful for understanding how configuration keys map to their respective values, aiding in the use of the bacalhau config set
command.
Note: Configuration values displayed by this command represent the settings that will be applied when the bacalhau node is next restarted. It is important to note that these values may not reflect the current operational configuration of an active bacalhau node. The displayed configuration is relevant and accurate for a node that is either not currently running or that has been restarted after the execution of this command.
-h
, --help
:
Description: Displays help information for the list
sub-command.
--hide-header
:
Description: Do not print the column headers when displaying the results.
Default: false
--no-style
:
Description: Removes all styling from the table output, displaying raw data.
Default: false
--output format
:
Description: Determines the format in which the output is displayed. Available formats include Table, JSON, and YAML.
Options: json
, yaml
, table
Default: table
--pretty
:
Description: Formats the output for enhanced readability. This flag is relevant only when using JSON or YAML output formats.
Default: true
--wide
:
Description: Prints full values in the table results without truncating any information.
Default: false
Basic Usage:
Command:
Output:
Output in JSON format:
Command:
Output:
The bacalhau config auto-resources
command automatically configures compute resource values in the bacalhau node's configuration file based on the hardware resources of the user's machine. This command streamlines the process of resource allocation for jobs, dynamically adjusting settings to align with the capabilities of the machine. It is designed to simplify the task of resource management, ensuring that the node operates efficiently and effectively within the hardware's limits.
Note: The bacalhau config auto-resources
command intelligently adjusts resource allocation settings based on the specific hardware configuration of your machine, promoting optimal utilization for bacalhau jobs. Due to the dynamic nature of this command, the specific values set in the configuration will vary depending on the available hardware resources of the machine in use. This functionality is particularly beneficial for users who seek to optimize their node's performance without the need for manual calculations of resource limits. It is important for users to understand that these settings will directly impact the number and types of jobs their node can manage at any given time, based on the machine's resource capacity.
--default-job-percentage int
:
Description: Sets the default percentage of resources allocated for each job when specific limits are not defined. Acceptable values range from 1 to 100 (values over 100 are rejected).
Default: 75
--job-percentage int
:
Description: Determines the percentage of resources that can be utilized at one time for a single job. Accept values from 1 to 100 (values over 100 are rejected).
Default: 75
--queue-job-percentage int
:
Description: Specifies the total percentage of resources that the system can allocate for all jobs queued at one time. Accept values from 1 to 100 (values over 100 are accepted).
Default: 150
--total-percentage int
:
Description: Indicates the total percentage of resources that the system can utilize at one time across all jobs. Accept values from 1 to 100 (values over 100 are rejected).
Default: 75
(Ran on an Apple M1 Max with 10 Cores and 64GB RAM)
Basic Usage:
Command:
Config File:
Queue 500% system resources:
Command:
Config File:
With 25% of system resources:
Command:
Config File:
The bacalhau config default
command prints the default configuration of a bacalhau node to the standard output (stdout). This command is advantageous for users to view the baseline settings a bacalhau node will use in the absence of any user-defined configuration changes. It provides a clear view of the default operational parameters of the node, aiding users in understanding and customizing their configuration from a known baseline.
Note: The output of this command shows the initial default settings for a new bacalhau node and is useful for understanding the foundational settings for customization. To apply these default settings, you can redirect the output to your configuration file using bacalhau config default > ~/.bacalhau/config.yaml
, which overwrites your current configuration file with the default settings. However, if you wish to always use the latest default settings, especially if the defaults are updated over time, consider deleting your existing configuration file (e.g., ~/.bacalhau/config.yaml
). This approach ensures that your bacalhau node uses the most current defaults, circumventing potential discrepancies between the latest defaults and those captured in an older configuration file created with bacalhau config default
.
-h
, --help
:
Description: Displays help information for the list
sub-command.
--path
:
Description: Sets path dependent config fields
Default: $HOME/.bacalhau
The bacalhau config set
command sets a value in the bacalhau node's configuration file. This command is used to modify the configuration file that the bacalhau node will reference for its settings. Key names in the configuration are case-insensitive. Additionally, the command validates the value being set based on the type of the configuration key, ensuring that only appropriate and valid configurations are applied.
Note: Changes made using this command will be applied to the configuration file, but they do not immediately affect the running configuration of an active bacalhau node. The modifications will take effect only after the node is restarted.
-h
, --help
:
Description: Displays help information for the set
sub-command.
Example of invalid logging mode value
Example of invalid time duration value