-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from heesane/server
Server
- Loading branch information
Showing
26 changed files
with
724 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Declare files that will always have LF line endings on checkout. | ||
*.sh text eol=lf |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
version: '3.7' | ||
|
||
services: | ||
# setup: | ||
# profiles: | ||
# - setup | ||
# build: | ||
# context: setup/ | ||
# args: | ||
# ELASTIC_VERSION: 7.6.2 | ||
# init: true | ||
# volumes: | ||
# - ./setup/entrypoint.sh:/entrypoint.sh:ro,Z | ||
# - ./setup/lib.sh:/lib.sh:ro,Z | ||
# - ./setup/roles:/roles:ro,Z | ||
# environment: | ||
# ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} | ||
# LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-} | ||
# KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-} | ||
# METRICBEAT_INTERNAL_PASSWORD: ${METRICBEAT_INTERNAL_PASSWORD:-} | ||
# FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-} | ||
# HEARTBEAT_INTERNAL_PASSWORD: ${HEARTBEAT_INTERNAL_PASSWORD:-} | ||
# MONITORING_INTERNAL_PASSWORD: ${MONITORING_INTERNAL_PASSWORD:-} | ||
# BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-} | ||
# networks: | ||
# - elk | ||
# depends_on: | ||
# - elasticsearch | ||
|
||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2 | ||
container_name: elasticsearch | ||
volumes: | ||
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z | ||
- elasticsearch:/usr/share/elasticsearch/data:Z | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
environment: | ||
node.name: elasticsearch | ||
ES_JAVA_OPTS: -Xms512m -Xmx512m | ||
# Bootstrap password. | ||
# Used to initialize the keystore during the initial startup of | ||
# Elasticsearch. Ignored on subsequent runs. | ||
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} | ||
# Use single node discovery in order to disable production mode and avoid bootstrap checks. | ||
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html | ||
discovery.type: single-node | ||
networks: | ||
- elk | ||
restart: unless-stopped | ||
|
||
logstash: | ||
image: docker.elastic.co/logstash/logstash:7.6.2 | ||
container_name: logstash | ||
volumes: | ||
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z | ||
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro,Z | ||
ports: | ||
- 5044:5044 | ||
- 50000:50000/tcp | ||
- 50000:50000/udp | ||
- 9600:9600 | ||
environment: | ||
LS_JAVA_OPTS: -Xms256m -Xmx256m | ||
LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-} | ||
networks: | ||
- elk | ||
depends_on: | ||
- elasticsearch | ||
restart: unless-stopped | ||
|
||
kibana: | ||
image: docker.elastic.co/kibana/kibana:7.6.2 | ||
container_name: kibana | ||
volumes: | ||
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z | ||
ports: | ||
- 5601:5601 | ||
environment: | ||
KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-} | ||
networks: | ||
- elk | ||
depends_on: | ||
- elasticsearch | ||
restart: unless-stopped | ||
|
||
filebeat: | ||
image: docker.elastic.co/beats/filebeat:7.6.2 | ||
container_name: filebeat | ||
user: root | ||
command: | ||
- -e | ||
- --strict.perms=false | ||
volumes: | ||
- back_spring-log:/var/log/host_logs:ro | ||
- ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro,Z | ||
- type: bind | ||
source: /var/lib/docker/containers | ||
target: /var/lib/docker/containers | ||
read_only: true | ||
- type: bind | ||
source: /var/run/docker.sock | ||
target: /var/run/docker.sock | ||
read_only: true | ||
environment: | ||
FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-} | ||
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-} | ||
networks: | ||
- elk | ||
depends_on: | ||
- elasticsearch | ||
|
||
networks: | ||
elk: | ||
driver: bridge | ||
|
||
volumes: | ||
elasticsearch: | ||
back_spring-log: | ||
external: true | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore Docker build files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore OS artifacts | ||
**/.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# https://www.docker.elastic.co/ | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2 | ||
RUN elasticsearch-plugin install analysis-nori | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Default Elasticsearch configuration from Elasticsearch base image. | ||
## https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/config/elasticsearch.yml | ||
# | ||
cluster.name: docker-cluster | ||
network.host: 0.0.0.0 | ||
|
||
xpack.security.enabled: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore Docker build files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore OS artifacts | ||
**/.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ARG ELASTIC_VERSION | ||
|
||
FROM docker.elastic.co/beats/filebeat:7.6.2 | ||
|
||
COPY config/filebeat.yml /usr/share/filebeat/filebeat.yml | ||
USER root | ||
|
||
RUN mkdir /var/logs | ||
|
||
RUN chown -R root /usr/share/filebeat |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
filebeat.inputs: | ||
- type: log | ||
enabled: true | ||
paths: | ||
- /var/log/host_logs/*.log | ||
|
||
output.logstash: | ||
hosts: ["logstash:5044"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: '3.7' | ||
|
||
services: | ||
filebeat: | ||
build: | ||
context: filebeat/ | ||
args: | ||
ELASTIC_VERSION: ${ELASTIC_VERSION} | ||
user: root | ||
command: | ||
- -e | ||
- --strict.perms=false | ||
volumes: | ||
- ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro,Z | ||
- type: bind | ||
source: /var/lib/docker/containers | ||
target: /var/lib/docker/containers | ||
read_only: true | ||
- type: bind | ||
source: /var/run/docker.sock | ||
target: /var/run/docker.sock | ||
read_only: true | ||
environment: | ||
FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-} | ||
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-} | ||
networks: | ||
- elk | ||
depends_on: | ||
- elasticsearch |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore Docker build files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore OS artifacts | ||
**/.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ARG ELASTIC_VERSION | ||
|
||
# https://www.docker.elastic.co/ | ||
FROM docker.elastic.co/kibana/kibana:7.6.2 | ||
|
||
# Add your kibana plugins setup here | ||
# Example: RUN kibana-plugin install <name|url> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
server.name: kibana | ||
server.host: 0.0.0.0 | ||
elasticsearch.hosts: http://elasticsearch:9200 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore Docker build files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore OS artifacts | ||
**/.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ARG ELASTIC_VERSION | ||
|
||
# https://www.docker.elastic.co/ | ||
FROM docker.elastic.co/logstash/logstash:7.6.2 | ||
|
||
# Add your logstash plugins setup here | ||
# Example: RUN logstash-plugin install logstash-filter-json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
## Default Logstash configuration from Logstash base image. | ||
## https://github.com/elastic/logstash/blob/main/docker/data/logstash/config/logstash-full.yml | ||
# | ||
http.host: 0.0.0.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
input { | ||
beats { | ||
port => 5044 | ||
} | ||
} | ||
|
||
## Add your filters / logstash plugins configuration here | ||
|
||
output { | ||
elasticsearch { | ||
hosts => "elasticsearch:9200" | ||
index => "logstash-%{+YYYY.MM.dd}" | ||
user => "elastic" | ||
password => "${LOGSTASH_INTERNAL_PASSWORD}" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Ignore Docker build files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore OS artifacts | ||
**/.DS_Store | ||
|
||
# Ignore Git files | ||
.gitignore |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ARG ELASTIC_VERSION | ||
|
||
# https://www.docker.elastic.co/ | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION} | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
Oops, something went wrong.