diff options
author | 2019-03-01 16:03:03 +0000 | |
---|---|---|
committer | 2019-03-01 16:03:03 +0000 | |
commit | e07d5b8dc0801583518b4f27ce6b8f3b56bcf206 (patch) | |
tree | 66fa70a6f5a1fbeb069723b3d9df07759d58d7c8 /elasticsearch-sg | |
parent | 5ea47abeeb1713b56006fd69b1564cbd4c4220c7 (diff) |
Add elasticsearch with searchguard Dockerfile
Add Dockerfile that produces an image of ElasticSearch with SearchGuard
plugin pre-installed, and restructure the Maven project to build both
the old search-data-service Dockerfile and the new elasticsearch-sg
Dockerfile.
Change-Id: Iff7cb79e3c09da78b6233422f40cb03eeef5bfdb
Issue-ID: AAI-2203
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
Diffstat (limited to 'elasticsearch-sg')
-rw-r--r-- | elasticsearch-sg/pom.xml | 81 | ||||
-rw-r--r-- | elasticsearch-sg/src/main/docker/Dockerfile | 10 |
2 files changed, 91 insertions, 0 deletions
diff --git a/elasticsearch-sg/pom.xml b/elasticsearch-sg/pom.xml new file mode 100644 index 0000000..cd24333 --- /dev/null +++ b/elasticsearch-sg/pom.xml @@ -0,0 +1,81 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + Copyright © 2017-2018 Amdocs + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.onap.aai.search-data-service</groupId> + <artifactId>elasticsearch-sg</artifactId> + <name>elasticsearch with searchguard</name> + <version>1.4.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.7</version> + <executions> + <execution> + <id>copy-docker-file</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>target</outputDirectory> + <overwrite>true</overwrite> + <resources> + <resource> + <directory>${basedir}/src/main/docker</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.4.11</version> + <configuration> + <verbose>true</verbose> + <serverId>docker-hub</serverId> + <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName> + <dockerDirectory>${basedir}/target</dockerDirectory> + <imageTags> + <imageTag>latest</imageTag> + </imageTags> + <forceTags>true</forceTags> + </configuration> + </plugin> + + </plugins> + </build> + +</project>
\ No newline at end of file diff --git a/elasticsearch-sg/src/main/docker/Dockerfile b/elasticsearch-sg/src/main/docker/Dockerfile new file mode 100644 index 0000000..0ccb31d --- /dev/null +++ b/elasticsearch-sg/src/main/docker/Dockerfile @@ -0,0 +1,10 @@ +# https://github.com/elastic/elasticsearch-docker +FROM docker.elastic.co/elasticsearch/elasticsearch:6.1.2 + +USER elasticsearch + +# Search Guard plugin +RUN elasticsearch-plugin install --batch com.floragunn:search-guard-6:6.1.2-22.3 \ + && chmod +x plugins/search-guard-6/tools/*.sh + +ENTRYPOINT ["/usr/share/elasticsearch/bin/run.sh"]
\ No newline at end of file |