This is a terraform script which deploying Ubuntu based OS into Digital Ocean Droplet and setting up Graylog server (Elasticsearch, logstash, Graylog, Filebeat, Mongodb, NGINX as revers proxy, AWS Route 52 as DNS provider)
- Digital Ocean account
- AWS account and DNS zone
- Terraform (>=0.14)
- Ansible >=2.10
- Create Droplet
- Create DNS name (AWS Route 52)
- Import SSH key
- Create inventory file for Ansible
- Start Ansible-playbook [disabled by default]
- Intarctive user input [graylog pass, smtp settings, nginx htpasswd(disabled), etc.]
- Update system
- Install requerements
- Install NGINX
- Install Elasticsearch
- Install Logstash (GELF output) 6.1 NGINX access log 6.2 NGINX error log 6.3 Syslog
- Install Filebeat
- Install Mongodb
- Install Graylog
- Clone this repo
- Initialize plugins
terraform init
-
Edit varriables.tf according to your values
-
Edit terraform.tfvars according to your credentials
-
Check all config
terraform plan
If all is ok 6. Deploy VM
terraform apply
Check playbook
ansible-playbook -i inventory.ini graylog.yml --ssh-common-args='-o StrictHostKeyChecking=no' --private-key /path_for_your_key/key_name --check
In check mode you will get errors
Run playbook
ansible-playbook -i inventory.ini graylog.yml --ssh-common-args='-o StrictHostKeyChecking=no' --private-key /path_for_your_key/key_name
Ports:
Graylog port:8080 Elasticsearch port: 82 (ATTENTION!!! it's open)
GNU GPL v3