-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
148 additions
and
0 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 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,113 @@ | ||
|
||
version: '3.7' | ||
services: | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0 | ||
container_name: elasticsearch1 | ||
environment: | ||
- node.name=elasticsearch1 | ||
- cluster.name=docker-cluster | ||
- cluster.initial_master_nodes=elasticsearch1 | ||
- bootstrap.memory_lock=true | ||
- "ES_JAVA_OPTS=-Xms256M -Xmx256M" | ||
- http.cors.enabled=true | ||
- http.cors.allow-origin=* | ||
- network.host=_eth0_ | ||
ulimits: | ||
nproc: 65535 | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
cap_add: | ||
- ALL | ||
deploy: | ||
replicas: 1 | ||
update_config: | ||
parallelism: 1 | ||
delay: 10s | ||
resources: | ||
limits: | ||
cpus: '1' | ||
memory: 1G | ||
reservations: | ||
cpus: '1' | ||
memory: 256M | ||
restart_policy: | ||
condition: on-failure | ||
delay: 5s | ||
max_attempts: 3 | ||
window: 10s | ||
volumes: | ||
- type: volume | ||
source: logs | ||
target: /var/log | ||
- type: volume | ||
source: esdata1 | ||
target: /usr/share/elasticsearch/data | ||
networks: | ||
- elastic | ||
- ingress | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
kibana: | ||
image: docker.elastic.co/kibana/kibana:7.8.0 | ||
container_name: kibana | ||
environment: | ||
SERVER_NAME: localhost | ||
ELASTICSEARCH_URL: http:https://elasticsearch1:9200/ | ||
ports: | ||
- 5601:5601 | ||
volumes: | ||
- type: volume | ||
source: logs | ||
target: /var/log | ||
ulimits: | ||
nproc: 65535 | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
cap_add: | ||
- ALL | ||
deploy: | ||
replicas: 1 | ||
update_config: | ||
parallelism: 1 | ||
delay: 10s | ||
resources: | ||
limits: | ||
cpus: '1' | ||
memory: 256M | ||
reservations: | ||
cpus: '1' | ||
memory: 256M | ||
restart_policy: | ||
condition: on-failure | ||
delay: 30s | ||
max_attempts: 3 | ||
window: 120s | ||
networks: | ||
- elastic | ||
- ingress | ||
volumes: | ||
esdata1: | ||
esdata2: | ||
esdata3: | ||
logs: | ||
|
||
networks: | ||
elastic: | ||
ingress: | ||
|
||
# configs: | ||
# auditbeat_config: | ||
# file: configs/auditbeat.docker.yml | ||
# filebeat_config: | ||
# file: configs/filebeat.docker.yml | ||
# heartbeat_config: | ||
# file: configs/heartbeat.docker.yml | ||
# metricbeat_config: | ||
# file: configs/metricbeat.docker.yml | ||
# packetbeat_config: | ||
# file: configs/packetbeat.docker.yml | ||
|
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 @@ | ||
Exit 78 on docker => grep vm.max_map_count /etc/sysctl.conf |
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,22 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.define "docker" do |docker| | ||
docker.vm.box = "geerlingguy/centos7" | ||
docker.vm.network "private_network", type: "dhcp" | ||
docker.vm.hostname = "docker" | ||
docker.vm.provider "virtualbox" do |v| | ||
v.name = "docker" | ||
v.memory = 3024 | ||
v.cpus = 2 | ||
end | ||
docker.vm.provision :shell do |shell| | ||
shell.path = "install_docker.sh" | ||
end | ||
end | ||
end | ||
|
||
|
||
|
||
|
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 @@ | ||
#!/bin/bash | ||
sudo yum -y update | ||
|
||
# install docker | ||
curl -fsSL https://get.docker.com -o get-docker.sh | ||
sh get-docker.sh | ||
sudo usermod -aG docker vagrant | ||
sudo systemctl enable docker | ||
sudo systemctl start docker | ||
echo "For this Stack, you will use $(ip -f inet addr show enp0s8 | sed -En -e 's/.*inet ([0-9.]+).*/\1/p') IP Address" |