Skip to content

Commit

Permalink
sync with lab
Browse files Browse the repository at this point in the history
  • Loading branch information
abrobi committed Feb 28, 2024
1 parent 7c93c2d commit 723f3f3
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ http:https://localhost:9200
* [Hands on Elasticsearch](https://medium.com/@maxy_ermayank/hands-on-elasticsearch-8fa59d8aebfc)
* [Elasticsearch Resources](https://medium.com/@maxy_ermayank/elasticsearch-resources-27d24f01c1dc)
* [Open Distro Elasticsearch](https://medium.com/@maxy_ermayank/tl-dr-aws-open-distro-elasticsearch-fc642f0e592a)

##
113 changes: 113 additions & 0 deletions docker-compose-elastic-kibana.yaml
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

1 change: 1 addition & 0 deletions lab-vagrant/README.md
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
22 changes: 22 additions & 0 deletions lab-vagrant/Vagrantfile
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




10 changes: 10 additions & 0 deletions lab-vagrant/install_docker.sh
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"

0 comments on commit 723f3f3

Please sign in to comment.