Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 505f52e

Browse files
authored
Merge pull request #30 from shazChaudhry/v7.0.0
Upgraded to V7.x
2 parents cd82348 + 6f6cc93 commit 505f52e

12 files changed

+37
-37
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ For the full list of free features that are included in the basic license, see:
4343

4444
# Get docker compose files
4545
You will need these files to deploy Eleasticsearch, Logstash, Kibana, and Beats. So, first SSH in to the master node of the Docker Swarm cluster allocated to running Elastic Stack and clone this repo by following these commands:
46-
* `alias git='docker run -it --rm --name git -v $PWD:/git -w /git alpine/git'` _(This alias is only required if git is *not* already installed on your machine. This alias will allow you to clone the repo using a git container)_
46+
* `alias git='docker run -it --rm --name git -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:/git -w /git alpine/git'` _(This alias is only required if git is *not* already installed on your machine. This alias will allow you to clone the repo using a git container)_
4747
* `git version`
4848
* `git clone https://github.com/shazChaudhry/docker-elastic.git`
49-
* `sudo chown -R $USER:$USER docker-elastic`
5049
* `cd docker-elastic`
5150

5251
# Deploy Elastic Stack
5352
* SSH in to the master node of the Docker Swarm cluster allocated to running Elastic Stack. Deploy Elastic stack by running the following commands:
54-
* `export ELASTIC_VERSION=6.7.0`
53+
* `export ELASTIC_VERSION=7.1.1`
5554
* `export ELASTICSEARCH_USERNAME=elastic`
5655
* `export ELASTICSEARCH_PASSWORD=changeme`
56+
* `export INITIAL_MASTER_NODES=node1` _(See Important discovery and cluster formation settings: https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html#initial_master_nodes)_
5757
* `export ELASTICSEARCH_HOST=node1` _(node1 is default value if you are creating VirtualBox with the provided Vagrantfile. Otherwise, change this value to one of your VMs in the swarm cluster)_
5858
* `docker network create --driver overlay --attachable elastic`
5959
* `docker stack deploy --compose-file docker-compose.yml elastic` _(Assuming you have only two VMs, this will deploy a reverse proxy, logstash, Kibana and 2x Elasticsearch instances in Master / data nodes configuration. Please note that Elasticsearch is configured to start as a global service which means elasticsearch data nodes will be scalled out automatically as soon as new VMs are added to the Swarm cluster. Here is an explaination on various Elasticsearch cluster nodes: https://discuss.elastic.co/t/node-types-in-an-elasticsearch-cluster/25488)_
@@ -67,7 +67,7 @@ You will need these files to deploy Eleasticsearch, Logstash, Kibana, and Beats.
6767
SSH in to the master node of the Docker Swarm cluster allocated to running containerized custom applicatins and beats. Clone this repo and change directory as per the instructions above.
6868

6969
Execute the following commands to deploy filebeat and metricbeat:
70-
* `export ELASTIC_VERSION=6.7.0`
70+
* `export ELASTIC_VERSION=7.1.1`
7171
* `export ELASTICSEARCH_USERNAME=elastic`
7272
* `export ELASTICSEARCH_PASSWORD=changeme`
7373
* `export ELASTICSEARCH_HOST=node1` _(node1 is default value if you are creating VirtualBox with the provided Vagrantfile. Otherwise, change this value to your Elasticsearch host)_

Vagrantfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
$docker_swarm_init = <<SCRIPT
55
docker swarm init --advertise-addr 192.168.99.101 --listen-addr 192.168.99.101:2377
66
docker swarm join-token --quiet worker > /vagrant/worker_token
7+
docker swarm join-token --quiet manager > /vagrant/manager_token
78
SCRIPT
89

910
Vagrant.configure("2") do |config|
10-
# https://app.vagrantup.com/ralfkrause/boxes/centos7
11-
config.vm.box = "ralfkrause/centos7"
12-
config.vm.box_version = "1.0.0"
11+
# https://app.vagrantup.com/bento/boxes/ubuntu-18.04
12+
config.vm.box = "bento/ubuntu-18.04"
1313
config.hostmanager.enabled = true
1414
config.hostmanager.manage_host = true
1515
config.hostmanager.manage_guest = true
@@ -21,7 +21,7 @@ Vagrant.configure("2") do |config|
2121
node1.vm.network :private_network, ip: "192.168.99.101"
2222
node1.vm.provider :virtualbox do |v|
2323
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
24-
v.customize ["modifyvm", :id, "--memory", 4000]
24+
v.customize ["modifyvm", :id, "--memory", 3000]
2525
v.customize ["modifyvm", :id, "--name", "node1"]
2626
end
2727
node1.vm.provision :shell, inline: $docker_swarm_init

auditbeat-README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Eagerly waiting for Docker 19.06 release which will bring --privileged flag to Docker Swarm Mode https://github.com/moby/moby/issues/24862#issuecomment-451594187. support for capabilities https://github.com/moby/moby/pull/38380
22

3-
Until capabilities are availale in docker swarm mode, execute te following instructions on each node where auditbeat is required
3+
Until capabilities are available in docker swarm mode, execute the following instructions on each node where auditbeat is required
44

55
Firstly, set the system variables as needed:
6-
- export ELASTIC_VERSION=6.7.0
6+
- export ELASTIC_VERSION=7.1.1
77
- export ELASTICSEARCH_USERNAME=elastic
88
- export ELASTICSEARCH_PASSWORD=changeme
99
- export ELASTICSEARCH_HOST=node1
@@ -26,7 +26,7 @@ And than run the command below:
2626
--env ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme} \
2727
--env ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST:-node1} \
2828
--env KIBANA_HOST=${KIBANA_HOST:-node1} \
29-
docker.elastic.co/beats/auditbeat:${ELASTIC_VERSION:-6.7.0} \
29+
docker.elastic.co/beats/auditbeat:${ELASTIC_VERSION:-7.1.1} \
3030
--strict.perms=false
3131
```
3232

auditbeat-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: "3.7"
66
services:
77

88
auditbeat:
9-
image: docker.elastic.co/beats/auditbeat:${ELASTIC_VERSION:-6.7.0}
9+
image: docker.elastic.co/beats/auditbeat:${ELASTIC_VERSION:-7.1.1}
1010
# https://github.com/docker/swarmkit/issues/1951
1111
hostname: "{{.Node.Hostname}}-auditbeat"
1212
# Need to override user so we can access the log files, and docker.sock

deployStack.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash
22

3-
export ELASTIC_VERSION=6.7.0
3+
export ELASTIC_VERSION=7.1.1
44
export ELASTICSEARCH_USERNAME=elastic
55
export ELASTICSEARCH_PASSWORD=changeme
66
export ELASTICSEARCH_HOST=node1
7+
export INITIAL_MASTER_NODES=node1
78

89
docker network create --driver overlay --attachable elastic
910
docker stack deploy --compose-file docker-compose.yml elastic

docker-compose.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@ services:
3434
- BIND_PORTS=9200
3535

3636
elasticsearch:
37-
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-6.7.0}
38-
# https://github.com/docker/swarmkit/issues/1951
39-
hostname: "{{.Node.Hostname}}-elasticsearch"
37+
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-7.1.1}
4038
environment:
41-
- discovery.zen.ping.unicast.hosts=elasticsearch
42-
- discovery.zen.minimum_master_nodes=1
39+
# https://github.com/docker/swarmkit/issues/1951
40+
- node.name={{.Node.Hostname}}
41+
- discovery.seed_hosts=elasticsearch
42+
- cluster.initial_master_nodes=${INITIAL_MASTER_NODES:-node1}
43+
- cluster.name=DevOps
4344
- ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
4445
- xpack.security.enabled=true
4546
- xpack.monitoring.collection.enabled=true
4647
- xpack.license.self_generated.type=trial
47-
- cluster.name=DevOps
48-
- node.name={{.Node.Hostname}}-elasticsearch
4948
- network.host=0.0.0.0
5049
networks:
5150
- elastic
@@ -62,7 +61,7 @@ services:
6261
- com.df.srcPort=9200
6362

6463
logstash:
65-
image: docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-6.7.0}
64+
image: docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-7.1.1}
6665
hostname: "{{.Node.Hostname}}-logstash"
6766
environment:
6867
- XPACK_MONITORING_ELASTICSEARCH_URL=http://elasticsearch:9200
@@ -77,7 +76,7 @@ services:
7776
target: /usr/share/logstash/pipeline/logstash.conf
7877

7978
kibana:
80-
image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION:-6.7.0}
79+
image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION:-7.1.1}
8180
hostname: "{{.Node.Hostname}}-kibana"
8281
environment:
8382
- ELASTICSEARCH_URL=http://elasticsearch:9200

examples/learn_autodiscover.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Use the provided Vagrantfile to create 3x VMs:
99

1010
### Versions
1111
Example has been tested in following versions:
12-
- Elasticsearch 6.7.0
13-
- Kibana 6.7.0
14-
- Filebeat 6.7.0
15-
- Metricbeat 6.7.0
12+
- Elasticsearch 7.1.1
13+
- Kibana 7.1.1
14+
- Filebeat 7.1.1
15+
- Metricbeat 7.1.1
1616

1717
### Elastic Stack - Apache2 module
1818
Ensure there is nothing listening on port 80.

examples/learn_filebeat.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ The examples here are for learning purpose only and show how to start filebeat a
22

33
### Versions
44
Example has been tested in following versions:
5-
- Elasticsearch 6.7.0
6-
- Kibana 6.7.0
7-
- Filebeat 6.7.0
5+
- Elasticsearch 7.1.1
6+
- Kibana 7.1.1
7+
- Filebeat 7.1.1
88

99

1010
### Prerequisites
@@ -28,7 +28,7 @@ docker container run --rm \
2828
--network host \
2929
--volume filebeat:/usr/share/filebeat/data \
3030
--volume $PWD:/tmp \
31-
docker.elastic.co/beats/filebeat:6.7.0 \
31+
docker.elastic.co/beats/filebeat:7.1.1 \
3232
-e --modules=nginx --setup -M "nginx.access.var.paths=[/tmp/nginx_logs]" \
3333
-E output.elasticsearch.hosts='node1:9200' \
3434
-E output.elasticsearch.username=elastic \
@@ -65,7 +65,7 @@ chmod go-w ./nyc_collision_filebeat.yml
6565
```
6666
Modify the paths to `/tmp/nyc_collision_data.csv` and replace the word _prospectors_ with `inputs` in nyc_collision_filebeat.yml
6767
```
68-
docker container run --name filebeat --rm --network host --volume filebeat:/usr/share/filebeat/data --volume $PWD:/tmp docker.elastic.co/beats/filebeat:6.7.0 \
68+
docker container run --name filebeat --rm --network host --volume filebeat:/usr/share/filebeat/data --volume $PWD:/tmp docker.elastic.co/beats/filebeat:7.1.1 \
6969
-e -c /tmp/nyc_collision_filebeat.yml \
7070
-E output.elasticsearch.hosts='node1:9200' \
7171
-E output.elasticsearch.username=elastic \

filebeat-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
# How to Tune Elastic Beats Performance: A Practical Example with Batch Size, Worker Count, and More
66
# https://www.elastic.co/blog/how-to-tune-elastic-beats-performance-a-practical-example-with-batch-size-worker-count-and-more?blade=tw&hulk=social
77
filebeat:
8-
image: docker.elastic.co/beats/filebeat:${ELASTIC_VERSION:-6.7.0}
8+
image: docker.elastic.co/beats/filebeat:${ELASTIC_VERSION:-7.1.1}
99
# https://github.com/docker/swarmkit/issues/1951
1010
hostname: "{{.Node.Hostname}}-filebeat"
1111
# Need to override user so we can access the log files, and docker.sock

metricbeat-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "3.7"
33
services:
44

55
metricbeat:
6-
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION:-6.7.0}
6+
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION:-7.1.1}
77
# https://github.com/docker/swarmkit/issues/1951
88
hostname: "{{.Node.Hostname}}-metricbeat"
99
user: root

0 commit comments

Comments
 (0)