-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from aliceinwire/configuration
docs/config: Add config subcommand configuration
- Loading branch information
Showing
3 changed files
with
100 additions
and
31 deletions.
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,42 @@ | ||
+++ | ||
title = 'config' | ||
date = 2025-01-18T15:43:18+08:00 | ||
description = 'Config tool for creating a config file template.' | ||
+++ | ||
|
||
`kci-dev config` is a config tool for creating a config file template. | ||
This command is needed when no configuration is present. | ||
|
||
### kci-dev config | ||
|
||
`kci-dev config` without arguments will check for config file, | ||
if none are found will create a config file template by default to | ||
`~/config/kci-dev/kci-dev.toml` | ||
|
||
## Base parameters | ||
|
||
### --file-path | ||
|
||
Optional file path for creating a config file, | ||
if none is provided `~/config/kci-dev/kci-dev.toml` is used. | ||
|
||
## Example | ||
|
||
### kci-dev config | ||
|
||
Example: | ||
|
||
```sh | ||
$ kci-dev config | ||
Config file not present, adding a config file to ~/.config/kci-dev/kci-dev.toml | ||
``` | ||
|
||
### kci-dev config --file-path | ||
|
||
Example: | ||
|
||
```sh | ||
$ kci-dev config --file-path ~/test/test.toml | ||
Config file not present, adding a config file to ~/test/test.toml | ||
``` | ||
|
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,44 @@ | ||
+++ | ||
title = 'config_file' | ||
date = 2025-01-18T15:54:07+09:00 | ||
description = 'Config file template and parameters.' | ||
+++ | ||
|
||
## Configuration | ||
|
||
> Configuration is only necessary if you are using any of the Maestro Commands listed in the Maestro section. | ||
kci-dev searches for and loads a configuration file in the following order of priority: | ||
1) The global configuration file located at /etc/kci-dev.toml. | ||
2) The user-specific configuration file at ~/.config/kci-dev/kci-dev.toml | ||
3) A site-specific configuration file, which is .kci-dev.toml by default, but can be overridden with the --settings option. | ||
|
||
Priority: The configuration files are loaded in the order listed above, with each subsequent file overriding the settings from the previous one. | ||
If a user-specific file is present, it will override the global configuration. | ||
The site-specific file, whether default or specified by --settings, takes precedence over both the global and user-specific configuration files. | ||
|
||
```toml | ||
default_instance="local" | ||
|
||
[local] | ||
pipeline="https://127.0.0.1" | ||
api="https://127.0.0.1:8001/" | ||
token="example" | ||
|
||
[staging] | ||
pipeline="https://staging.kernelci.org:9100/" | ||
api="https://staging.kernelci.org:9000/" | ||
token="example" | ||
|
||
[production] | ||
pipeline="https://kernelci-pipeline.westus3.cloudapp.azure.com/" | ||
api="https://kernelci-api.westus3.cloudapp.azure.com/" | ||
token="example" | ||
``` | ||
|
||
Where `default_instance` is the default instance to use, if not provided in the command line. | ||
In section `local`, `staging`, `production` you can provide the host for the pipeline, api and also a token for the available instances. | ||
pipeline is the URL of the KernelCI Pipeline API endpoint, api is the URL of the new KernelCI API endpoint, and token is the API token to use for authentication. | ||
If you are using KernelCI Pipeline instance, you can get the token from the project maintainers. | ||
If it is a local instance, you can generate your token using [kernelci-pipeline/tools/jwt_generator.py](https://github.com/kernelci/kernelci-pipeline/blob/main/tools/jwt_generator.py) script. | ||
|