[NO-ISSUE] 레시피 Elasticsearch 인덱스 분리 (개발,테스트/운영 환경별)#377
Open
yeonju52 wants to merge 1 commit into
Open
Conversation
zooxop
reviewed
Feb 17, 2025
Contributor
There was a problem hiding this comment.
이렇게 사용하면 Elasticsearch 의 모든 인덱스명을 application.yml 에 작성해줘야 하는 불편함이 생길 것 같아요. 현재 작성해주신 코드 기준으로도, ingredients_dictionary 인덱스는 개발과 운영을 분리할 수 없는 상태네요.
현재 동작중인 profile 값을 런타임 환경에서 가져올 수 있는 방법이 있을 것 같은데, 그걸 활용해보면 좋을 것 같아요.
예를 들면, 현재 세팅을 기준으로 각자 로컬에서 서버를 실행할때는 profile이 local 로 실행되고, 운영에서는 prod 로 실행되는 중이니, ES index명 앞(또는 뒤)에 profile 값을 붙여서 처리하도록 하면 될 것 같아요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
ElasticSearch 인덱스 (개발,테스트/운영) 분리
기존 문제점: ElasticSearch에서
recipes라는 하나의 인덱스를 사용하고 있었음변경 사항:
application.yml을 통해 동적으로 인덱스를 설정하도록 변경recipe_dev인덱스recipe_prod인덱스recipe_dev와 동일한 인덱스 사용 (분리 여부 논의 필요)전달사항
recipe인덱스 생성 명령어: Confluence의ElasticSearch recipe 인덱스 생성 명령어에 정리되어 있음 (이미 인덱스가 생성되어 추가 작업은 필요 없음.)ElasticSearch 관련 전달 사항:
recipes인덱스를 삭제한 후,POST https://nangpago.site/api/recipe/bulk-upload/mysql를 실행하면, 현재 운영 MySQL DB 기준으로 데이터가 업데이트될 것임PR 유형
PR Checklist