Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docker-compose template #931

Closed
emaxerrno opened this issue Mar 22, 2021 · 3 comments · Fixed by #1424
Closed

docs: add docker-compose template #931

emaxerrno opened this issue Mar 22, 2021 · 3 comments · Fixed by #1424
Assignees
Labels
area/docs good first issue Good for newcomers kind/enhance New feature or request

Comments

@emaxerrno
Copy link
Contributor

emaxerrno commented Mar 22, 2021

A good starting point

version: '3.7'
services:
  redpanda:
    entrypoint:
    - /usr/bin/rpk
    - redpanda
    - start
    - --smp
    - '1'
    - --reserve-memory
    - 0M
    - --overprovisioned
    - --node-id
    - '0'
    - --kafka-addr
    - PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
    - --advertise-kafka-addr
    - PLAINTEXT://kafka:29092,OUTSIDE://localhost:9092
    - --
    - --kernel-page-cache
    - '1'
    image: vectorized/redpanda:v21.4.1
    ports:
    - 9092:9092
    - 29092:29092
    volumes:
    - redpanda:/var/lib/redpanda/data
volumes:
  redpanda: null
@emaxerrno emaxerrno added kind/enhance New feature or request good first issue Good for newcomers area/docs labels Mar 22, 2021
@emaxerrno
Copy link
Contributor Author

@BenPope maybe we show case it with a python app or the javascript app/getting started.

@emaxerrno
Copy link
Contributor Author

I added this in 4c72cd6 as a base.

BenPope added a commit to BenPope/redpanda that referenced this issue May 1, 2021
Abseil LTS 20210324, Patch 1 (redpanda-data#943)
* Add missing `add_subdirectory()` call for "cleanup" (redpanda-data#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <cblichmann@google.com>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes redpanda-data#931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
    ...
    24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:

    Fixes failing CMake string comparisons
    https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
    Unknown compiler:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
    Building with no default flags

Fixes redpanda-data#930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <cblichmann@users.noreply.github.com>
Co-authored-by: Abseil Team <absl-team@google.com>

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Cherry-picks for LTS 2020_09_23 Patch Release 3 (redpanda-data#888)
* Adds missing <limits> include to fix GCC 11 (prerelease) build
    on 19 Jan  6f9d96a  zip  tar.gz  Notes

Cherry-picks for LTS 2020_09_23 Patch Release 2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
* Fixes race in AddressIsReadable file descriptors using stronger memory ordering
* Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.

Signed-off-by: Ben Pope <ben@vectorized.io>
BenPope added a commit to BenPope/redpanda that referenced this issue May 1, 2021
Abseil LTS 20210324, Patch 1 (redpanda-data#943)
* Add missing `add_subdirectory()` call for "cleanup" (redpanda-data#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <cblichmann@google.com>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes redpanda-data#931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
    ...
    24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:

    Fixes failing CMake string comparisons
    https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
    Unknown compiler:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
    Building with no default flags

Fixes redpanda-data#930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <cblichmann@users.noreply.github.com>
Co-authored-by: Abseil Team <absl-team@google.com>

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Cherry-picks for LTS 2020_09_23 Patch Release 3 (redpanda-data#888)
* Adds missing <limits> include to fix GCC 11 (prerelease) build
    on 19 Jan  6f9d96a  zip  tar.gz  Notes

Cherry-picks for LTS 2020_09_23 Patch Release 2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
* Fixes race in AddressIsReadable file descriptors using stronger memory ordering
* Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.

Signed-off-by: Ben Pope <ben@vectorized.io>
BenPope added a commit to BenPope/redpanda that referenced this issue May 19, 2021
Abseil LTS 20210324, Patch 1 (redpanda-data#943)
* Add missing `add_subdirectory()` call for "cleanup" (redpanda-data#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <cblichmann@google.com>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes redpanda-data#931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
    ...
    24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:

    Fixes failing CMake string comparisons
    https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
    Unknown compiler:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
    Building with no default flags

Fixes redpanda-data#930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <cblichmann@users.noreply.github.com>
Co-authored-by: Abseil Team <absl-team@google.com>

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Cherry-picks for LTS 2020_09_23 Patch Release 3 (redpanda-data#888)
* Adds missing <limits> include to fix GCC 11 (prerelease) build
    on 19 Jan  6f9d96a  zip  tar.gz  Notes

Cherry-picks for LTS 2020_09_23 Patch Release 2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
* Fixes race in AddressIsReadable file descriptors using stronger memory ordering
* Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.

Signed-off-by: Ben Pope <ben@vectorized.io>
BenPope added a commit to BenPope/redpanda that referenced this issue May 19, 2021
Abseil LTS 20210324, Patch 1 (redpanda-data#943)
* Add missing `add_subdirectory()` call for "cleanup" (redpanda-data#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <cblichmann@google.com>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes redpanda-data#931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
    ...
    24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:

    Fixes failing CMake string comparisons
    https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
    Unknown compiler:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
    Building with no default flags

Fixes redpanda-data#930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <cblichmann@users.noreply.github.com>
Co-authored-by: Abseil Team <absl-team@google.com>

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Cherry-picks for LTS 2020_09_23 Patch Release 3 (redpanda-data#888)
* Adds missing <limits> include to fix GCC 11 (prerelease) build
    on 19 Jan  6f9d96a  zip  tar.gz  Notes

Cherry-picks for LTS 2020_09_23 Patch Release 2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
* Fixes race in AddressIsReadable file descriptors using stronger memory ordering
* Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.

Signed-off-by: Ben Pope <ben@vectorized.io>
BenPope added a commit to BenPope/redpanda that referenced this issue May 19, 2021
Abseil LTS 20210324, Patch 1 (redpanda-data#943)
* Add missing `add_subdirectory()` call for "cleanup" (redpanda-data#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <cblichmann@google.com>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes redpanda-data#931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
    ...
    24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:

    Fixes failing CMake string comparisons
    https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
    Unknown compiler:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
    Building with no default flags

Fixes redpanda-data#930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <cblichmann@users.noreply.github.com>
Co-authored-by: Abseil Team <absl-team@google.com>

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Apply LTS transformations for 20210324 LTS branch (redpanda-data#920)
* Apply LTS transformations for 20210324 LTS branch

* Change the SOVERSION to make MacOS happy

MacOS expects the first part of the SOVERSION to fit into 16 bits.

Cherry-picks for LTS 2020_09_23 Patch Release 3 (redpanda-data#888)
* Adds missing <limits> include to fix GCC 11 (prerelease) build
    on 19 Jan  6f9d96a  zip  tar.gz  Notes

Cherry-picks for LTS 2020_09_23 Patch Release 2
* Fixes preprocessor condition for symbols __tsan_mutex_read_lock and
__tsan_mutex_try_lock
* Fixes race in AddressIsReadable file descriptors using stronger memory ordering
* Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.

Signed-off-by: Ben Pope <ben@vectorized.io>
@manstis
Copy link

manstis commented Nov 24, 2021

FWIW, here's a docker-compose.yml file that connects Redpanda to Kafdrop.

It's based on the template in this issue.. for which I am grateful as I was really struggling.

version: '3.7'
services:
  redpanda:
    entrypoint:
    - /usr/bin/rpk
    - redpanda
    - start
    - --smp
    - '1'
    - --reserve-memory
    - 0M
    - --overprovisioned
    - --node-id
    - '0'
    - --kafka-addr
    - INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
    - --advertise-kafka-addr
    - INSIDE://redpanda:9093,OUTSIDE://localhost:9092
    - --
    - --kernel-page-cache
    - '1'
    image: vectorized/redpanda:v21.4.1
    ports:
    - "9092:9092"
    expose:
    - "9093"
    volumes:
    - redpanda:/var/lib/redpanda/data

  kafdrop:
    image: obsidiandynamics/kafdrop
    depends_on:
      - redpanda
    ports:
      - "9000:9000"
    environment:
      KAFKA_BROKERCONNECT: "redpanda:9093"
      JVM_OPTS: "-Xms32M -Xmx64M"
      SERVER_SERVLET_CONTEXTPATH: "/"

volumes:
  redpanda: null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs good first issue Good for newcomers kind/enhance New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants