All Articles

์นดํ”„์นด, ๋ฐ์ดํ„ฐ ํ”Œ๋žซํผ์˜ ์ตœ๊ฐ•์ž๋ฅผ ์ฝ๊ณ 

๋„ค์ด๋ฒ„ ๋„์„œ ๋งํฌ

ํšŒ์‚ฌ์— ๋‹ค๋‹ˆ๋‹ค๋ณด๋‹ˆ ์นดํ”„์นด๋ฅผ ์•ˆ ์“ธ ์ˆ˜๊ฐ€ ์—†์–ด์„œ ์–ด๋–ป๊ฒŒ ์ตํžˆ์ง€ ํ•˜๋‹ค๊ฐ€ ํšŒ์‚ฌ ๋„์„œ๊ด€์—์„œ ๋นŒ๋ ค๋ณธ ์ฑ…. ์ €์ž ๋‘ ๋ถ„์€ ์นด์นด์˜ค์—์„œ ์ „์‚ฌ ๊ณต์šฉ ์นดํ”„์นด ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์šด์˜ํ•˜์‹œ๋Š” ๋ถ„๋“ค์ธ๋ฐ ๊ทธ๋ž˜์„œ ๊ทธ๋Ÿฐ์ง€ ์ •๋ง ์‹ค์šฉ์ ์ธ ๋‚ด์šฉ๋งŒ ์™์™ ๋‹ด์•„์ฃผ์…จ๋‹ค. ๋‚ด์šฉ์€ ์ฝ์œผ๋ฉด์„œ ์ž‘์„ฑํ•œ ๋…ธ์…˜ ๋ฉ”๋ชจ๋ฅผ ์ฐธ๊ณ ํ•˜์‹œ๊ณ โ€ฆ ์ „๋ฐ˜์ ์œผ๋กœ ์—„์ฒญ ํฐ ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์šด์˜ํ•  ๋•Œ์˜ ๊ฟ€ํŒ, ์‚ฝ์งˆ๊ธฐ ๊ทธ๋Ÿฐ ๋‚ด์šฉ๋ณด๋‹ค๋Š” ์นดํ”„์นด๋ฅผ ์ฒ˜์Œ ์ ‘ํ•˜๊ณ  ํ•œ 5๋Œ€ ๊ทœ๋ชจ๋กœ ์šด์˜ํ•ด์•ผ ํ•˜๋Š” ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•ด ์“ฐ์—ฌ์กŒ๋‹ค. ์–ด์ฉŒ๋ฉด ์นดํ”„์นด๊ฐ€ ์ด์ œ ๊ฝค ์„ฑ์ˆ™ํ•ด์„œ ์„ค๋ช…์ด ๋ณ„๋กœ ์—†๋Š” ๊ฒƒ์ผ ์ˆ˜๋„ ์žˆ๊ฒ ๋Š”๋ฐ ์–ด์จŒ๋“  โ€˜์ฃผํ‚คํผ ๊น”๊ณ  ์นดํ”„์นด ๊น”๊ณ  ํ† ํ”ฝ ๋งŒ๋“ค๊ณ  ํ”„๋กœ๋“€์„œ ๋งŒ๋“ค์–ด์„œ ์ปจ์Šˆ๋จธ๋กœ ๊ฐ€์ ธ๋‹ค ์“ฐ๊ณ ,,, ๋ชจ๋‹ˆํ„ฐ๋ง๋„ ํ•˜๊ณ  ๊ฐ€๋” ์—…๋ฐ์ดํŠธ๋„ ํ•˜๊ณ โ€™ํ•˜๋Š” ํ๋ฆ„์„ ์ถฉ์‹คํ•˜๊ฒŒ ์งš์–ด์ฃผ์‹ ๋‹ค.

์›๋ž˜ ์ฑ…์„ ์ฝ์œผ๋ฉด ์˜ˆ์ œ๋ฅผ ๋‹ค ๋”ฐ๋ผ ์ณ๋ณด๊ณ , ๊ฒฐ๊ณผ๋„ ๋‹ค ํ™•์ธํ•˜๋Š” ํŽธ์ธ๋ฐ ๋„ˆ๋ฌด ์„ค๋ช…์ด ์ž˜ ๋˜์žˆ์–ด์„œ ์ง์ ‘ ๋”ฐ๋ผ์ณ๋ณด์ง€ ์•Š๊ณ  3์‹œ๊ฐ„ ๋™์•ˆ ๋น ๋ฅด๊ฒŒ ์ฝ์—ˆ๋‹ค. ๊ทธ๋ ‡๊ฒŒ ์ฝ์–ด๋„ ์ข‹๊ณ , ์‹ค์ œ ๋จธ์‹ ์— ํ•˜๋‚˜์”ฉ ๊น”์•„๋ณด๋ฉด์„œ ๋”ฐ๋ผ๊ฐ€๋„ ์ข‹์€ ์ฑ…. ์—ญ์„œ๋ณด๋‹ค๋„ ์ด๋ ‡๊ฒŒ ํ•œ๊ตญ๋ถ„์ด ์“ฐ์‹  ์ข‹์€ ์ฑ…์„ ๋ณด๋ฉด ์ฐธ ๋ฐ˜๊ฐ‘๋‹ค.

๋‹ค์‹œ ์›๋ž˜ ๋ชฉ์ ์œผ๋กœ ๋Œ์•„์™€์„œ ์นดํ”„์นด๋ฅผ โ€˜์ตํžˆ๋ ค๋ฉดโ€™ ์ด์ œ ๋ฌด์—‡์„ ํ•ด์•ผํ• ๊นŒ. ์ œ์ผ ์ข‹์€ ๊ฒƒ์€ ์ด๊ฑธ ์ด์šฉํ•œ ๋ฌด์–ธ๊ฐ€๋ฅผ ๋งŒ๋“ค์–ด๋ณด๋Š” ๊ฒƒ์ธ๋ฐ ๊ทธ๋Ÿฌ๋ ค๋ฉด ์ผ๋‹จ ์นดํ”„์นด๋ฅผ ๋„์›Œ์•ผ ํ•œ๋‹ค. ๋‚ด๊ฐ€ ์นดํ”„์นด๋ฅผ ๋ฆฌ์–ผ ๋จธ์‹ ์— ๊น”๋ฉด์„œ ์šด์˜ํ•  ์ผ์€ ์—†์œผ๋‹ˆ (๊น”์•„๋„ ์•„๋งˆ k8s์— ๊น” ๋“ฏโ€ฆ?) ๊ฐ„ํŽธํ•˜๊ฒŒ ๋„์ปค๋กœ ๋„์›Œ๋ณด์ž. ์ด๊ด‘์‹๋‹˜์˜ ๋ธ”๋กœ๊ทธ ๊ธ€์ด ์„ค๋ช…์ด ๊ฐ€์žฅ ์ž˜ ๋˜์–ด ์žˆ์ง€๋งŒ, ํ•œ๊ฐ€์ง€ ์•„์‰ฌ์šด ์ ์€ kafka-manager๊ฐ€ ๋น ์ ธ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋‘๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค

  1. ์†Œ์Šค๋ฅผ ๋ฐ›์•„์„œ ๋กœ์ปฌ์—์„œ ๋นŒ๋“œํ•˜๋Š” ๋ฐฉ๋ฒ• - ์•„๋งˆ ๊ฐ™์€ ์ธต์— ๊ณ„์‹ ๊ฑฐ๋กœ ์ถ”์ •๋˜๋Š” ๋ถ„์ด ์ •๋ฆฌ๋ฅผ ์ž˜ ํ•ด์ฃผ์…จ๋‹ค. https://blog.naver.com/occidere/221395731049
  2. ๋„์ปค๋ฅผ ์“ฐ๋Š” ๋ฒ• - ๋‹คํ–‰ํžˆ ๋„์ปค๋กœ ์ž˜ ๋ง์•„์ฃผ์‹  ๋ถ„์ด ๊ณ„์‹ ๋‹ค. sheepkiller/kafka-manager-docker

(19-04-06) ์•„๋ž˜์™€ ๊ฐ™์€ ์‚ฝ์งˆ์„ ํ•˜์ง€ ๋ง๊ณ  ๊ทธ๋ƒฅ Confluent Platform Quickstart ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ์“ฐ๋ฉด ํ•ด๊ฒฐ

์นดํ”„์นด ๋งค๋‹ˆ์ €๋งŒ ๋”ฐ๋กœ ๋„์šฐ๋ฉด ๊ณ„์† ์˜ฌ๋ฆฌ๊ณ  ๋‚ด๋ฆฌ๊ธฐ ๊ท€์ฐฎ์œผ๋‹ˆ๊นŒ ์ €๊ธฐ์„œ ๋‚˜์˜จ docker-compose-single-broker.yml ๋ฐ‘์—๋‹ค๊ฐ€ kafka-manager๋ฅผ ์ถ”๊ฐ€ํ•ด์ค€๋‹ค.

(๊ธฐํƒ€ ๋“ฑ๋“ฑ)
kafka-manager:
  image: sheepkiller/kafka-manager:latest
  ports:
    - "9000:9000"
  links:
    - zookeeper
    - kafka
  environment:
    ZK_HOSTS: zookeeper:2181
    APPLICATION_SECRET: letmein
    KM_ARGS: -Djava.net.preferIPv4Stack=true

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์™ ๋งŒํ•œ๊ฑด ๋‹ค ๋˜๋Š”๋ฐ, ์ € ์ด๋ฏธ์ง€๊ฐ€ ๋นŒ๋“œ๋œ์ง€ ์ข€ ๋˜์„œ ์ตœ์‹  kafka-manager๊ฐ€ ๋‹ด๊ฒจ์žˆ์ง€ ์•Š๋‹ค. ๋”ฐ๋ผ์„œ ์ตœ์‹  ๋ฒ„์ „์˜ ์นดํ”„์นด๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๊ณ , ๋ช‡๋ช‡ ์ด์Šˆ ๋“ค์„ ๋ฐŸ์„ ์ˆ˜ ์žˆ์œผ๋‹ˆ ์ € ์ด๋ฏธ์ง€๋ฅผ ์‚ด์ง ๊ณ ์ณ์„œ ์ตœ์‹  ๋ฒ„์ „์˜ kafka-manager ์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•œ๋‹ค. sheepkiller/kafka-manager-docker/Dockerfile๋ฅผ ๋ณด๋ฉด

ENV JAVA_HOME=/usr/java/default/ \
    ZK_HOSTS=localhost:2181 \
    KM_VERSION=1.3.1.8 \
    KM_REVISION=97329cc8bf462723232ee73dc6702c064b5908eb \
    KM_CONFIGFILE="conf/application.conf"

์ด๋ ‡๊ฒŒ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ฃผ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค. ์—ฌ๊ธฐ์„œ KM_VERSION์ด๋ž‘ KM_REVISION์„ ์ˆ˜์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. kafka-manager ๋ฆฌํฌ์˜ release๋ฅผ ๋ณด๋ฉด ์ตœ์‹  ๋ฒ„์ „์ด๋ž‘ ์ปค๋ฐ‹ID๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๊ฑธ๋กœ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๊ณ ,

ENV JAVA_HOME=/usr/java/default/ \
  ZK_HOSTS=localhost:2181 \
  KM_VERSION=1.3.3.23 \
  KM_REVISION=2ca848bfdf542bf1da8fc860db9bbcc99548f89d \
  KM_CONFIGFILE="conf/application.conf"

์˜๊ฒ์˜ ์„ธ์›”์„ ๊ธฐ๋‹ค๋ ค์„œ ์ด๋ฏธ์ง€๋ฅผ ๋นŒ๋“œํ•˜๋ฉด ๊ฐœ๋ฐœ์šฉ์œผ๋กœ ์“ธ๋งŒํ•œ ์นดํ”„์นด๋ž‘ ์นดํ”„์นด ๋งค๋‹ˆ์ €๋ฅผ ํŽธํ•˜๊ฒŒ ๋„์šธ ์ˆ˜ ์žˆ๋‹ค.

Published Mar 17, 2019

If I keep marking the dots, someday they will ๐Ÿ”—๐Ÿ”—