Install Graylog 3 Node Cluster on Alma Linux 8 with Ansible

From Bitbull Wiki
Jump to navigation Jump to search

1 GENERAL

Test setup for 3node graylog cluster setup

1.1 What it does

  • Elastic Search Cluster (master/data)
  • Graylog Cluster (Master/Slave)
  • Mongo DB Cluster setup
  • Nginx SSL offloading (on each graylog node
  • Scale out is working by just adding nodes to ansible inventory

This is just a PoC for a Cluster setup, but you can scale out the cluster with this ansible roles, eg: 1 Node -> 5 Node

  • Elasticsearch has no password for authentication
  • Elasticsearch traffic is not encrypted
  • Mongo DB traffic is not encrypted
  • SELINUX is disabled
  • Firewalling is disabled

2 HARDWARE

  • OS: Alma Linux 8
  • Hostnames: test0{1..3}
  • Memory: 8GB
  • CPU: 4
  • Disk: 50G (testing)


3 Setup Project

curl -L ansible.bitbull.ch | bash
mkdir graylog_poc
chmod 700 graylog_poc
cd graylog_poc
echo '[defaults]
inventory      = ./inventory
roles_path    = ./roles
collections_paths = ./collections
remote_user = root
log_path = ./ansible.log
' > ansible.cfg
echo '[graylog]
test01
test02

[elastic]
test01 ee_heap_size=4g
test02 ee_heap_size=4g
test03 ee_heap_size=6g

[mongo]
test01
test02
test03
' > inventory


ansible-galaxy search joe-speedboat
ansible-galaxy install joe-speedboat.elastic_easy joe-speedboat.graylog joe-speedboat.mongo_easy joe-speedboat.nginx_rp
for req in roles/*/roles/requirements.yml
do
   ansible-galaxy role install -r $req -p ./roles
done
ansible -m ping all


cp -av roles/joe-speedboat.graylog/tests/site.yml graylog_cluster_deploy.yml
cp -av roles/joe-speedboat.graylog/tests/group_vars .
  • verify/change all configs in group_vars
ansible-playbook graylog_cluster_deploy.yml