반응형
Recent Posts
Recent Comments
관리 메뉴

개발잡부

[es8] Elasticsearch Plugin 8.6.2 본문

ElasticStack8/Elasticsearch

[es8] Elasticsearch Plugin 8.6.2

닉의네임 2023. 5. 20. 22:03
반응형

base 는 아래 프로젝트에서 버전업을 하고 디벨롭 한다. 

https://ldh-6019.tistory.com/394?category=1096525 

 

[es8] Elasticsearch Plugin 8.4.1

Elasticsearch 8.4 Plugin Build & Install TEST 작업 요약 github.com (https://github.com/elastic/elasticsearch.git) 에서 elasticsearch 소스 다운로드 소스에서 plugin > example > rest-handler 복사 build.gradle 수정 및 plugin 빌드 elastic

ldh-6019.tistory.com

 

build.gradle

에서 8.6.2로 버전을 올리고 빌드 해보자.

/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */

buildscript {
  repositories {
    mavenLocal()
    mavenCentral()
  }

  dependencies {
    classpath "org.elasticsearch.gradle:build-tools:8.6.2"
  }
}

plugins {
  id 'java'
}


apply plugin: 'elasticsearch.esplugin'
apply plugin: 'elasticsearch.yaml-rest-test'



esplugin {
  name 'rest-handler'
  description 'An example plugin showing how to register a REST handler'
  classname 'org.elasticsearch.dooplugin.resthandler.DooRestHandlerPlugin'
  licenseFile rootProject.file('SSPL-1.0+ELASTIC-LICENSE-2.0.txt')
  noticeFile rootProject.file('NOTICE.txt')
}

group = 'com.dooplugin'
version = '8.6'
sourceCompatibility = '18'

repositories {
  mavenCentral()
}


dependencies {
  implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '8.6.2'
//  yamlRestTestRuntimeOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}"

  testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.0'
  testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0'


}

test {
  useJUnitPlatform()
}

 

빌드해보자

#gradlew 경로로 이동
cd /Users/doo/project/dooplugin

#build
./gradlew clean assemble

결과물은 아래의 경로에

// output to build/distribtions/rest-handler.zip


cp -af rest-handler-8.6.zip ~/docker/es8.6.2/elasticsearch/plugin

 

Dockerfile

ARG ELASTIC_VERSION

# https://www.docker.elastic.co/
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}

# Add your elasticsearch plugins setup here
# Example: RUN elasticsearch-plugin install analysis-icu
COPY plugin/rest-handler-8.6.zip plugin/rest-handler-8.6.zip
RUN elasticsearch-plugin install file:///usr/share/elasticsearch/plugin/rest-handler-8.6.zip

 

컨테이너 실행 

#
docker compose down

#
docker compose up -d --build

확인

http://localhost:9200/_cat/900gle

 

반응형

'ElasticStack8 > Elasticsearch' 카테고리의 다른 글

[es8] aggregation - Pipeline Aggregations  (0) 2023.06.14
[es8] elasticsearch stable-esplugin  (0) 2023.05.21
[es8] similarity modules  (0) 2023.05.16
[es] _explain  (0) 2023.05.09
[es8] ignore_malformed  (0) 2023.01.23
Comments