Skip to content

Commit

Permalink
docs(gh-page): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Sep 29, 2023
1 parent dd3e8b5 commit 5f130d3
Showing 1 changed file with 59 additions and 9 deletions.
68 changes: 59 additions & 9 deletions docs/content/en/docs/Jikkou CLI/CLI-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ To set up the configuration settings used by Jikkou CLI, you will need create a
automatically when you create a configuration context using:

```bash
jikkou config set-context <context-name> [--config-file=<config-gile>] [--config=<config-value>]
jikkou config set-context <context-name> [--config-file=<config-gile>] [--config-props=<config-value>]
```

By default, the configuration of `jikkou` is located under the path `~/.jikkou/config`.
By default, the configuration of `jikkou` is located under the path `$HOME/.jikkou/config`.

This _jikkou config file_ defines all the contexts that can be used by jikkou CLI.

Expand All @@ -39,8 +39,7 @@ For example, below is the config file created during the [Getting Started]({{< r
```

Most of the time, a _context_ does not directly contain the configuration properties to be used, but rather points to a
specific
[HOCON (Human-Optimized Config Object Notation)](https://github.com/lightbend/config) through the (`configFile`).
specific [HOCON (Human-Optimized Config Object Notation)](https://github.com/lightbend/config) through the `configFile` property.

Then, the `configProps` allows you to override some of the property define by this file.

Expand All @@ -50,17 +49,19 @@ those following locations:
* `./application.conf`
* `$HOME/.jikkou/application.conf`

Finally, Jikkou always fallback to a reference configuration (
see [reference.conf](https://github.com/streamthoughts/jikkou/blob/main/jikkou-cli/src/main/resources/reference.conf)).
Finally, Jikkou always fallback
to a [reference.conf](https://github.com/streamthoughts/jikkou/blob/main/jikkou-cli/src/main/resources/reference.conf)
file that you can use as a template to define your own configuration.

**_reference.conf_**:
```hocon
jikkou {
# The paths from which to load extensions
extension.paths = [${?JIKKOU_EXTENSION_PATH}]
# Kafka Extension
kafka {
# The default Kafka AdminClient configuration
# The default Kafka Client configuration
client {
bootstrap.servers = "localhost:9092"
bootstrap.servers = ${?JIKKOU_DEFAULT_KAFKA_BOOTSTRAP_SERVERS}
Expand All @@ -81,6 +82,11 @@ jikkou {
}
}
schemaRegistry {
url = "http://localhost:8081"
url = ${?JIKKOU_DEFAULT_SCHEMA_REGISTRY_URL}
}
# The default custom transformations to apply on any resources.
transformations = []
Expand Down Expand Up @@ -114,12 +120,56 @@ jikkou {
}
}
]
# The default custom reporters to report applied changes.
reporters = [
# Uncomment following lines to enable default kafka reporter
# {
# name = "default"
# type = io.streamthoughts.jikkou.kafka.reporter.KafkaChangeReporter
# config = {
# event.source = "jikkou/cli"
# kafka = {
# topic.creation.enabled = true
# topic.creation.defaultReplicationFactor = 1
# topic.name = "jikkou-resource-change-event"
# client = ${jikkou.kafka.client} {
# client.id = "jikkou-reporter-producer"
# }
# }
# }
# }
]
}
```

### Verify current configuration
### Listing Contexts

```bash
$ jikkou config get-contexts

NAME
localhost *
development
staging
production
```

### Verify Current Context

You can use `jikkou config current-context` command to show the context currently used by Jikkou CLI.

```bash
$ jikkou config current-context
Using context 'localhost'

KEY VALUE
ConfigFile
ConfigProps {"kafka.client.bootstrap.servers": "localhost:9092"}
```

### Verify Current Configuration

You can use `jikkou config view` to show the configuration currently used by your client.
You can use `jikkou config view` command to show the configuration currently used by Jikkou CLI.

{{% alert title="Tips" color="info" %}}
To debug the configuration use by Jikkou, you can run the following command: `jikkou config view --comments`
Expand Down

0 comments on commit 5f130d3

Please sign in to comment.