From b0da5699f544559dc4922e11fc0143e270285c0a Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Wed, 22 Jan 2020 14:57:33 -0500 Subject: [PATCH] Accessible Graylog UI --- Vagrantfile | 15 +++++- graylog.yml | 49 +++++++++++++++++++ wordpress/docker-compose.yml => wordpress.yml | 0 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 graylog.yml rename wordpress/docker-compose.yml => wordpress.yml (100%) diff --git a/Vagrantfile b/Vagrantfile index 70db087..792e522 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,7 +2,13 @@ Vagrant.configure("2") do |config| config.vm.box = "centos/7" - config.vm.network "private_network", type: "dhcp" + config.vm.network "private_network", ip: "172.28.128.30" + config.vm.synced_folder ".", "/vagrant", type: "nfs" + + config.vm.provider "virtualbox" do |vbox| + vbox.memory = 4096 + vbox.cpus = 4 + end config.vm.provision "shell", inline: <<-SHELL @@ -23,4 +29,11 @@ Vagrant.configure("2") do |config| # Install newest docker-compose config.vm.provision "shell", path: "install-compose.sh" + # Start compose services + config.vm.provision "shell", inline: <<-SHELL + cd /vagrant + /usr/local/bin/docker-compose -f wordpress.yml up -d 2> /dev/null + /usr/local/bin/docker-compose -f graylog.yml up -d 2> /dev/null + SHELL + end diff --git a/graylog.yml b/graylog.yml new file mode 100644 index 0000000..5078a29 --- /dev/null +++ b/graylog.yml @@ -0,0 +1,49 @@ +version: '3.7' + +services: + mongo: + image: mongo:4.2.2 + networks: + - graylog + + elasticsearch: + image: elasticsearch:6.8.6 + environment: + - http:host=0.0.0.0 + - transport.host=localhost + - network.host=0.0.0.0 + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + networks: + - graylog + + graylog: + image: graylog/graylog:3.1.4 + environment: + - GRAYLOG_PASSWORD_SECRET=LongerPassword01 + # Password: admin + - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 + - GRAYLOG_HTTP_EXTERNAL_URI=http://172.28.128.30:9000/ + networks: + - graylog + depends_on: + - mongo + - elasticsearch + ports: + # Graylog web interface and REST API + - 9000:9000 + # Syslog TCP + - 1514:1514 + # Syslog UDP + - 1514:1514/udp + # GELF TCP + - 12201:12201 + # GELF UDP + - 12201:12201/udp + +networks: + graylog: + driver: bridge diff --git a/wordpress/docker-compose.yml b/wordpress.yml similarity index 100% rename from wordpress/docker-compose.yml rename to wordpress.yml