Skip to content

Commit

Permalink
Allow KAFKA_ADV_HOST env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Orner committed Jul 8, 2022
1 parent f9f5768 commit d688d1c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## UNRELEASED

[0.6.1 - 0.6.6] - 2022-07-08
- Fix GitHub Actions deploy process
- Fixes for logs and down actions
- Added KAFKA_ADV_HOST env variable support

[0.6] - 2022-07-07
- Fixed the `down` and `logs` commands to correctly take a service name.
- Added the `config` command.
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ export LENSES_KEY="https://licenses.lenses.io/download/lensesdl?id=<<<YOUR KEY H

That's it! You can access your local Lenses at [http://localhost:3030](http://localhost:3030), with both username and password set to `admin`. It typically takes about 30-45 seconds to start Lenses. If you're not seeing it past that, make sure you've given Docker enough memory (see #3 above).

If you need to advertise a different host for the broker and schema registry, you can set the `KAFKA_ADV_HOST` environment variable before invoking `global_docker_compose`. Here's an example:

```
MY_IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
KAFKA_ADV_HOST=$MY_IP global_docker_compose --services=kafka
```

### Redis

Redis comes with a built-in `redisinsight` task which can show you the contents of your Redis installation. You can access Insights at [http://localhost:8001](http://localhost:8001).
Expand Down
1 change: 1 addition & 0 deletions gdc/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func RunCommand(cmd string, args... interface{}) {
}
fmt.Printf("-> %s\n", fullCommand)
command := shellCommand(sh.InteractiveSession(), fullCommand)
command.SetEnv("KAFKA_ADV_HOST", os.Getenv("KAFKA_ADV_HOST"))
command.SetStdin(os.Stdin)
err := command.Run()
if (err != nil) {
Expand Down
2 changes: 1 addition & 1 deletion gdc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ services:
kafka:
image: lensesio/box
environment:
ADV_HOST: 127.0.0.1
ADV_HOST: ${KAFKA_ADV_HOST:-127.0.0.1}
EULA: ${LENSES_KEY}
DISABLE_JMX: 1
ELASTICSEARCH_PORT: 0
Expand Down

0 comments on commit d688d1c

Please sign in to comment.