Skip to content

Commit

Permalink
Update SDK broker commands (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisquix authored Jun 27, 2024
1 parent b63e4d2 commit 2387b34
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/Reference/applications/variables/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Existing environment variables in the `.env` file will remain untouched unless t

#### Quix__Broker__Address

When using a local debug broker, the `Quix__Broker__Address` environment variable is set to point to the address of the local broker. This allows your application to connect to the local broker instance for testing and debugging purposes.
When using a SDK broker configuration that points to a local address, the `Quix__Broker__Address` environment variable is set to point to the address of the SDK broker configuration. This allows your application to connect to the local broker instance for testing and debugging purposes.

```
Quix__Broker__Address={your_debug_broker_address}
Expand Down
16 changes: 8 additions & 8 deletions docs/Reference/contexts/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How It Works

The `quix contexts create` command allows you to add a new context to the Quix CLI. This context includes configurations such as the portal endpoint and the local debug broker address. If you do not provide the name or options, the command starts an interactive mode to guide you through the context creation process.
The `quix contexts create` command allows you to add a new context to the Quix CLI. This context includes configurations such as the portal endpoint and the SDK broker configuration address. If you do not provide the name or options, the command starts an interactive mode to guide you through the context creation process.

!!! warning
Creating multiple contexts is intended for advanced users who need to store and access different sets of configurations. Use this feature only if you require distinct environments or settings.
Expand Down Expand Up @@ -32,7 +32,7 @@ You will then be prompted to enter the portal API URL:
Changing the portal API URL is only necessary if you need to use a different portal API, such as for BYOC (Bring Your Own Cloud).


Once you enter a valid URL, you will be prompted for the local debug broker address:
Once you enter a valid URL, you will be prompted for the SDK broker configuration address:

```text
✓ Portal API URL: https://quix.example.com
Expand All @@ -47,20 +47,20 @@ Once you enter a valid URL, you will be prompted for the local debug broker addr
```

```
? Enter local debug broker address: (localhost:19092):
? Enter SDK local broker address: (localhost:19092):
```

After entering the local debug broker address, you will be asked if you want to use a local debug broker:
After entering the SDK broker configuration address, you will be asked if you want to use a SDK broker configuration:

```text
Local debug broker address: localhost:9092
? Use a local debug broker? [y/n] (y):
SDK local broker address: localhost:9092
? Use 'Local' as SDK broker configuration? [y/n] (y):
```

Confirm your choice to use a local debug broker:
Confirm your choice to use a SDK broker configuration:

```text
✓ Use a local debug broker?: ✓
✓ Use 'Local' as SDK broker configuration?: ✓
```

By following these steps, you can easily create a new context in the Quix CLI, ensuring that all necessary configurations are set correctly.
Expand Down
12 changes: 6 additions & 6 deletions docs/Reference/contexts/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How It Works

The `quix contexts current` command retrieves and displays information about the current context in use within the Quix CLI environment. The context includes details such as the name, portal URL, default environment, and the local debug broker settings. This command is useful for understanding which settings and configurations are currently active.
The `quix contexts current` command retrieves and displays information about the current context in use within the Quix CLI environment. The context includes details such as the name, portal URL, default environment, and the SDK broker configuration settings. This command is useful for understanding which settings and configurations are currently active.

## Example Usage

Expand All @@ -17,7 +17,7 @@ $ quix ctx current
If the default context is in use and no environment is selected, the output will be:

```
Name | Portal Url | Default environment | Local Debug Broker
Name | Portal Url | Default environment | SDK broker configuration
-----------|-------------------------------------|----------------------|--------------------------
→ default | https://portal-api.platform.quix.io | | Local (localhost:19092)
```
Expand All @@ -27,17 +27,17 @@ If the default context is in use and no environment is selected, the output will
If an environment is selected from Quix Cloud, the output will include the default environment:

```
Name | Portal Url | Default environment | Local Debug Broker
Name | Portal Url | Default environment | SDK broker configuration
-----------|-------------------------------------|------------------------|--------------------------
→ default | https://portal-api.platform.quix.io | {your-default-env} | Local (localhost:19092)
```

### Environment Selected from Quix Cloud with Environment Broker as Local Debug Broker
### Environment Selected from Quix Cloud with Environment Broker as SDK broker configuration

If the selected environment from Quix Cloud is also used as the local debug broker, the output will reflect this configuration:
If the selected environment from Quix Cloud is also used as the SDK broker configuration, the output will reflect this configuration:

```
Name | Portal Url | Default environment | Local Debug Broker
Name | Portal Url | Default environment | SDK broker configuration
-----------|-------------------------------------|------------------------|-----------------------------------
→ default | https://portal-api.platform.quix.io | quix-christest-env1 | Quix Cloud (quix-christest-env1)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/contexts/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How It Works

The `quix contexts list` command retrieves and displays all the contexts configured in the Quix CLI. This command is useful for reviewing the available contexts and their configurations, including the portal URL, default environment, and local debug broker settings. The current active context is indicated with an arrow ``.
The `quix contexts list` command retrieves and displays all the contexts configured in the Quix CLI. This command is useful for reviewing the available contexts and their configurations, including the portal URL, default environment, and SDK broker configuration settings. The current active context is indicated with an arrow ``.

## Example Usage

Expand All @@ -15,7 +15,7 @@ $ quix ctx ls
The output will display the contexts in a table format:

```text
Name | Portal Url | Default environment | Local Debug Broker
Name | Portal Url | Default environment | SDK broker configuration
-----------------|-------------------------------------|---------------------|----------------------------
→ default | https://portal-api.platform.quix.io | org-proj-env | Quix Cloud (org-proj-env)
more-context | https://portal-api.platform.quix.io | | Local (localhost:9092)
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Specifically, this command executes [`quix application variables export`](./appl

=== "Pipeline Broker"

To use a local debug broker, you can easily set one up by running [`quix pipeline broker up`](./pipeline/broker/up.md). This will start a local broker instance that listens on `localhost:19092`. This setting is enabled by default. If you need to change it, use `quix sdk broker local`.
To use a SDK broker configuration, you can easily set one up by running [`quix pipeline broker up`](./pipeline/broker/up.md). This will start a local broker instance that listens on `localhost:19092`. This setting is enabled by default. If you need to change it, use `quix sdk broker local`.

=== "Quix Cloud Broker"

Expand All @@ -37,7 +37,7 @@ In practice, this setup adds the following environment variable to your configur
Quix__Broker__Address={your_debug_broker_address}
```

If you set your local debug broker configuration to point to Quix Cloud, it will add:
If you set your SDK broker configuration configuration to point to Quix Cloud, it will add:

```
Quix__Sdk__Token={your_token}
Expand Down
2 changes: 1 addition & 1 deletion docs/Reference/pipeline/down.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ quix pipeline down
```

!!! tip
The `--keep-broker` option allows you to keep the local broker running while stopping and removing the other containers. This is useful if you need the broker to remain active for other purposes like using it for local as your local debug broker.
The `--keep-broker` option allows you to keep the local broker running while stopping and removing the other containers. This is useful if you need the broker to remain active for other purposes like using it for local as your SDK broker configuration.

In practice, this command is a shortcut for `docker compose down`. It stops all running services and removes the containers, networks, and volumes associated with the Docker Compose configuration.

Expand Down
8 changes: 4 additions & 4 deletions docs/Reference/sdk/broker/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## How It Works

The `quix sdk broker cloud` command configures the local debug broker to use the one in your Quix Cloud environment. This ensures that your local development setup uses the same broker as your Quix Cloud environment, which can be helpful for consistent testing and debugging.
The `quix sdk broker cloud` command configures the SDK broker configuration to use the one in your Quix Cloud environment. This ensures that your local development setup uses the same broker as your Quix Cloud environment, which can be helpful for consistent testing and debugging.

## Example Usage

To set the local debug broker to the one in your Quix Cloud environment, use the following command:
To set the SDK broker configuration to the one in your Quix Cloud environment, use the following command:

```bash
$ quix sdk broker cloud
Expand All @@ -15,15 +15,15 @@ $ quix sdk broker cloud
If the default environment ID is set, you will see the following message:

```text
Local debug broker: Quix Cloud (your-env-id)
SDK broker configuration: Quix Cloud (your-env-id)
```

### No Default Environment ID Set

If no default environment ID is set, you will see the following message:

```text
Local debug broker: Quix Cloud (! Not set)
SDK broker configuration: Quix Cloud (! Not set)
```

!!! tip
Expand Down
8 changes: 4 additions & 4 deletions docs/Reference/sdk/broker/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

## How It Works

The `quix contexts broker local` command configures the local debug broker to use a broker accessible from your local machine. By default, this sets the broker to the pipeline broker running on `localhost:19092`.
The `quix contexts broker local` command configures the SDK broker configuration to use a broker accessible from your local machine. By default, this sets the broker to the pipeline broker running on `localhost:19092`.

## Example Usage

To set the local debug broker to a locally accessible broker, use the following command:
To set the SDK broker configuration to a locally accessible broker, use the following command:

```bash
$ quix sdk broker local
Expand All @@ -16,8 +16,8 @@ $ quix sdk broker local
If successful, you will see the following confirmation message:

```text
Local debug broker: Local (localhost:19092)
SDK broker configuration: Local (localhost:19092)
```

!!! tip
You can change the local debug broker address using the [`quix sdk broker set`](set.md) command.
You can change the SDK broker configuration address using the [`quix sdk broker set`](set.md) command.
16 changes: 8 additions & 8 deletions docs/Reference/sdk/broker/set.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@

## How It Works

The `quix sdk broker set` command allows you to specify the address for the local debug broker for the current context. By default, this sets the broker to `localhost:19092`, which is the default pipeline broker address that can be started with the [`quix pipeline broker up`](../../pipeline/broker/up.md) command.
The `quix sdk broker set` command allows you to specify the address for the SDK broker configuration for the current context. By default, this sets the broker to `localhost:19092`, which is the default pipeline broker address that can be started with the [`quix pipeline broker up`](../../pipeline/broker/up.md) command.

However, using this default broker address is not required. You can change it to suit your development setup. For instance, if you already have a Kafka broker running locally, you might set the address to `localhost:9092`. Alternatively, you can set it to any other Kafka broker address, such as `kafka.example.com:9092`.

This flexibility allows you to configure the local debug broker to match the specific requirements of your development and testing environment.
This flexibility allows you to configure the SDK broker configuration to match the specific requirements of your development and testing environment.

## Example Usage

To set the address for the local debug broker, use the following command:
To set the address for the SDK broker configuration, use the following command:

```bash
$ quix sdk broker set
```

You will be prompted to enter the local debug broker address:
You will be prompted to enter the SDK broker configuration address:

```text
? Enter local debug broker address: (localhost:19092):
? Enter SDK broker configuration address: (localhost:19092):
```

If a cloud broker was previously selected, you will be asked if you want to enable the use of the local debug broker:
If a cloud broker was previously selected, you will be asked if you want to enable the use of the SDK broker configuration:

```text
? Do you want to enable the use of this local debug broker?: [y/n] (y):
? Do you want to enable the use of this SDK broker configuration?: [y/n] (y):
```

!!! tip
Expand All @@ -37,5 +37,5 @@ If a cloud broker was previously selected, you will be asked if you want to enab
Ultimately, if the command is successful, you will see the following confirmation message:

```text
Local debug broker: Local (localhost:19092)
SDK broker configuration: Local (localhost:19092)
```
4 changes: 2 additions & 2 deletions docs/Reference/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If you are not logged into Quix Cloud, the status command will indicate this and
User: ! Not logged in to Quix Cloud
Current context: default (https://portal-api.platform.quix.io)
Default environment: ! Not set
Local Debug Broker: Local (localhost:19092)
SDK broker configuration: Local (localhost:19092)
✓ Docker installed
! Local Pipeline Status: Not Running
✓ Git installed
Expand All @@ -55,7 +55,7 @@ If you are logged into Quix Cloud and have a default environment set, the status
Organization: Example (example-org)
Current context: default (https://portal-api.platform.quix.io)
Default environment: example-org-project-env
Local Debug Broker: Local (localhost:19092)
SDK Broker configuration: Local (localhost:19092)
✓ Docker installed
! Local Pipeline Status: Not Running
✓ Git installed
Expand Down

0 comments on commit 2387b34

Please sign in to comment.