Setup ELK Stack into Docker

Exported on 23-Aug-2021 14:55:39

Parameters

Name Type Script Reference Default Value Comment
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

1 - Pull Docker ELK from github

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
git clone https://github.com/deviantony/docker-elk.git

2 - Sending config files to server

Login as user on node

Connect via SSH
ssh user@hostname
Deploy archive ELK Stack - Config files.zip to remote path files/
  1. Locate Files archive "ELK Stack - Config files.zip", This can be downloaded from Attune
  2. Copy the Files archive to the server
  3. Extract the root of the Files archive to files/, relative to the home directory
  4. Check that the files are in the correct location

3 - Move config files for ELK Stack

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
rm -rf docker-elk/kibana/config/kibana.yml
cp files/kibana.yml docker-elk/kibana/config/kibana.yml

rm -rf docker-elk/logstash/config/logstash.yml
cp files/logstash.yml docker-elk/logstash/config/logstash.yml

rm -rf docker-elk/elasticsearch/config/elasticsearch.yml
cp files/elasticsearch.yml docker-elk/elasticsearch/config/elasticsearch.yml

rm -rf docker-elk/docker-stack.yml
cp files/docker-stack.yml docker-elk/docker-stack.yml

4 - Deploy ELK Stack in Docker Swarm

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sleep 5
cd docker-elk && sudo docker stack deploy -c docker-stack.yml elk-stack