2024/๊ฐœ๋ฐœ

Spring Cloud Data Flow ๋กœ์ปฌ ๊ตฌ์ถ•๊ธฐ

mjin.park 2024. 8. 1. 23:48

๐Ÿ“ ๊ฐœ์š”

[2024/๊ฐœ๋ฐœ] - Spring Batch ๊ด€๋ฆฌ ๋„๊ตฌ Jenkins ๋Œ€์•ˆ ํƒ์ƒ‰๊ธฐ์—์„œ ํฅ๋ฏธ๊ฐ€ ์ƒ๊ธด Spring Cloud Data Flow(SCDF) ๊ฒฝํ—˜ํ•ด๋ณด์ž.

๋กœ์ปฌ์—์„œ SCDF๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •, Spring Batch ๊ด€๋ฆฌ ๋„๊ตฌ๋กœ ์ ์ ˆํ•œ์ง€ ๊ฒ€ํ† ํ•œ ๋‚ด์šฉ๋“ค์„ ๊ณต์œ ํ•  ์˜ˆ์ •์ด๋‹ค.

๐Ÿ‘จ‍๐Ÿ’ป Spring Cloud Data Flow ๋กœ์ปฌ ๊ตฌ์ถ•๊ธฐ

MacBook Air (M1)์—์„œ Spring Cloud Data Flow ๊ณต์‹ ๊ฐ€์ด๋“œ ๋ฌธ์„œ๋ฅผ ๋”ฐ๋ผ ๋กœ์ปฌ์— ๋„์›Œ๋ณด์ž.

  1. ๋กœ์ปฌ์— Docker Desktop, Docker, Docker Compose ์„ค์น˜
  2. Docker Compose ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ (๊ฐ€์ด๋“œ ๋งํฌ)
    • Docker Compose ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ๋ช…๋ น์–ด
      wget -O docker-compose.yml https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/main/src/docker-compose/docker-compose.yml;

      wget -O docker-compose-kafka.yml https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/main/src/docker-compose/docker-compose-kafka.yml;
      wget -O docker-compose-mysql.yml https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/main/src/docker-compose/docker-compose-mysql.yml;
  3. Docker Compose ์‹œ์ž‘ (๊ฐ€์ด๋“œ ๋งํฌ)
    • Docker Compose ์‹œ์ž‘ ๋ช…๋ น์–ด
      export DATAFLOW_VERSION=2.11.4
      export SKIPPER_VERSION=2.11.4
      docker-compose -f docker-compose.yml -f docker-compose-kafka.yml -f docker-compose-mysql.yml up
    • ๋งฅ๋ถ M1์—์„œ ์‹œ์ž‘์ด ์•ˆ๋œ๋‹ค๋ฉด, ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด๋ณด์ž.
    • "no matching manifest for linux/arm64/v8 in the manifest list entries"
      ๐Ÿ‘‰ ํ•ด๊ฒฐ๋ฐฉ๋ฒ• : docker-compose-mysql.yml ํŒŒ์ผ ๋‚ด image ์™€ ๋™์ผ dpeth์— ์•„๋ž˜ ๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.
      "platform: linux/x86_64"
    • "[ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user
      Remove MYSQL_USER="root" and use one of the following to control the root user password:
      - MYSQL_ROOT_PASSWORD
      - MYSQL_ALLOW_EMPTY_PASSWORD
      - MYSQL_RANDOM_ROOT_PASSWORD"
      ๐Ÿ‘‰ ํ•ด๊ฒฐ๋ฐฉ๋ฒ• : docker-compose-mysql.yml ํŒŒ์ผ ๋‚ด ์•„๋ž˜ ๋‚ด์šฉ์„ ์ œ๊ฑฐํ•˜๊ฑฐ๋‚˜ ์ฃผ์„์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.
      services.mysql ํ•˜์œ„์— ์žˆ๋Š” "MYSQL_USER: root" ๋งŒ ์ œ๊ฑฐ
  4. http://localhost:9393/dashboard ์ ‘์†

Spring Cloud Data Flow Dashboard

๋งˆ์ง€๋ง‰์œผ๋กœ Spring Cloud Data Flow๋ฅผ ์ค‘๋‹จํ•œ๋‹ค.

  1. Ctrl + C๋ฅผ ๋ˆŒ๋Ÿฌ์„œ docker-compose ํ”„๋กœ์„ธ์Šค ์ข…๋ฃŒ
  2. docker-compose down ๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•˜์—ฌ ์‚ฌ์šฉ๋œ Docker containers๋“ค์„ ์ •๋ฆฌ

๐Ÿ’ฌ ๋งบ์Œ๋ง

์‹œ์ž‘์ด ๋ฐ˜์ด๋ผ๊ณ  Spring Cloud Data Flow Dashboard๋ฅผ ๋„์šฐ๋Š” ๊ฒƒ๊นŒ์ง€ ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค.

์•ž์œผ๋กœ Spring Cloud Data Flow ๊ตฌ์กฐ๋‚˜ ๊ธฐ๋Šฅ๋“ค์„ ๋” ์•Œ์•„๋ณด๊ณ ,

๊ธฐ์กด Spring Batch ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ์—ฐ๋™์ด ๊ฐ€๋Šฅํ•œ์ง€ ๋“ฑ์— ๋Œ€ํ•ด์„œ ํ™•์ธํ•ด๋ณผ ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.

 

๋‹ค์Œ ํŽธ์€ [2024/๊ฐœ๋ฐœ] - Spring Cloud Data Flow ํ†บ์•„๋ณด๊ธฐ - Architecture (1)๋กœ ์ฐพ์•„๋ต™๊ฒ ์Šต๋‹ˆ๋‹ค.

 

๋ฐ˜์‘ํ˜•