A vagrant box that provisions Oracle software automatically, using Vagrant, an Oracle Linux box and a shell script.
- Install Oracle VM VirtualBox
- Install Vagrant
- install Git client
- Clone this repository
git clone https://github.com/dima-kavalevsky-epam/elk-install - Change into the desired software folder
- Follow the README.md instructions inside the folder
This is the source code to along with the blog article ELK-Stack-with-Vagrant-and-Ansible
- Make sure that the host has sufficient CPU & RAM to build 2 vms as this one does.
- You can adjust the memory requirements in 'Vagrantfile'. Remember 5Gb RAM is required only for VM's!
- Generate two VM's by vagrant tool
vagrant up - Log in to ELKserver server and prepare to run ansible playbooks.
vagrant ssh elkserver
alias mc='LANG=en_EN.UTF-8 mc'
cd /workspace/
## Replace hostnames in inventory file
sed -i 's/host-01/elkserver/' hosts
sed -i 's/host-02/elkclient/' hosts
# Generating a new SSH key and adding it to the ssh-agent
ssh-keygen
## Set PasswordAuthentication to yes for currecnt VM
sudo sed -i -e 's/^PasswordAuthentication no/PasswordAuthentication yes/' -e 's/^#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo /sbin/service sshd restart
sudo systemctl restart sshd
ssh-copy-id vagrant@elkserver
ssh-copy-id vagrant@elkclient
## The default Passwor vagrant
ansible -m ping all -i hosts- Run ansible playbook to install and configure ElasticSearch, Logtsash, Kibana, Nginx and Curator tools
cd /workspace/
ansible-playbook -v -i hosts install/elk.yml
# -extra-vars "ansible_ssh_user=vagrant ansible_ssh_pass=vagrant"- Check ELK stack successful installation.
- Navigate to Kibana dashboard over Nginx on server and login with admin/admin permissions to verify successful installation.
- Check availability SSL Certificate key at http://192.168.56.21:8080/beat-forwarder.key for Filebeat
curl -O http://192.168.56.21:8080/beat-forwarder.key- Run ansible playbook to setup clients.
cd /workspace/
ansible-playbook -i hosts install/elk_client.yml --extra-vars 'elk_server=192.168.56.21'- Browse the link to Kibana
Account: admin/admin