$ kitchen create default-ubuntu-1404 -----> Starting Kitchen (v1.10.2) -----> Creating ... Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'bento/ubuntu-14.04'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'bento/ubuntu-14.04' is up to date... ==> default: Setting the name of the VM: kitchen-elkstack-default-ubuntu-1404_default_1470951071818_58677 ==> default: Fixed port collision for 80 => 8080. Now on port 2200. ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 9200 (guest) => 9200 (host) (adapter 1) default: 80 (guest) => 2200 (host) (adapter 1) default: 443 (guest) => 8443 (host) (adapter 1) default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... ==> default: Setting hostname... ==> default: Machine not provisioned because `--no-provision` is specified. [SSH] Established Vagrant instance created. Finished creating (1m38.57s). -----> Kitchen is finished. (1m39.23s) jnganga@ubuntu:~/projects/APPCARTRIDGE/supermarketelk2/elkstack$ kitchen converge default-ubuntu-1404 -----> Starting Kitchen (v1.10.2) -----> Converging ... Preparing files for transfer Preparing dna.json Resolving cookbook dependencies with Berkshelf 4.3.5... Removing non-cookbook files before transfer Preparing data_bags Preparing environments Preparing nodes Preparing secret Preparing validation.pem Preparing client.rb -----> Installing Chef Omnibus (install only if missing) Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh Trying wget... Download complete. ubuntu 14.04 x86_64 Getting information for chef stable for ubuntu... downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=ubuntu&pv=14.04&m=x86_64 to file /tmp/install.sh.1459/metadata.txt trying wget... sha1 431a5b26b69fb00f6acc20d6ecf11f19a310324a sha256 e8655820970c9a9e7d491e28651ae87df1b9afa924966e716aea4ad039fec597 url https://packages.chef.io/stable/ubuntu/14.04/chef_12.13.30-1_amd64.deb version 12.13.30 downloaded metadata file looks valid... downloading https://packages.chef.io/stable/ubuntu/14.04/chef_12.13.30-1_amd64.deb to file /tmp/install.sh.1459/chef_12.13.30-1_amd64.deb trying wget... Comparing checksum with sha256sum... WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You are installing an omnibus package without a version pin. If you are installing on production servers via an automated process this is DANGEROUS and you will be upgraded without warning on new releases, even to new major releases. Letting the version float is only appropriate in desktop, test, development or CI/CD environments. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING Installing chef installing with dpkg... Selecting previously unselected package chef. (Reading database ... 32924 files and directories currently installed.) Preparing to unpack .../chef_12.13.30-1_amd64.deb ... Unpacking chef (12.13.30-1) ... Setting up chef (12.13.30-1) ... Thank you for installing Chef! Transferring files to Starting Chef Client, version 12.13.30 Creating a new client identity for default-ubuntu-1404 using the validator key. resolving cookbooks for run list: ["apt", "java::default", "elkstack::default"] Synchronizing Cookbooks: - apt (2.9.2) - java (1.36.0) - elkstack (6.0.4) - cron (1.7.0) - build-essential (2.2.4) - chef-sugar (3.1.1) - elasticsearch (0.3.14) - htpasswd (0.2.4) - firewall (2.2.0) - kibana_lwrp (2.0.6) - line (0.6.3) - logstash (0.12.0) - newrelic_meetme_plugin (0.3.0) - openssl (4.4.0) - rackspace_monitoring (1.1.1) - nginx (2.7.6) - rsyslog (2.2.0) - python (1.4.6) - runit (1.7.4) - yum (3.8.2) - ark (0.9.0) - git (4.3.4) - apache2 (3.1.0) - libarchive (0.6.1) - poise (2.4.0) - curl (2.0.1) - ant (1.0.2) - logrotate (1.9.2) - bluepill (2.4.1) - ohai (2.0.4) - yum-epel (0.6.4) - packagecloud (0.1.0) - windows (1.38.3) - 7-zip (1.0.2) - dmg (2.3.0) - chef_handler (1.2.0) Installing Cookbook Gems: Compiling Cookbooks... [2016-08-11T21:33:47+00:00] WARN: Chef::Provider::AptRepository already exists! Cannot create deprecation class for LWRP provider apt_repository from cookbook apt [2016-08-11T21:33:47+00:00] WARN: AptRepository already exists! Deprecation class overwrites Custom resource apt_repository from cookbook apt Recipe: chef-sugar::default * chef_gem[chef-sugar] action install - install version 3.1.1 of package chef-sugar Converging 117 resources Recipe: apt::default * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing) * directory[/etc/apt/apt.conf.d] action create (up to date) * cookbook_file[/etc/apt/apt.conf.d/15update-stamp] action create - create new file /etc/apt/apt.conf.d/15update-stamp - update content in file /etc/apt/apt.conf.d/15update-stamp from none to 174cdb --- /etc/apt/apt.conf.d/15update-stamp 2016-08-11 21:33:55.238376384 +0000 +++ /etc/apt/apt.conf.d/.chef-15update-stamp20160811-1562-1lon2xb 2016-08-11 21:33:55.238376384 +0000 @@ -1 +1,2 @@ +APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";}; * execute[apt-get update] action nothing (skipped due to action :nothing) * execute[apt-get autoremove] action nothing (skipped due to action :nothing) * execute[apt-get autoclean] action nothing (skipped due to action :nothing) * execute[apt-get-update-periodic] action run - execute apt-get update * file[/var/lib/apt/periodic/update-success-stamp] action touch - update utime on file /var/lib/apt/periodic/update-success-stamp * directory[/var/cache/local] action create - create new directory /var/cache/local - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' * directory[/var/cache/local/preseeding] action create - create new directory /var/cache/local/preseeding - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' * template[/etc/apt/apt.conf.d/10recommends] action create - create new file /etc/apt/apt.conf.d/10recommends - update content in file /etc/apt/apt.conf.d/10recommends from none to f41e1d --- /etc/apt/apt.conf.d/10recommends 2016-08-11 21:34:16.210376384 +0000 +++ /etc/apt/apt.conf.d/.chef-10recommends20160811-1562-1vfph51 2016-08-11 21:34:16.210376384 +0000 @@ -1 +1,4 @@ +# Managed by Chef +APT::Install-Recommends "1"; +APT::Install-Suggests "0"; - change mode from '' to '0644' - change owner from '' to 'root' - change group from '' to 'root' * apt_package[apt-transport-https] action install (up to date) Recipe: java::openjdk * apt_repository[openjdk-r-ppa] action add * execute[apt-cache gencaches] action nothing (skipped due to action :nothing) * apt_update[openjdk-r-ppa] action nothing (skipped due to action :nothing) * execute[install-key DA1A4A13543B466853BAF164EB9B1D8886F44E2A] action run - execute apt-key adv --recv --keyserver hkp://keyserver.ubuntu.com:80 DA1A4A13543B466853BAF164EB9B1D8886F44E2A * execute[apt-cache gencaches] action run - execute apt-cache gencaches * file[/etc/apt/sources.list.d/openjdk-r-ppa.list] action create - create new file /etc/apt/sources.list.d/openjdk-r-ppa.list - update content in file /etc/apt/sources.list.d/openjdk-r-ppa.list from none to 6c91a3 --- /etc/apt/sources.list.d/openjdk-r-ppa.list 2016-08-11 21:34:18.342376384 +0000 +++ /etc/apt/sources.list.d/.chef-openjdk-r-ppa.list20160811-1562-1sn7nkq 2016-08-11 21:34:18.342376384 +0000 @@ -1 +1,2 @@ +deb "http://ppa.launchpad.net/openjdk-r/ppa/ubuntu" trusty main - change mode from '' to '0644' - change owner from '' to 'root' - change group from '' to 'root' * execute[apt-cache gencaches] action run - execute apt-cache gencaches * apt_update[openjdk-r-ppa] action update - force update new lists of packages * directory[/var/lib/apt/periodic] action create (up to date) * directory[/etc/apt/apt.conf.d] action create (up to date) * file[/etc/apt/apt.conf.d/15update-stamp] action create_if_missing (up to date) * execute[apt-get -q update] action run - execute apt-get -q update * apt_package[openjdk-7-jdk] action install - install version 7u101-2.6.6-0ubuntu0.14.04.1 of package openjdk-7-jdk * apt_package[openjdk-7-jre-headless] action install (up to date) * java_alternatives[set-java-alternatives] action set - Removing alternative for appletviewer with old prio - Add alternative for appletviewer - Add alternative for apt - Removing alternative for extcheck with old prio - Add alternative for extcheck - Removing alternative for idlj with old prio - Add alternative for idlj - Removing alternative for jar with old prio - Add alternative for jar - Removing alternative for jarsigner with old prio - Add alternative for jarsigner - Add alternative for java - Removing alternative for javac with old prio - Add alternative for javac - Removing alternative for javadoc with old prio - Add alternative for javadoc - Removing alternative for javah with old prio - Add alternative for javah - Removing alternative for javap with old prio - Add alternative for javap - Removing alternative for jcmd with old prio - Add alternative for jcmd - Removing alternative for jconsole with old prio - Add alternative for jconsole - Removing alternative for jdb with old prio - Add alternative for jdb - Removing alternative for jhat with old prio - Add alternative for jhat - Removing alternative for jinfo with old prio - Add alternative for jinfo - Removing alternative for jmap with old prio - Add alternative for jmap - Removing alternative for jps with old prio - Add alternative for jps - Removing alternative for jrunscript with old prio - Add alternative for jrunscript - Removing alternative for jsadebugd with old prio - Add alternative for jsadebugd - Removing alternative for jstack with old prio - Add alternative for jstack - Removing alternative for jstat with old prio - Add alternative for jstat - Removing alternative for jstatd with old prio - Add alternative for jstatd - Add alternative for keytool - Removing alternative for native2ascii with old prio - Add alternative for native2ascii - Add alternative for orbd - Add alternative for pack200 - Add alternative for policytool - Removing alternative for rmic with old prio - Add alternative for rmic - Add alternative for rmid - Add alternative for rmiregistry - Removing alternative for schemagen with old prio - Add alternative for schemagen - Removing alternative for serialver with old prio - Add alternative for serialver - Add alternative for servertool - Add alternative for tnameserv - Add alternative for unpack200 - Removing alternative for wsgen with old prio - Add alternative for wsgen - Removing alternative for wsimport with old prio - Add alternative for wsimport - Removing alternative for xjc with old prio - Add alternative for xjc Recipe: java::default_java_symlink * link[/usr/lib/jvm/default-java] action create - create symlink at /usr/lib/jvm/default-java to /usr/lib/jvm/java-7-openjdk-amd64 Recipe: java::set_java_home * ruby_block[set-env-java-home] action run - execute the ruby block set-env-java-home * directory[/etc/profile.d] action create (up to date) * file[/etc/profile.d/jdk.sh] action create - create new file /etc/profile.d/jdk.sh - update content in file /etc/profile.d/jdk.sh from none to 2eb1f0 --- /etc/profile.d/jdk.sh 2016-08-11 21:37:12.506376384 +0000 +++ /etc/profile.d/.chef-jdk.sh20160811-1562-1rkxbfo 2016-08-11 21:37:12.506376384 +0000 @@ -1 +1,2 @@ +export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 - change mode from '' to '0755' Recipe: build-essential::_debian * apt_package[autoconf] action install - install version 2.69-6 of package autoconf * apt_package[binutils-doc] action install - install version 2.24-5ubuntu14.1 of package binutils-doc * apt_package[bison] action install - install version 2:3.0.2.dfsg-2 of package bison * apt_package[build-essential] action install - install version 11.6ubuntu6 of package build-essential * apt_package[flex] action install - install version 2.5.35-10.1ubuntu2 of package flex * apt_package[gettext] action install - install version 0.18.3.1-1ubuntu3 of package gettext * apt_package[ncurses-dev] action install - install version 5.9+20140118-1ubuntu1 of package ncurses-dev Recipe: chef-sugar::default * chef_gem[chef-sugar] action install (up to date) Recipe: python::package * apt_package[python] action install (up to date) * apt_package[python-dev] action install - install version 2.7.5-5ubuntu3 of package python-dev Recipe: python::pip * cookbook_file[/tmp/kitchen/cache/get-pip.py] action create - create new file /tmp/kitchen/cache/get-pip.py - update content in file /tmp/kitchen/cache/get-pip.py from none to 415b4d (long diff of over 1000000 characters, diff output suppressed) - change mode from '' to '0644' * execute[install-pip] action run - execute /usr/bin/python get-pip.py * python_pip[setuptools] action upgrade - upgrade python_pip[setuptools] version from to latest Recipe: elkstack::_python * bash[manually upgrade setuptools] action run (skipped due to only_if) Recipe: python::virtualenv * python_pip[virtualenv] action upgrade - upgrade python_pip[virtualenv] version from to latest Recipe: elkstack::_server * apt_package[ruby] action install - install version 1:1.9.3.4 of package ruby * append_if_no_line[make sure a line is in /etc/hosts] action edit Recipe: firewall::default * firewall[default] action install - install iptables and enable/start services * apt_package[iptables-persistent] action install - install version 0.5.7 of package iptables-persistent * file[create empty /etc/iptables/rules.v4] action create (skipped due to not_if) * file[create empty /etc/iptables/rules.v6] action create (skipped due to not_if) * service[iptables-persistent] action enable (up to date) * service[iptables-persistent] action start - start service service[iptables-persistent] * firewall_rule[allow world to ssh] action create * firewall_rule[allow world to winrm] action create (skipped due to only_if) * firewall_rule[established] action create * firewall_rule[ipv6_icmp] action create Recipe: elkstack::acl * firewall_rule[allow syslog entries inbound] action create * firewall_rule[allow lumberjack entries inbound] action create * firewall_rule[allow tcp entries inbound] action create * firewall_rule[allow nginx SSL entries inbound] action create * firewall_rule[allow nginx entries inbound] action create * firewall_rule[allow udp entries inbound] action create * firewall_rule[allow ES host 1.2.3.4 to connect] action create * firewall_rule[allow ES host 1.2.3.5 to connect] action create * firewall_rule[open_loopback] action create Recipe: elasticsearch::curl * apt_package[curl] action install - install version 7.35.0-1ubuntu2.8 of package curl Recipe: ark::default * apt_package[libtool] action install - install version 2.4.2-1.7ubuntu1 of package libtool * apt_package[autoconf] action install (up to date) * apt_package[unzip] action install - install version 6.0-9ubuntu1.5 of package unzip * apt_package[rsync] action install (up to date) * apt_package[make] action install (up to date) * apt_package[gcc] action install (up to date) * apt_package[autogen] action install - install version 1:5.18-2ubuntu2 of package autogen Recipe: elasticsearch::default * group[elasticsearch] action create - create group elasticsearch * user[elasticsearch] action create - create user elasticsearch * bash[remove the elasticsearch user home] action run (skipped due to only_if) * directory[/usr/local/etc/elasticsearch] action create - create new directory /usr/local/etc/elasticsearch - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * directory[/usr/local/var/log/elasticsearch] action create - create new directory /usr/local/var/log/elasticsearch - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * directory[/usr/local/var/run] action create - create new directory /usr/local/var/run - change mode from '' to '0755' * directory[/usr/local/var/data/elasticsearch] action create - create new directory /usr/local/var/data/elasticsearch - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * template[/etc/init.d/elasticsearch] action create - create new file /etc/init.d/elasticsearch - update content in file /etc/init.d/elasticsearch from none to 0b1df9 --- /etc/init.d/elasticsearch 2016-08-11 21:40:19.666376384 +0000 +++ /etc/init.d/.chef-elasticsearch20160811-1562-13ivoct 2016-08-11 21:40:19.666376384 +0000 @@ -1 +1,201 @@ +#!/usr/bin/env bash +# +# elasticsearch +# +### BEGIN INIT INFO +# Provides: elasticsearch +# Required-Start: $network $remote_fs $named +# Required-Stop: $network $remote_fs $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts elasticsearch +# Description: Starts elasticsearch using start-stop-daemon +### END INIT INFO + +# Source networking configuration +# +if [ -f /etc/sysconfig/network ]; then source /etc/sysconfig/network; fi + +# Set limits for environments ignoring `/etc/security/limits.d` +# +ulimit -n 64000 +ulimit -l unlimited + +# Exit if networking is not up +# +[ "$NETWORKING" = "no" ] && exit + +PIDFILE='/usr/local/var/run/default_ubuntu_1404.pid' +ES_INCLUDE='/usr/local/etc/elasticsearch/elasticsearch-env.sh' +CHECK_PID_RUNNING=$(ps ax | grep 'java' | grep -e "es.pidfile=$PIDFILE" | sed 's/^\s*\([0-9]*\)\s.*/\1/') +RUBY_BIN="" + +if command -v ruby >/dev/null 2>&1; then + RUBY_BIN=$(command -v ruby) + # ruby < 1.9 needs this, afterwards it doesn't work _at all_ + if $RUBY_BIN -rubygems -e "puts Gem::VERSION" >/dev/null 2>&1; then + RUBY_BIN="$RUBY_BIN -rubygems " + fi +fi + +start() { + if [ -f $PIDFILE ]; then + # PIDFILE EXISTS -- ES RUNNING? + echo -e "PID file found in $PIDFILE" + es_pid="$(cat $PIDFILE)" + pid_running="$( ps ax | grep 'java' | grep $es_pid )" + + if [ ! -z "$pid_running" ] ; then + # EXIT IF ES IS ALREADY RUNNING + echo -e "\033[31;1mPID $es_pid still alive, Elasticsearch already running...\033[0m" + return 1 + fi + fi + + echo -en "\033[1mStarting Elasticsearch...\033[0m" + touch $PIDFILE && chown elasticsearch $PIDFILE + ES_INCLUDE=$ES_INCLUDE start-stop-daemon --background --start --quiet --pidfile $PIDFILE --chuid elasticsearch --exec /usr/local/bin/elasticsearch -- -p $PIDFILE + + if [ $? ]; then + echo -e " \e[32m[OK]\e[0m" + else + echo -e " \e[31m[FAILURE]\e[0m" + fi + + return $? +} + +stop() { + if [[ -f $PIDFILE ]]; then + echo -n -e "\033[1mStopping elasticsearch...\033[0m" + + # REMOVE PIDFILE AND EXIT IF PROCESS NOT RUNNING + if [ ! $CHECK_PID_RUNNING ]; then + echo -e "\033[1mPID file found, but no matching process running?\033[0m" + echo "Removing PID file..." + rm $PIDFILE + exit 0 + fi + + # KILL PROCESS + pid=$(cat $PIDFILE) + su elasticsearch -m -c "kill $(cat $PIDFILE)" + r=$? + + # Check for process + timeout=0 + while [ $(ps -p $pid | wc -l ) -gt '1' ]; do + echo -n '.' + (( timeout ++)) + if [ $timeout -gt '30' ]; then return; fi + sleep 1 + done + + # Check for pidfile + timeout=0 + while [ -f $PIDFILE ]; do + echo -n '.' + (( timeout++ )) + if [ $timeout -gt '15' ]; then return; fi + sleep 1 + done + + echo; + + return $r + else + echo -e "\033[1mNo PID file found -- elasticsearch not running?\033[0m" + fi +} + +restart() { + stop + timeout=30 + while ps aux | grep 'java' | grep -e "es.pidfile"; do + echo -n '.' + (( timeout-- )) + if [ $timeout -lt '1' ]; then return; fi + sleep 1 + done; + start +} + +status() { + # GOT PIDFILE? + [ -f $PIDFILE ] && pid=$(cat $PIDFILE) + + # RUNNING + if [[ $pid && -d "/proc/$pid" ]]; then + if [ -z "$RUBY_BIN" ]; then + version=$(curl -s 'http://localhost:9200' | $RUBY_BIN -e 'require "json"; print JSON.parse(STDIN.read)["version"]["number"]') + echo -e "\033[1;37;46melasticsearch $version running with PID $pid\033[0m" + else + echo -e "\033[1;37;46melasticsearch running with PID $pid\033[0m" + fi + # VERBOSE + if [[ $pid && $1 == '-v' || $1 == '--verbose' ]]; then + if [ -z "$RUBY_BIN" ]; then + curl -s 'http://localhost:9200/_cluster/nodes/default-ubuntu-1404?os&process&jvm&network&transport&settings&pretty' | \ + $RUBY_BIN -e ' + begin + require "json"; h = JSON.parse(STDIN.read); id, node = h["nodes"].first; + def e(name, value); puts %Q|\e[1;36m#{(name.to_s+":").ljust(20)}\e[0m #{value || "N/A" rescue "N/A"}|; end + e "HTTP Address", node["http_address"] + e "Node Name", node["name"] + e "Cluster Name", h["cluster_name"] + e "Started", Time.at(node["jvm"]["start_time"].to_i/1000) + e "JVM", "#{node["jvm"]["vm_name"]} (#{node["jvm"]["version"]})" + e "Memory Total", node["os"]["mem"]["total"] + e "Open Files", node["process"]["max_file_descriptors"] + e "Configuration", node["settings"]["config"] + rescue + puts "Metadata cannot be retrieved." + end + ' + else + echo >&2 "verbose requires ruby but it is not installed" + exit 1 + fi + fi + # INCORRECT PID? + if [ $pid != $CHECK_PID_RUNNING ]; then + echo -e "\033[1;31;40m[!] Incorrect PID found in $PIDFILE: $pid\033[0m" + return 1 + fi + return 0 + fi + + # NOT RUNNING + if [[ ! $pid || ! -d "/proc/$pid" ]]; then + echo -e "\033[1;33;40melasticsearch not running\033[0m" + return 3 + fi + + # STALE PID FOUND + if [[ ! -d "/proc/$pid" && -f $PIDFILE ]]; then + echo -e "\033[1;31;40m[!] Stale PID found in $PIDFILE\033[0m" + return 1 + fi +} + + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status $2 + ;; + *) + echo $"Usage: $0 {start|stop|restart|status [-v]|}" + exit 1 +esac + +exit $? - change mode from '' to '0755' - change owner from '' to 'root' * service[elasticsearch] action enable - enable service service[elasticsearch] * ark[elasticsearch] action install * directory[/usr/local/elasticsearch-1.4.4] action create - create new directory /usr/local/elasticsearch-1.4.4 * remote_file[/tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz] action create - create new file /tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz - update content in file /tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz from none to a3158d (file sizes exceed 10000000 bytes, diff output suppressed) * execute[unpack /tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz] action nothing (skipped due to action :nothing) * execute[set owner on /usr/local/elasticsearch-1.4.4] action nothing (skipped due to action :nothing) * link[/usr/local/bin/elasticsearch] action create - create symlink at /usr/local/bin/elasticsearch to /usr/local/elasticsearch-1.4.4/bin/elasticsearch * link[/usr/local/bin/plugin] action create - create symlink at /usr/local/bin/plugin to /usr/local/elasticsearch-1.4.4/bin/plugin * link[/usr/local/elasticsearch] action create - create symlink at /usr/local/elasticsearch to /usr/local/elasticsearch-1.4.4 * template[/etc/profile.d/elasticsearch.sh] action create (skipped due to only_if) * ruby_block[adding '/usr/local/elasticsearch-1.4.4/bin' to chef-client ENV['PATH']] action run (skipped due to only_if) * execute[unpack /tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz] action run - execute /bin/tar xzf /tmp/kitchen/cache/elasticsearch-1.4.4.tar.gz --strip-components=1 * execute[set owner on /usr/local/elasticsearch-1.4.4] action run - execute chown -R elasticsearch:elasticsearch /usr/local/elasticsearch-1.4.4 * bash[enable user limits] action run - execute "bash" "/tmp/chef-script20160811-1562-1kzfcxs" * file[/etc/security/limits.d/10-elasticsearch.conf] action create - create new file /etc/security/limits.d/10-elasticsearch.conf - update content in file /etc/security/limits.d/10-elasticsearch.conf from none to 0a6b42 --- /etc/security/limits.d/10-elasticsearch.conf 2016-08-11 21:40:24.830376384 +0000 +++ /etc/security/limits.d/.chef-10-elasticsearch.conf20160811-1562-hfp1ru 2016-08-11 21:40:24.830376384 +0000 @@ -1 +1,3 @@ +elasticsearch - nofile 64000 +elasticsearch - memlock unlimited * log[increase limits] action write * log[increase limits] action nothing (skipped due to action :nothing) * template[elasticsearch-env.sh] action create - create new file /usr/local/etc/elasticsearch/elasticsearch-env.sh - update content in file /usr/local/etc/elasticsearch/elasticsearch-env.sh from none to 7adadc --- /usr/local/etc/elasticsearch/elasticsearch-env.sh 2016-08-11 21:40:24.866376384 +0000 +++ /usr/local/etc/elasticsearch/.chef-elasticsearch-env.sh20160811-1562-9c1q3e 2016-08-11 21:40:24.866376384 +0000 @@ -1 +1,25 @@ +# JVM Configuration for ElasticSearch +# =================================== +# See +# + +ES_HOME='/usr/local/elasticsearch' +ES_CLASSPATH=$ES_CLASSPATH:$ES_HOME/lib/*:$ES_HOME/lib/sigar/* +ES_HEAP_SIZE=195m + +ES_JAVA_OPTS=" + -server + -Djava.net.preferIPv4Stack=true + -Des.config=/usr/local/etc/elasticsearch/elasticsearch.yml + -Xms195m + -Xmx195m + -Xss256k + -XX:+UseParNewGC + -XX:+UseConcMarkSweepGC + -XX:CMSInitiatingOccupancyFraction=75 + -XX:+UseCMSInitiatingOccupancyOnly + -XX:+HeapDumpOnOutOfMemoryError + + +" - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * template[elasticsearch.yml] action create - create new file /usr/local/etc/elasticsearch/elasticsearch.yml - update content in file /usr/local/etc/elasticsearch/elasticsearch.yml from none to 11ba3b --- /usr/local/etc/elasticsearch/elasticsearch.yml 2016-08-11 21:40:24.986376384 +0000 +++ /usr/local/etc/elasticsearch/.chef-elasticsearch.yml20160811-1562-ggdnfs 2016-08-11 21:40:24.986376384 +0000 @@ -1 +1,90 @@ +######################### ElasticSearch Configuration ######################## + +# This file is managed by Chef, do not edit manually, your changes *will* be overwritten! +# +# Please see the source file for context and more information: +# +# https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml +# +# To set configurations not exposed by this template, set the +# `node.elasticsearch[:custom_config]` attribute in your node configuration, +# `elasticsearch/settings` data bag, role/environment definition, etc: +# +# // ... +# 'threadpool.index.type' => 'fixed', +# 'threadpool.index.size' => '2' +# // ... + +################################### Cluster ################################### + +cluster.name: elasticsearch + +#################################### Node ##################################### + +node.name: default-ubuntu-1404 +node.max_local_storage_nodes: 1 + +#################################### Index #################################### + +index.number_of_replicas: 0 +index.mapper.dynamic: true +action.auto_create_index: true +action.disable_delete_all_indices: true + +#################################### Paths #################################### + +path.conf: /usr/local/etc/elasticsearch +path.data: /usr/local/var/data/elasticsearch +path.logs: /usr/local/var/log/elasticsearch + +#################################### Plugin ################################### + + +################################### Memory #################################### + +bootstrap.mlockall: false + +############################## Network And HTTP ############################### + +network.host: 127.0.0.1 +http.port: 9200 + +################################### Gateway ################################### + +gateway.expected_nodes: 1 + +############################# Recovery Throttling ############################# + + +################################## Discovery ################################## + + +discovery.zen.minimum_master_nodes: 1 +discovery.zen.ping.multicast.enabled: false +discovery.zen.ping.unicast.hosts: 1.2.3.4,1.2.3.5 + +cloud.node.auto_attributes: true + + +################################## Slow Log ################################### + + +################################## GC Logging ################################# + + +################################## JMX ######################################## + + +################################## Custom ##################################### + +rackspace.account: +rackspace.enabled: +rackspace.key: +rackspace.region: ORD +repositories.cloudfiles.base_path: / +repositories.cloudfiles.chunk_size: 100m +repositories.cloudfiles.compress: false +repositories.cloudfiles.concurrent_streams: 5 +repositories.cloudfiles.container: elkstack +script.disable_dynamic: false - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * template[logging.yml] action create - create new file /usr/local/etc/elasticsearch/logging.yml - update content in file /usr/local/etc/elasticsearch/logging.yml from none to c798a9 --- /usr/local/etc/elasticsearch/logging.yml 2016-08-11 21:40:25.026376384 +0000 +++ /usr/local/etc/elasticsearch/.chef-logging.yml20160811-1562-uuds3y 2016-08-11 21:40:25.026376384 +0000 @@ -1 +1,72 @@ +# This file is managed by Chef, do not edit manually, your changes *will* be overwritten! +# +# Please see the source file for context and more information: +# +# https://github.com/elasticsearch/elasticsearch/blob/master/config/logging.yml +# +# Any settings configured under the `node.elasticsearch.logging` +# node attribute will be automatically used. +# +# So, for example when you set these attributes in your node configuration, +# `elasticsearch/settings` data bag, role/environment definition, etc: +# +# // ... +# :logging => { +# :discovery => 'TRACE', +# 'index.indexing.slowlog' => 'INFO, index_indexing_slow_log_file' +# } +# // ... +# +# the relevant configuration will be printed into the `logging.yml` file: +# +# // ... +# logger.discovery: TRACE +# logger.index.indexing.slowlog: INFO, index_indexing_slow_log_file +# // ... +# + +es.logger.level: INFO +rootLogger: INFO, console, file + +# ----- Configuration set by Chef --------------------------------------------- +logger.action: DEBUG +logger.com.amazonaws: WARN +logger.index.indexing.slowlog: TRACE, index_indexing_slow_log_file +logger.index.search.slowlog: TRACE, index_search_slow_log_file +# ----------------------------------------------------------------------------- + +additivity: + index.search.slowlog: false + index.indexing.slowlog: false + +appender: + console: + type: console + layout: + type: consolePattern + conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" + + file: + type: dailyRollingFile + file: ${path.logs}/${cluster.name}.log + datePattern: "'.'yyyy-MM-dd" + layout: + type: pattern + conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" + + index_search_slow_log_file: + type: dailyRollingFile + file: ${path.logs}/${cluster.name}_index_search_slowlog.log + datePattern: "'.'yyyy-MM-dd" + layout: + type: pattern + conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" + + index_indexing_slow_log_file: + type: dailyRollingFile + file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log + datePattern: "'.'yyyy-MM-dd" + layout: + type: pattern + conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' Recipe: elasticsearch::plugins * directory[/usr/local/elasticsearch-1.4.4/plugins/] action create - create new directory /usr/local/elasticsearch-1.4.4/plugins/ - change mode from '' to '0755' - change owner from '' to 'elasticsearch' - change group from '' to 'elasticsearch' * ruby_block[Install plugin: karmi/elasticsearch-paramedic] action run-> Installing karmi/elasticsearch-paramedic... Trying https://github.com/karmi/elasticsearch-paramedic/archive/master.zip... Downloading ..........................................................................................................................................................................................................................................................................................DONE Installed karmi/elasticsearch-paramedic into /usr/local/elasticsearch-1.4.4/plugins/paramedic - execute the ruby block Install plugin: karmi/elasticsearch-paramedic * ruby_block[Install plugin: mobz/elasticsearch-head] action run-> Installing mobz/elasticsearch-head... Trying https://github.com/mobz/elasticsearch-head/archive/master.zip... Downloading ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE Installed mobz/elasticsearch-head into /usr/local/elasticsearch-1.4.4/plugins/head - execute the ruby block Install plugin: mobz/elasticsearch-head * ruby_block[Install plugin: jlinn/elasticsearch-cloud-rackspace] action run-> Installing jlinn/elasticsearch-cloud-rackspace... Trying https://github.com/jlinn/elasticsearch-cloud-rackspace/releases/download/v0.4.1/elasticsearch-cloud-rackspace-0.4.1.zip... Downloading ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE Installed jlinn/elasticsearch-cloud-rackspace into /usr/local/elasticsearch-1.4.4/plugins/cloud-rackspace - execute the ruby block Install plugin: jlinn/elasticsearch-cloud-rackspace Recipe: elkstack::elasticsearch * service[elasticsearch] action start - start service service[elasticsearch] Recipe: elkstack::elasticsearch_monitoring * rackspace_monitoring_service[default] action create (skipped due to only_if) * rackspace_monitoring_service[default] action start (skipped due to only_if) * rackspace_monitoring_check[elasticsearch] action create (skipped due to only_if) * rackspace_monitoring_check[elasticsearch_service] action create (skipped due to only_if) Recipe: elkstack::logstash * logstash_instance[server] action create (up to date) * user[logstash] action create - create user logstash * group[logstash] action create - alter group logstash - add missing member(s): logstash * ark[server] action put * directory[/opt/logstash/server] action create - create new directory /opt/logstash/server * remote_file[/tmp/kitchen/cache/server.tar.gz] action create - create new file /tmp/kitchen/cache/server.tar.gz - update content in file /tmp/kitchen/cache/server.tar.gz from none to d5be17 (file sizes exceed 10000000 bytes, diff output suppressed) * execute[unpack /tmp/kitchen/cache/server.tar.gz] action nothing (skipped due to action :nothing) * execute[set owner on /opt/logstash/server] action nothing (skipped due to action :nothing) * execute[unpack /tmp/kitchen/cache/server.tar.gz] action run - execute /bin/tar xzf /tmp/kitchen/cache/server.tar.gz --strip-components=1 * execute[set owner on /opt/logstash/server] action run - execute chown -R logstash:logstash /opt/logstash/server * directory[/opt/logstash/server/bin] action create - change mode from '0775' to '0755' * directory[/opt/logstash/server/etc] action create - create new directory /opt/logstash/server/etc - change mode from '' to '0755' - change owner from '' to 'logstash' - change group from '' to 'logstash' * directory[/opt/logstash/server/lib] action create - change mode from '0775' to '0755' * directory[/opt/logstash/server/log] action create - create new directory /opt/logstash/server/log - change mode from '' to '0755' - change owner from '' to 'logstash' - change group from '' to 'logstash' * directory[/opt/logstash/server/tmp] action create - create new directory /opt/logstash/server/tmp - change mode from '' to '0755' - change owner from '' to 'logstash' - change group from '' to 'logstash' * directory[/opt/logstash/server/etc/conf.d] action create - create new directory /opt/logstash/server/etc/conf.d - change mode from '' to '0755' - change owner from '' to 'logstash' - change group from '' to 'logstash' * directory[/opt/logstash/server/patterns] action create - change mode from '0775' to '0755' Recipe: logrotate::default * apt_package[logrotate] action install (up to date) * directory[/etc/logrotate.d] action create (up to date) Recipe: * template[/etc/logrotate.d/logstash_server] action create - create new file /etc/logrotate.d/logstash_server - update content in file /etc/logrotate.d/logstash_server from none to ce63d1 --- /etc/logrotate.d/logstash_server 2016-08-11 21:41:50.158376384 +0000 +++ /etc/logrotate.d/.chef-logstash_server20160811-1562-h51udg 2016-08-11 21:41:50.134376384 +0000 @@ -1 +1,16 @@ +# This file was generated by Chef for default-ubuntu-1404. +# Do not modify this file by hand! + +"/opt/logstash/server/log/*.log" { + daily + create 664 logstash logstash + rotate 10 + missingok + notifempty + compress + copytruncate + postrotate + service logstash_server restart + endscript +} - change mode from '' to '0440' - change owner from '' to 'root' - change group from '' to 'root' Recipe: runit::default * service[runit] action nothing (skipped due to action :nothing) * execute[start-runsvdir] action nothing (skipped due to action :nothing) * execute[runit-hup-init] action nothing (skipped due to action :nothing) * apt_package[runit] action install Recipe: * cookbook_file[/tmp/kitchen/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] action create - create new file /tmp/kitchen/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed - update content in file /tmp/kitchen/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed from none to 9c6758 --- /tmp/kitchen/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed 2016-08-11 21:41:51.062376384 +0000 +++ /tmp/kitchen/cache/preseed/runit/.chef-runit-2.1.1-6.2ubuntu3.seed20160811-1562-9wsnla 2016-08-11 21:41:51.062376384 +0000 @@ -1 +1,2 @@ +runit runit/signalinit boolean true - preseed package runit - install version 2.1.1-6.2ubuntu3 of package runit Recipe: runit::default * execute[start-runsvdir] action nothing (skipped due to action :nothing) * execute[runit-hup-init] action nothing (skipped due to action :nothing) Recipe: elkstack::logstash * logstash_service[server] action enable (up to date) Recipe: * service[logstash_server] action nothing (skipped due to action :nothing) * runit_service[logstash_server] action enable * directory[/etc/sv/logstash_server] action create - create new directory /etc/sv/logstash_server - change mode from '' to '0755' * template[/etc/sv/logstash_server/run] action create - create new file /etc/sv/logstash_server/run - update content in file /etc/sv/logstash_server/run from none to 5f7a12 --- /etc/sv/logstash_server/run 2016-08-11 21:44:20.378376384 +0000 +++ /etc/sv/logstash_server/.chef-run20160811-1562-1ubx0q5 2016-08-11 21:44:20.378376384 +0000 @@ -1 +1,18 @@ +#!/bin/sh + +ulimit -Hn 65550 +ulimit -Sn 65550 + +cd //opt/logstash/server +exec 2>&1 +# Need to set LOGSTASH_HOME and HOME so sincedb will work +export LS_HEAP_SIZE=97M +export LOGSTASH_HOME="/opt/logstash/server" +export GC_OPTS="" +export JAVA_OPTS="-server -Xms97M -Xmx97M -Djava.io.tmpdir=$LOGSTASH_HOME/tmp/ " +LOGSTASH_OPTS="agent -f $LOGSTASH_HOME/etc/conf.d" +LOGSTASH_OPTS="$LOGSTASH_OPTS --pluginpath $LOGSTASH_HOME/lib" +LOGSTASH_OPTS="$LOGSTASH_OPTS -l $LOGSTASH_HOME/log/logstash.log" +export LOGSTASH_OPTS="$LOGSTASH_OPTS -w 1" +HOME=$LOGSTASH_HOME exec chpst -u logstash:logstash $LOGSTASH_HOME/bin/logstash $LOGSTASH_OPTS - change mode from '' to '0755' * directory[/etc/sv/logstash_server/log] action create - create new directory /etc/sv/logstash_server/log * directory[/etc/sv/logstash_server/log/main] action create - create new directory /etc/sv/logstash_server/log/main - change mode from '' to '0755' * directory[/var/log/logstash_server] action create - create new directory /var/log/logstash_server - change mode from '' to '0755' * template[/etc/sv/logstash_server/log/config] action create - create new file /etc/sv/logstash_server/log/config - update content in file /etc/sv/logstash_server/log/config from none to e3b0c4 (no diff) - change mode from '' to '0644' * link[/var/log/logstash_server/config] action create - create symlink at /var/log/logstash_server/config to /etc/sv/logstash_server/log/config * template[/etc/sv/logstash_server/log/run] action create - create new file /etc/sv/logstash_server/log/run - update content in file /etc/sv/logstash_server/log/run from none to e64148 --- /etc/sv/logstash_server/log/run 2016-08-11 21:44:20.550376384 +0000 +++ /etc/sv/logstash_server/log/.chef-run20160811-1562-fecaxr 2016-08-11 21:44:20.550376384 +0000 @@ -1 +1,3 @@ +#!/bin/sh +exec svlogd -tt ./main - change mode from '' to '0755' * directory[/etc/sv/logstash_server/env] action create - create new directory /etc/sv/logstash_server/env - change mode from '' to '0755' * ruby_block[zap extra env files for logstash_server service] action run (skipped due to only_if) * directory[/etc/sv/logstash_server/control] action create - create new directory /etc/sv/logstash_server/control - change mode from '' to '0755' * link[/etc/init.d/logstash_server] action create - create symlink at /etc/init.d/logstash_server to /usr/bin/sv * file[/etc/sv/logstash_server/down] action nothing (skipped due to action :nothing) * directory[/etc/service] action create (up to date) * link[/etc/service/logstash_server] action create - create symlink at /etc/service/logstash_server to /etc/sv/logstash_server * ruby_block[wait for logstash_server service socket] action run - execute the ruby block wait for logstash_server service socket Recipe: elkstack::logstash * directory[/opt/logstash] action create - change owner from 'root' to 'logstash' - change group from 'root' to 'logstash' Recipe: elkstack::_lumberjack_secrets * file[/opt/logstash/lumberjack.key] action create - create new file /opt/logstash/lumberjack.key - update content in file /opt/logstash/lumberjack.key from none to 5bbb8b --- /opt/logstash/lumberjack.key 2016-08-11 21:44:23.946376384 +0000 +++ /opt/logstash/.chef-lumberjack.key20160811-1562-yx75e1 2016-08-11 21:44:23.946376384 +0000 @@ -1 +1,29 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDgaAp+bGikbJl4 +9NN35KE7aBBGa+Ir7bqWqJPu1TtURZtEgasNCJY8oMOwpK50xT/6Pf3eK+tloPEo +tLlsfQtJXHtnDRTfAyEqb49CXZn4E3mGPtZjDLjUQW/kjv9xgx5k78EubWdERsOt +Eq2/5jMGW+Cjn2USY3vgK9WGaIvDFQBamr4XZ6byy2Aidx0Loo8BoAs57kgys6/p +KcKPFJ3k9iFeMNZghNUi2jGA5zV2JQw597Xz5l4ZHFxuq/D3LTDZcmpdnCi7v4MX +B7fE5sl56kfpMj2jsDFuTWMiOw0aFGgB8nJIhyVqeSmRKPXmZwJOePrKK7znwEZZ +OMF+jlnPAgMBAAECggEAIOYf47jw/moNdfYuqn0SRitTd3+JgPcxS7UbOwB32jr6 +MGjyMs73d5v6FIOQL/5bCszb0x6NPDEEKfuU05rhdLfiP5FjZe6Hhjkkv44JbJ0u +S8galhrfXf7Z8KAmQvX+Fr4vjCbt5MybE1yRrHiLMnt1y4cqwi9jkdHbVAEvvEGp +pds6nV4thl/8rcoy3sGWdGF1ixS5ZxSemXNofgszYlfQeVD7Pjk0O1OUyRXsEjLa +3felRRxnvDfwB9TFZ6rEc/KAS6pA+6NmRWyLe8HLIGjisK0+lU0WkwSGZRm2h8YZ +kAaV4aqoru0x0OAiN4XTT1RZfJvbPEXpy0+VklkKgQKBgQD2PDc+GsHwM5zOf53r +adUGeWOXBYNjniKXBd6bjXqYgG0hAZXpU7yHXEVqCIzbA9FvwMKpb9p34a97Z2i5 ++rdE57g5ZOVak0PsdgD9CQoXNWueNxDRE5N9vhcLKh7Pe5pKaMA+Yk7UagSxOWGY +K2hAxtke7eQirBSDGn//dCSquQKBgQDpTjgA7iGxgn+zKSqaDYp2rmSwaCdqjcxq +k/I29EmfkdojgJb3uplYGYDz5TQPoC8G0PXeWPHD4b7Uq+drF1BL5ggX3jcATk7G +WpwgnT1/sOJWT3DzbDRCSWN+uF+23XKem4lwbcXKCC9jSrltue2gx5SKMkCSjlhB +065KMhjExwKBgQDNBcZZh54DinX92nR7F1uwUFKD5KtJvtm+NbzseBij8grreI6C +AJ7xdfq2FvhxQ/SWwEFVIzUcrGWYsrmYYRFH5kiWQVRW3leoA3k/Ns+YE3rP+bme +3FXqVOSK/z84Mwp8+ktXpjNM2hmeFtEUCtB7XxZZkmpqFC3gG6iH4wTEwQKBgGT4 +OB6W8LgNHU0hdNGFKLaiVOtPuDdSNPSvILWN1cscaUbSIQQHmtPY/ckQGg7lKVUO +3EmlPsSij18lIptjVJn0bO4/ephES61mi4lF49a+a8YkzWJcIuXJMykljC7s+e0Q +rVOd/mqoTjHvpf6J6ACcP3nrs6x5tFKQ1S5BLh0DAoGBAOaqhwXyf/BCMN0XiWm/ +JlfQ3FEy8IEQ6jVOivw4YD6UdgaOYmDtkZjF0R3FkaPFbjjXaDv97BrimuLrbyfi +4kcps02DI+aGtTDNnrTl6NNk7IcCRsl8Q6jqWfTBk3zLu36UzV7WPblu0mRcWdxC +I7nv8uPi2Uvf2Ce57MrSV/YP +-----END PRIVATE KEY----- - change mode from '' to '0600' - change owner from '' to 'logstash' - change group from '' to 'logstash' * file[/opt/logstash/lumberjack.crt] action create - create new file /opt/logstash/lumberjack.crt - update content in file /opt/logstash/lumberjack.crt from none to d96756 --- /opt/logstash/lumberjack.crt 2016-08-11 21:44:23.994376384 +0000 +++ /opt/logstash/.chef-lumberjack.crt20160811-1562-1vhln1 2016-08-11 21:44:23.994376384 +0000 @@ -1 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDpTCCAo2gAwIBAgIJAM1BnAzxqYgfMA0GCSqGSIb3DQEBCwUAMGkxCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJUWDEUMBIGA1UEBwwLU2FuIEFudG9uaW8xEjAQBgNV +BAoMCVJhY2tzcGFjZTEPMA0GA1UECwwGRGV2T3BzMRIwEAYDVQQDDAlFTEsgc3Rh +Y2swHhcNMTQwOTE4MTkyOTIzWhcNMTcwNjE0MTkyOTIzWjBpMQswCQYDVQQGEwJV +UzELMAkGA1UECAwCVFgxFDASBgNVBAcMC1NhbiBBbnRvbmlvMRIwEAYDVQQKDAlS +YWNrc3BhY2UxDzANBgNVBAsMBkRldk9wczESMBAGA1UEAwwJRUxLIHN0YWNrMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4GgKfmxopGyZePTTd+ShO2gQ +RmviK+26lqiT7tU7VEWbRIGrDQiWPKDDsKSudMU/+j393ivrZaDxKLS5bH0LSVx7 +Zw0U3wMhKm+PQl2Z+BN5hj7WYwy41EFv5I7/cYMeZO/BLm1nREbDrRKtv+YzBlvg +o59lEmN74CvVhmiLwxUAWpq+F2em8stgIncdC6KPAaALOe5IMrOv6SnCjxSd5PYh +XjDWYITVItoxgOc1diUMOfe18+ZeGRxcbqvw9y0w2XJqXZwou7+DFwe3xObJeepH +6TI9o7Axbk1jIjsNGhRoAfJySIclankpkSj15mcCTnj6yiu858BGWTjBfo5ZzwID +AQABo1AwTjAdBgNVHQ4EFgQUuprVYwd7ho3iLBYfnvEZQL7ZZ8owHwYDVR0jBBgw +FoAUuprVYwd7ho3iLBYfnvEZQL7ZZ8owDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B +AQsFAAOCAQEAsG2DaqNDKwOUOmbXFxVyiDUbEhonMI+Ex23pksajRsLuRAAZbH65 +EGC/QoWdTNAJEEK7UyTf1Y4TCGSFy+6uL4LEcDDKeMdIhBHpGW3ahrupqo/44v8E +NmbNg/ZIdQpYb2Ypuer7OD5Fhb9iQqsknG4Iq4yt/sGxKHGf6KPcw5vBq+pVLUbw +Rs73T8H5NW+7nQCYKTRUOvtf4JH0mq21oXwEo+bFPy+5XOB+jTLmVsxYhgSTzgxu +8jMJb6xsK2OUGiqIwkFlDGjVin7teobQyJsBIZhJmIudOAHuOcCEkGw6IBnhjhRg +hH6v84WIHCkYyVeogQXi0ZtmlKx5Y8H8uA== +-----END CERTIFICATE----- - change mode from '' to '0600' - change owner from '' to 'logstash' - change group from '' to 'logstash' Recipe: elkstack::logstash * logstash_config[server] action create * template[/opt/logstash/server/etc/conf.d/input_syslog] action create - create new file /opt/logstash/server/etc/conf.d/input_syslog - update content in file /opt/logstash/server/etc/conf.d/input_syslog from none to b44709 --- /opt/logstash/server/etc/conf.d/input_syslog 2016-08-11 21:44:24.634376384 +0000 +++ /opt/logstash/server/etc/conf.d/.chef-input_syslog20160811-1562-16t4bua 2016-08-11 21:44:24.634376384 +0000 @@ -1 +1,36 @@ +input { + tcp { + port => "5959" + host => "0.0.0.0" + type => "syslog" + } +} + +filter { + if [type] == "syslog" { + grok { + overwrite => "message" + match => [ + "message", + "%{SYSLOGTIMESTAMP:timestamp} %{IPORHOST:host} (?:%{PROG:program}(?:\[%{POSINT:pid}\])?: )?%{GREEDYDATA:message}" + ] + } + syslog_pri { } + date { + # season to taste for your own syslog format(s) + match => [ + "timestamp", + "MMM d HH:mm:ss", + "MMM dd HH:mm:ss", + "ISO8601" + ] + } + } +} + +filter { + mutate { + replace => [ "input_chef_environment", "_default" ] + } +} - change mode from '' to '0644' - change owner from '' to 'logstash' - change group from '' to 'logstash' * template[/opt/logstash/server/etc/conf.d/input_tcp] action create - create new file /opt/logstash/server/etc/conf.d/input_tcp - update content in file /opt/logstash/server/etc/conf.d/input_tcp from none to e7f8bf --- /opt/logstash/server/etc/conf.d/input_tcp 2016-08-11 21:44:24.694376384 +0000 +++ /opt/logstash/server/etc/conf.d/.chef-input_tcp20160811-1562-leit1 2016-08-11 21:44:24.694376384 +0000 @@ -1 +1,13 @@ +input { + tcp { + port => "5961" + host => "0.0.0.0" + } +} + +filter { + mutate { + replace => [ "input_chef_environment", "_default" ] + } +} - change mode from '' to '0644' - change owner from '' to 'logstash' - change group from '' to 'logstash' * template[/opt/logstash/server/etc/conf.d/input_udp] action create - create new file /opt/logstash/server/etc/conf.d/input_udp - update content in file /opt/logstash/server/etc/conf.d/input_udp from none to 9fe62d --- /opt/logstash/server/etc/conf.d/input_udp 2016-08-11 21:44:24.762376384 +0000 +++ /opt/logstash/server/etc/conf.d/.chef-input_udp20160811-1562-12re5jv 2016-08-11 21:44:24.762376384 +0000 @@ -1 +1,13 @@ +input { + udp { + port => "5962" + host => "0.0.0.0" + } +} + +filter { + mutate { + replace => [ "input_chef_environment", "_default" ] + } +} - change mode from '' to '0644' - change owner from '' to 'logstash' - change group from '' to 'logstash' * template[/opt/logstash/server/etc/conf.d/output_elasticsearch] action create - create new file /opt/logstash/server/etc/conf.d/output_elasticsearch - update content in file /opt/logstash/server/etc/conf.d/output_elasticsearch from none to 1f3ab4 --- /opt/logstash/server/etc/conf.d/output_elasticsearch 2016-08-11 21:44:24.858376384 +0000 +++ /opt/logstash/server/etc/conf.d/.chef-output_elasticsearch20160811-1562-1k9y1a5 2016-08-11 21:44:24.858376384 +0000 @@ -1 +1,8 @@ +# no filters or mutators should be placed here, we preserve as much as possible by this stage +output { + elasticsearch { + host => "eslocal" + protocol => "transport" + } +} - change mode from '' to '0644' - change owner from '' to 'logstash' - change group from '' to 'logstash' Recipe: elkstack::logstash_monitoring * rackspace_monitoring_service[default] action create (skipped due to only_if) * rackspace_monitoring_service[default] action start (skipped due to only_if) * rackspace_monitoring_check[tcp-logstash-5959] action enable (skipped due to only_if) * rackspace_monitoring_check[logstash_service] action create (skipped due to only_if) Recipe: elkstack::kibana_ssl * directory[/etc/nginx/ssl] action create - create new directory /etc/nginx/ssl - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' * htpasswd[/etc/nginx/htpassword] action overwrite Recipe: htpasswd::_common * chef_gem[htauth] action install - install version ~> 1.1.0 of package htauth - Create htpasswd[/etc/nginx/htpassword] * ruby_block[Creating htpasswd file /etc/nginx/htpassword] action run - execute the ruby block Creating htpasswd file /etc/nginx/htpassword * chef_gem[htauth] action install (up to date) Recipe: elkstack::kibana_ssl * file[/etc/nginx/htpassword.curl] action create_if_missing - create new file /etc/nginx/htpassword.curl - update content in file /etc/nginx/htpassword.curl from none to bdc090 --- /etc/nginx/htpassword.curl 2016-08-11 21:44:41.226376384 +0000 +++ /etc/nginx/.chef-htpassword.curl20160811-1562-1d0kwu5 2016-08-11 21:44:41.226376384 +0000 @@ -1 +1,2 @@ +user = "kibana:kibana" - change mode from '' to '0600' - change owner from '' to 'root' - change group from '' to 'root' * openssl_x509[/etc/nginx/ssl/kibana.pem] action create - Create openssl_x509[/etc/nginx/ssl/kibana.pem] * file[/etc/nginx/ssl/kibana.pem] action create_if_missing - create new file /etc/nginx/ssl/kibana.pem - update content in file /etc/nginx/ssl/kibana.pem from none to f0daa3 - suppressed sensitive resource * file[/etc/nginx/ssl/kibana.key] action create_if_missing - create new file /etc/nginx/ssl/kibana.key - update content in file /etc/nginx/ssl/kibana.key from none to e4aaf1 - suppressed sensitive resource Recipe: elkstack::kibana * kibana_user[kibana] action create[2016-08-11T21:44:41+00:00] WARN: Class Chef::Provider::KibanaUser does not declare 'provides :kibana_user'. [2016-08-11T21:44:41+00:00] WARN: This will no longer work in Chef 13: you must use 'provides' to use the resource's DSL. * user[kibana] action create - create user kibana * group[kibana] action create - alter group kibana - add missing member(s): kibana - create resource kibana * kibana_install[kibana] action create[2016-08-11T21:44:43+00:00] WARN: Class Chef::Provider::KibanaInstall does not declare 'provides :kibana_install'. [2016-08-11T21:44:43+00:00] WARN: This will no longer work in Chef 13: you must use 'provides' to use the resource's DSL. Recipe: libarchive::default * apt_package[libarchive-dev] action upgrade - upgrade package libarchive-dev from uninstalled to 3.1.2-7ubuntu2.3 * chef_gem[ffi-libarchive] action install - install version ~> 0.2.0 of package ffi-libarchive * directory[/opt/kibana] action create (up to date) * apt_package[libarchive-dev] action nothing (skipped due to action :nothing) * chef_gem[ffi-libarchive] action install (up to date) * remote_file[/tmp/kitchen/cache/kibana_kibana_4.0.0-linux-x64_kibana.tar.gz] action create - create new file /tmp/kitchen/cache/kibana_kibana_4.0.0-linux-x64_kibana.tar.gz - update content in file /tmp/kitchen/cache/kibana_kibana_4.0.0-linux-x64_kibana.tar.gz from none to 8f1de2 (file sizes exceed 10000000 bytes, diff output suppressed) * libarchive_file[kibana_kibana_4.0.0-linux-x64_kibana.tar.gz] action extract * link[/opt/kibana/current] action create - create symlink at /opt/kibana/current to /opt/kibana/kibana-4.0.0-linux-x64 - create resource kibana Recipe: elkstack::kibana * template[/opt/kibana/current/config/kibana.yml] action create - update content in file /opt/kibana/current/config/kibana.yml from 915ed3 to e88ad5 --- /opt/kibana/current/config/kibana.yml 2016-08-11 21:49:33.218376384 +0000 +++ /opt/kibana/current/config/.chef-kibana.yml20160811-1562-w1r72q 2016-08-11 21:49:35.442376384 +0000 @@ -1,62 +1,31 @@ -# Kibana is served by a back end server. This controls which port to use. +# Kibana is served by a backend server. This controls which port to use. port: 5601 -# The host to bind the server to. -host: "0.0.0.0" +# The Elasticsearch instance to user for all your queries +elasticsearch_url: "http://127.0.0.1:9200" -# The Elasticsearch instance to use for all your queries. -elasticsearch_url: "http://localhost:9200" +# Kibana uses and index in Elasticsearch to store saved searches, visualizations +# and dashboard. It will create an new index if it doesn't already exist. +kibana_index: "kibana-int" -# preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false, -# then the host you use to connect to *this* Kibana instance will be sent. -elasticsearch_preserve_host: true - -# Kibana uses an index in Elasticsearch to store saved searches, visualizations -# and dashboards. It will create a new index if it doesn't already exist. -kibana_index: ".kibana" - -# If your Elasticsearch is protected with basic auth, this is the user credentials -# used by the Kibana server to perform maintence on the kibana_index at statup. Your Kibana -# users will still need to authenticate with Elasticsearch (which is proxied thorugh -# the Kibana server) -# kibana_elasticsearch_username: user -# kibana_elasticsearch_password: pass - - # The default application to load. default_app_id: "discover" # Time in milliseconds to wait for responses from the back end or elasticsearch. # This must be > 0 -request_timeout: 300000 +request_timeout: 60000 # Time in milliseconds for Elasticsearch to wait for responses from shards. -# Set to 0 to disable. -shard_timeout: 0 +# Note this should always be lower than "request_timeout". +# Set to 0 to disable (not recommended). +shard_timeout: 30000 -# Set to false to have a complete disregard for the validity of the SSL -# certificate. -verify_ssl: true - -# If you need to provide a CA certificate for your Elasticsarech instance, put -# the path of the pem file here. -# ca: /path/to/your/CA.pem - -# SSL for outgoing requests from the Kibana Server (PEM formatted) -# ssl_key_file: /path/to/your/server.key -# ssl_cert_file: /path/to/your/server.crt - -# Set the path to where you would like the process id file to be created. -# pid_file: /var/run/kibana.pid - - # Plugins that are included in the build, and no longer found in the plugins/ folder bundled_plugin_ids: - plugins/dashboard/index - plugins/discover/index - plugins/doc/index - plugins/kibana/index - - plugins/markdown_vis/index - plugins/metric_vis/index - plugins/settings/index - plugins/table_vis/index - change group from 'root' to 'kibana' Recipe: * service[kibana] action nothing (skipped due to action :nothing) Recipe: elkstack::kibana * runit_service[kibana] action enable * directory[/etc/sv/kibana] action create - create new directory /etc/sv/kibana - change mode from '' to '0755' * template[/etc/sv/kibana/run] action create - create new file /etc/sv/kibana/run - update content in file /etc/sv/kibana/run from none to 952b1e --- /etc/sv/kibana/run 2016-08-11 21:49:35.766376384 +0000 +++ /etc/sv/kibana/.chef-run20160811-1562-t0ft6y 2016-08-11 21:49:35.766376384 +0000 @@ -1 +1,8 @@ +#!/bin/sh + +cd //opt/kibana/current +exec 2>&1 + +exec chpst -u kibana /opt/kibana/current/bin/kibana + - change mode from '' to '0755' * directory[/etc/sv/kibana/log] action create - create new directory /etc/sv/kibana/log * directory[/etc/sv/kibana/log/main] action create - create new directory /etc/sv/kibana/log/main - change mode from '' to '0755' * directory[/var/log/kibana] action create - create new directory /var/log/kibana - change mode from '' to '0755' * template[/etc/sv/kibana/log/config] action create - create new file /etc/sv/kibana/log/config - update content in file /etc/sv/kibana/log/config from none to e3b0c4 (no diff) - change mode from '' to '0644' * link[/var/log/kibana/config] action create - create symlink at /var/log/kibana/config to /etc/sv/kibana/log/config * template[/etc/sv/kibana/log/run] action create - create new file /etc/sv/kibana/log/run - update content in file /etc/sv/kibana/log/run from none to e64148 --- /etc/sv/kibana/log/run 2016-08-11 21:49:36.090376384 +0000 +++ /etc/sv/kibana/log/.chef-run20160811-1562-x7piqr 2016-08-11 21:49:36.090376384 +0000 @@ -1 +1,3 @@ +#!/bin/sh +exec svlogd -tt ./main - change mode from '' to '0755' * directory[/etc/sv/kibana/env] action create - create new directory /etc/sv/kibana/env - change mode from '' to '0755' * ruby_block[zap extra env files for kibana service] action run (skipped due to only_if) * directory[/etc/sv/kibana/control] action create - create new directory /etc/sv/kibana/control - change mode from '' to '0755' * link[/etc/init.d/kibana] action create - create symlink at /etc/init.d/kibana to /usr/bin/sv * file[/etc/sv/kibana/down] action nothing (skipped due to action :nothing) * directory[/etc/service] action create (up to date) * link[/etc/service/kibana] action create - create symlink at /etc/service/kibana to /etc/sv/kibana * ruby_block[wait for kibana service socket] action run - execute the ruby block wait for kibana service socket * kibana_web[kibana] action create[2016-08-11T21:49:38+00:00] WARN: Class Chef::Provider::KibanaWeb does not declare 'provides :kibana_web'. [2016-08-11T21:49:38+00:00] WARN: This will no longer work in Chef 13: you must use 'provides' to use the resource's DSL. Recipe: ohai::default * remote_directory[/etc/chef/ohai_plugins for cookbook ohai] action create - create new directory /etc/chef/ohai_plugins - change mode from '' to '0755' Recipe: * cookbook_file[/etc/chef/ohai_plugins/README] action create - create new file /etc/chef/ohai_plugins/README - update content in file /etc/chef/ohai_plugins/README from none to 775fa7 --- /etc/chef/ohai_plugins/README 2016-08-11 21:49:39.962376384 +0000 +++ /etc/chef/ohai_plugins/.chef-README20160811-1562-tuejum 2016-08-11 21:49:39.958376384 +0000 @@ -1 +1,2 @@ +This directory contains custom plugins for Ohai. - change mode from '' to '0644' Recipe: ohai::default * ohai[custom_plugins] action reload[2016-08-11T21:49:39+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. [2016-08-11T21:49:40+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. - re-run ohai and merge results into node attributes Recipe: nginx::ohai_plugin * ohai[reload_nginx] action nothing (skipped due to action :nothing) * template[/etc/chef/ohai_plugins/nginx.rb] action create - create new file /etc/chef/ohai_plugins/nginx.rb - update content in file /etc/chef/ohai_plugins/nginx.rb from none to 9f7e82 --- /etc/chef/ohai_plugins/nginx.rb 2016-08-11 21:50:23.050376384 +0000 +++ /etc/chef/ohai_plugins/.chef-nginx.rb20160811-1562-18joj8g 2016-08-11 21:50:23.050376384 +0000 @@ -1 +1,67 @@ +# +# Author:: Jamie Winsor () +# +# Copyright 2012, Riot Games +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +provides "nginx" +provides "nginx/version" +provides "nginx/configure_arguments" +provides "nginx/prefix" +provides "nginx/conf_path" + +def parse_flags(flags) + prefix = nil + conf_path = nil + + flags.each do |flag| + case flag + when /^--prefix=(.+)$/ + prefix = $1 + when /^--conf-path=(.+)$/ + conf_path = $1 + end + end + + [ prefix, conf_path ] +end + +nginx Mash.new unless nginx +nginx[:version] = nil unless nginx[:version] +nginx[:configure_arguments] = Array.new unless nginx[:configure_arguments] +nginx[:prefix] = nil unless nginx[:prefix] +nginx[:conf_path] = nil unless nginx[:conf_path] + +status, stdout, stderr = run_command(:no_status_check => true, :command => "/usr/sbin/nginx -V") + +if status == 0 + stderr.split("\n").each do |line| + case line + when /^configure arguments:(.+)/ + # This could be better: I'm splitting on configure arguments which removes them and also + # adds a blank string at index 0 of the array. This is why we drop index 0 and map to + # add the '--' prefix back to the configure argument. + nginx[:configure_arguments] = $1.split(/\s--/).drop(1).map { |ca| "--#{ca}" } + + prefix, conf_path = parse_flags(nginx[:configure_arguments]) + + nginx[:prefix] = prefix + nginx[:conf_path] = conf_path + when /^nginx version: nginx\/(\d+\.\d+\.\d+)/ + nginx[:version] = $1 + end + end +end - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' * ohai[reload_nginx] action reload[2016-08-11T21:50:23+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. [2016-08-11T21:50:23+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. [2016-08-11T21:50:23+00:00] WARN: [DEPRECATION] Plugin at /etc/chef/ohai_plugins/nginx.rb is a version 6 plugin. Version 6 plugins will not be supported in future releases of Ohai. Please upgrade your plugin to version 7 plugin syntax. For more information visit here: docs.chef.io/ohai_custom.html [2016-08-11T21:50:26+00:00] WARN: Ohai::Mixin::Command run_command is deprecated and will be removed in Ohai 9.0.0 [2016-08-11T21:50:26+00:00] WARN: Ohai::Mixin::Command popen4 is deprecated and will be removed in Ohai 9.0.0 - re-run ohai and merge results into node attributes Recipe: ohai::default * remote_directory[/etc/chef/ohai_plugins for cookbook ohai] action nothing (skipped due to action :nothing) * ohai[custom_plugins] action nothing (skipped due to action :nothing) Recipe: nginx::package * apt_package[nginx] action install - install version 1.4.6-1ubuntu3.5 of package nginx Recipe: nginx::ohai_plugin * ohai[reload_nginx] action reload[2016-08-11T21:54:40+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. [2016-08-11T21:54:40+00:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai. [2016-08-11T21:54:40+00:00] WARN: [DEPRECATION] Plugin at /etc/chef/ohai_plugins/nginx.rb is a version 6 plugin. Version 6 plugins will not be supported in future releases of Ohai. Please upgrade your plugin to version 7 plugin syntax. For more information visit here: docs.chef.io/ohai_custom.html [2016-08-11T21:54:42+00:00] WARN: Ohai::Mixin::Command run_command is deprecated and will be removed in Ohai 9.0.0 [2016-08-11T21:54:42+00:00] WARN: Ohai::Mixin::Command popen4 is deprecated and will be removed in Ohai 9.0.0 - re-run ohai and merge results into node attributes Recipe: nginx::package * service[nginx] action enable (up to date) Recipe: nginx::commons_dir * directory[/etc/nginx] action create (up to date) * directory[/var/log/nginx] action create (up to date) * directory[/run] action create (up to date) * directory[/etc/nginx/sites-available] action create (up to date) * directory[/etc/nginx/sites-enabled] action create (up to date) * directory[/etc/nginx/conf.d] action create (up to date) Recipe: nginx::commons_script * template[/usr/sbin/nxensite] action create - create new file /usr/sbin/nxensite - update content in file /usr/sbin/nxensite from none to fa46fb --- /usr/sbin/nxensite 2016-08-11 21:54:44.203222384 +0000 +++ /usr/sbin/.chef-nxensite20160811-1562-oxhwr7 2016-08-11 21:54:44.191228389 +0000 @@ -1 +1,39 @@ +#!/bin/sh -e + +SYSCONFDIR='/etc/nginx' + +if [ -z $1 ]; then + echo "Which site would you like to enable?" + echo -n "Your choices are: " + ls $SYSCONFDIR/sites-available/* | \ + sed -e "s,$SYSCONFDIR/sites-available/,,g" | xargs echo + echo -n "Site name? " + read SITENAME +else + SITENAME=$1 +fi + +if [ $SITENAME = "default" ]; then + PRIORITY="000" +fi + +if [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then + echo "This site is already enabled!" + exit 0 +fi + +if ! [ -e $SYSCONFDIR/sites-available/$SITENAME ]; then + echo "This site does not exist!" + exit 1 +fi + +if [ $SITENAME = "default" ]; then + ln -sf $SYSCONFDIR/sites-available/$SITENAME \ + $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" +else + ln -sf $SYSCONFDIR/sites-available/$SITENAME $SYSCONFDIR/sites-enabled/$SITENAME +fi + +echo "Site $SITENAME installed; reload nginx to enable." - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' * template[/usr/sbin/nxdissite] action create - create new file /usr/sbin/nxdissite - update content in file /usr/sbin/nxdissite from none to cc16ec --- /usr/sbin/nxdissite 2016-08-11 21:54:44.315166383 +0000 +++ /usr/sbin/.chef-nxdissite20160811-1562-1ux0pqn 2016-08-11 21:54:44.315166383 +0000 @@ -1 +1,30 @@ +#!/bin/sh -e + +SYSCONFDIR='/etc/nginx' + +if [ -z $1 ]; then + echo "Which site would you like to disable?" + echo -n "Your choices are: " + ls $SYSCONFDIR/sites-enabled/* | \ + sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo + echo -n "Site name? " + read SITENAME +else + SITENAME=$1 +fi + +if [ $SITENAME = "default" ]; then + PRIORITY="000" +fi + +if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then + echo "This site is already disabled, or does not exist!" + exit 1 +fi + +if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then + rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" +fi +echo "Site $SITENAME disabled; reload nginx to disable." - change mode from '' to '0755' - change owner from '' to 'root' - change group from '' to 'root' Recipe: nginx::commons_conf * template[nginx.conf] action create - update content in file /etc/nginx/nginx.conf from 9492ca to e61f6c --- /etc/nginx/nginx.conf 2014-03-04 22:25:36.000000000 +0000 +++ /etc/nginx/.chef-nginx.conf20160811-1562-1nzj24u 2016-08-11 21:54:44.515066383 +0000 @@ -1,96 +1,48 @@ user www-data; -worker_processes 4; -pid /run/nginx.pid; +worker_processes 1; +error_log /var/log/nginx/error.log; +pid /run/nginx.pid; + events { - worker_connections 768; - # multi_accept on; + worker_connections 1024; } http { - ## - # Basic Settings - ## + include /etc/nginx/mime.types; + default_type application/octet-stream; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - # server_tokens off; - # server_names_hash_bucket_size 64; - # server_name_in_redirect off; + access_log /var/log/nginx/access.log; - include /etc/nginx/mime.types; - default_type application/octet-stream; + sendfile on; + tcp_nopush on; + tcp_nodelay on; - ## - # Logging Settings - ## + keepalive_requests 100; + keepalive_timeout 65; - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; - ## - # Gzip Settings - ## + gzip on; + gzip_http_version 1.0; + gzip_comp_level 2; + gzip_proxied any; + gzip_vary off; + gzip_types text/plain text/css application/x-javascript text/xml application/xml application/rss+xml application/atom+xml text/javascript application/javascript application/json text/mathml; + gzip_min_length 1000; + gzip_disable "MSIE [1-6]\."; - gzip on; - gzip_disable "msie6"; - # gzip_vary on; - # gzip_proxied any; - # gzip_comp_level 6; - # gzip_buffers 16 8k; - # gzip_http_version 1.1; - # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + variables_hash_max_size 1024; + variables_hash_bucket_size 64; + server_names_hash_bucket_size 128; + types_hash_max_size 2048; + types_hash_bucket_size 64; - ## - # nginx-naxsi config - ## - # Uncomment it if you installed nginx-naxsi - ## - #include /etc/nginx/naxsi_core.rules; - ## - # nginx-passenger config - ## - # Uncomment it if you installed nginx-passenger - ## - - #passenger_root /usr; - #passenger_ruby /usr/bin/ruby; - - ## - # Virtual Host Configs - ## - - include /etc/nginx/conf.d/*.conf; - include /etc/nginx/sites-enabled/*; + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; } - - -#mail { -# # See sample authentication script at: -# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript -# -# # auth_http localhost/auth.php; -# # pop3_capabilities "TOP" "USER"; -# # imap_capabilities "IMAP4rev1" "UIDPLUS"; -# -# server { -# listen localhost:110; -# protocol pop3; -# proxy on; -# } -# -# server { -# listen localhost:143; -# protocol imap; -# proxy on; -# } -#} * template[/etc/nginx/sites-available/default] action create - update content in file /etc/nginx/sites-available/default from cda500 to 1ac789 --- /etc/nginx/sites-available/default 2014-03-04 22:25:36.000000000 +0000 +++ /etc/nginx/sites-available/.chef-default20160811-1562-1exlftq 2016-08-11 21:54:44.714966382 +0000 @@ -1,113 +1,12 @@ -# You may add here your -# server { -# ... -# } -# statements for each of your virtual hosts to this file - -## -# You should look at the following URL's in order to grasp a solid understanding -# of Nginx configuration files in order to fully unleash the power of Nginx. -# http://wiki.nginx.org/Pitfalls -# http://wiki.nginx.org/QuickStart -# http://wiki.nginx.org/Configuration -# -# Generally, you will want to move this file somewhere, and start with a clean -# file but keep this around for reference. Or just disable in sites-enabled. -# -# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. -## - server { - listen 80 default_server; - listen [::]:80 default_server ipv6only=on; + listen 80; + server_name default-ubuntu-1404; - root /usr/share/nginx/html; - index index.html index.htm; + access_log /var/log/nginx/localhost.access.log; - # Make site accessible from http://localhost/ - server_name localhost; - - location / { - # First attempt to serve request as file, then - # as directory, then fall back to displaying a 404. - try_files $uri $uri/ =404; - # Uncomment to enable naxsi on this location - # include /etc/nginx/naxsi.rules - } - - # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests - #location /RequestDenied { - # proxy_pass http://127.0.0.1:8080; - #} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root /usr/share/nginx/html; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # fastcgi_split_path_info ^(.+\.php)(/.+)$; - # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini - # - # # With php5-cgi alone: - # fastcgi_pass 127.0.0.1:9000; - # # With php5-fpm: - # fastcgi_pass unix:/var/run/php5-fpm.sock; - # fastcgi_index index.php; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} + location / { + root /var/www/nginx-default; + index index.html index.htm; + } } - - -# another virtual host using mix of IP-, name-, and port-based configuration -# -#server { -# listen 8000; -# listen somename:8080; -# server_name somename alias another.alias; -# root html; -# index index.html index.htm; -# -# location / { -# try_files $uri $uri/ =404; -# } -#} - - -# HTTPS server -# -#server { -# listen 443; -# server_name localhost; -# -# root html; -# index index.html index.htm; -# -# ssl on; -# ssl_certificate cert.pem; -# ssl_certificate_key cert.key; -# -# ssl_session_timeout 5m; -# -# ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; -# ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; -# ssl_prefer_server_ciphers on; -# -# location / { -# try_files $uri $uri/ =404; -# } -#} * execute[nxdissite default] action run - execute /usr/sbin/nxdissite default Recipe: nginx::default * service[nginx] action start (up to date) * template[/etc/nginx/sites-available/kibana] action create - create new file /etc/nginx/sites-available/kibana - update content in file /etc/nginx/sites-available/kibana from none to 24dd2a --- /etc/nginx/sites-available/kibana 2016-08-11 21:54:44.954846382 +0000 +++ /etc/nginx/sites-available/.chef-kibana20160811-1562-2cpodd 2016-08-11 21:54:44.954846382 +0000 @@ -1 +1,28 @@ +server { + listen 80; + listen 443 ssl; + + server_name default-ubuntu-1404 ; + access_log /var/log/nginx/default-ubuntu-1404.access.log; + + ssl_certificate_key /etc/nginx/ssl/kibana.key; + ssl_certificate /etc/nginx/ssl/kibana.pem; + + if ( $scheme = http ){ + rewrite ^ https://default-ubuntu-1404$request_uri? permanent; + } + + location / { + proxy_pass http://localhost:5601; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 90; + + # Password protect Kibana + auth_basic "Restricted Access"; + auth_basic_user_file /etc/nginx/htpassword; + } + +} Recipe: * execute[nxensite kibana] action run - execute /usr/sbin/nxensite kibana - create resource kibana Recipe: elkstack::kibana * service[nginx] action nothing (skipped due to action :nothing) * file[/etc/nginx/conf.d/default.conf] action delete (skipped due to only_if) Recipe: elkstack::kibana_monitoring * rackspace_monitoring_service[default] action create (skipped due to only_if) * rackspace_monitoring_service[default] action start (skipped due to only_if) * rackspace_monitoring_check[nginx_service] action create (skipped due to only_if) Recipe: rsyslog::default * apt_package[rsyslog] action install (up to date) * directory[/etc/rsyslog.d] action create (up to date) * directory[/var/spool/rsyslog] action create (up to date) * template[/etc/rsyslog.conf] action create - update content in file /etc/rsyslog.conf from af7e2f to 063992 --- /etc/rsyslog.conf 2014-08-19 19:51:16.000000000 +0000 +++ /etc/.chef-rsyslog.conf20160811-1562-w5uryo 2016-08-11 21:54:45.890378383 +0000 @@ -1,30 +1,29 @@ -# /etc/rsyslog.conf Configuration file for rsyslog. +# Config generated by Chef - manual edits will be overwritten # -# For more information see -# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +# /etc/rsyslog.conf Configuration file for rsyslog. # +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +# # Default logging rules can be found in /etc/rsyslog.d/50-default.conf +# +# Set max message size +# +$MaxMessageSize 2k +# +# Preserve FQDN +# +$PreserveFQDN off ################# #### MODULES #### ################# -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support -#$ModLoad immark # provides --MARK-- message capability +$ModLoad imuxsock +$ModLoad imklog -# provides UDP syslog reception -#$ModLoad imudp -#$UDPServerRun 514 -# provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 - -# Enable non-kernel facility klog messages -$KLogPermitNonKernelFacility on - ########################### #### GLOBAL DIRECTIVES #### ########################### @@ -39,6 +38,11 @@ $RepeatedMsgReduction on # +# Set temporary directory to buffer syslog queue +# +$WorkDirectory /var/spool/rsyslog + +# # Set the default permissions for all log files. # $FileOwner syslog @@ -50,13 +54,11 @@ $PrivDropToGroup syslog # -# Where to place spool and state files +# Set other directives # -$WorkDirectory /var/spool/rsyslog # # Include all config files in /etc/rsyslog.d/ # $IncludeConfig /etc/rsyslog.d/*.conf - * template[/etc/rsyslog.d/50-default.conf] action create - update content in file /etc/rsyslog.d/50-default.conf from e85a0e to a14e35 --- /etc/rsyslog.d/50-default.conf 2013-04-18 16:19:02.000000000 +0000 +++ /etc/rsyslog.d/.chef-50-default.conf20160811-1562-1hjc42l 2016-08-11 21:54:46.030308384 +0000 @@ -1,69 +1,19 @@ -# Default rules for rsyslog. -# -# For more information see rsyslog.conf(5) and /etc/rsyslog.conf +# Generated by Chef +# For more information see rsyslog.conf(5) and /etc/rsyslog.conf -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -*.*;auth,authpriv.none -/var/log/syslog -#cron.* /var/log/cron.log -#daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -#lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -#user.* -/var/log/user.log - -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -#mail.info -/var/log/mail.info -#mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err - -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice - -# -# Some "catch-all" log files. -# -#*.=debug;\ -# auth,authpriv.none;\ -# news.none;mail.none -/var/log/debug -#*.=info;*.=notice;*.=warn;\ -# auth,authpriv.none;\ -# cron,daemon.none;\ -# mail,news.none -/var/log/messages - -# -# Emergencies are sent to everybody logged in. -# -*.emerg :omusrmsg:* - -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 - -# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, -# you must invoke `xconsole' with the `-file' option: -# -# $ xconsole -file /dev/xconsole [...] -# -# NOTE: adjust the list below, or you'll go crazy if you have a reasonably -# busy site.. -# -daemon.*;mail.*;\ - news.err;\ - *.=debug;*.=info;\ - *.=notice;*.=warn |/dev/xconsole +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice +*.=debug;auth,authpriv.none;news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;auth,authpriv.none;cron,daemon.none;mail,news.none -/var/log/messages +*.emerg :omusrmsg:* * service[rsyslog] action enable (up to date) * service[rsyslog] action start (up to date) Recipe: rsyslog::client * template[/etc/rsyslog.d/49-remote.conf] action create - create new file /etc/rsyslog.d/49-remote.conf - update content in file /etc/rsyslog.d/49-remote.conf from none to c18669 --- /etc/rsyslog.d/49-remote.conf 2016-08-11 21:54:46.745950384 +0000 +++ /etc/rsyslog.d/.chef-49-remote.conf20160811-1562-cc918p 2016-08-11 21:54:46.745950384 +0000 @@ -1 +1,9 @@ +# Generated by Chef +$ActionQueueType LinkedList # use asynchronous processing +$ActionQueueFileName srvrfwd # set file name, also enables disk mode +$ActionResumeRetryCount -1 # infinite retries on insert failure +$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down +$ActionQueueMaxDiskSpace 1G # Don't use more than this much space for the queue + +*.* @@127.0.0.1:5959 - change mode from '' to '0644' - change owner from '' to 'root' - change group from '' to 'root' * file[/etc/rsyslog.d/server.conf] action delete (up to date) Recipe: firewall::default * firewall[default] action restart * file[/etc/iptables/rules.v4] action create - update content in file /etc/iptables/rules.v4 from 44438e to b4412d --- /etc/iptables/rules.v4 2016-08-11 21:39:28.050376384 +0000 +++ /etc/iptables/.chef-rules.v420160811-1562-1tmaepj 2016-08-11 21:54:47.169738384 +0000 @@ -1,8 +1,23 @@ -# Generated by iptables-save v1.4.21 on Thu Aug 11 21:39:28 2016 +# position 1 *filter -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] +# position 2 +:INPUT DROP +# position 3 +:FORWARD DROP +# position 4 +:OUTPUT ACCEPT +# position 50 +-A INPUT -p tcp -m tcp -m multiport --dports 22 -m comment --comment "allow world to ssh" -j ACCEPT +-A INPUT -m state --state RELATED,ESTABLISHED -m comment --comment "established" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5959 -m comment --comment "allow syslog entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5960 -m comment --comment "allow lumberjack entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5961 -m comment --comment "allow tcp entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 443 -m comment --comment "allow nginx SSL entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 80 -m comment --comment "allow nginx entries inbound" -j ACCEPT +-A INPUT -p udp -m multiport --dports 5962 -m comment --comment "allow udp entries inbound" -j ACCEPT +-A INPUT -s 1.2.3.4/32 -p tcp -m tcp -m multiport --dports 9300 -m comment --comment "allow ES host 1.2.3.4 to connect" -j ACCEPT +-A INPUT -s 1.2.3.5/32 -p tcp -m tcp -m multiport --dports 9300 -m comment --comment "allow ES host 1.2.3.5 to connect" -j ACCEPT +-A INPUT -i lo -m comment --comment "open_loopback" -j ACCEPT +# position 100 COMMIT -# Completed on Thu Aug 11 21:39:28 2016 * file[/etc/iptables/rules.v6] action create - update content in file /etc/iptables/rules.v6 from bb3414 to e04b99 --- /etc/iptables/rules.v6 2016-08-11 21:39:28.130376384 +0000 +++ /etc/iptables/.chef-rules.v620160811-1562-1qows7b 2016-08-11 21:54:47.193726384 +0000 @@ -1,8 +1,21 @@ -# Generated by ip6tables-save v1.4.21 on Thu Aug 11 21:39:28 2016 +# position 1 *filter -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] +# position 2 +:INPUT DROP +# position 3 +:FORWARD DROP +# position 4 +:OUTPUT ACCEPT +# position 50 +-A INPUT -m state --state RELATED,ESTABLISHED -m comment --comment "established" -j ACCEPT +-A INPUT -p ipv6-icmp -m comment --comment "ipv6_icmp" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5959 -m comment --comment "allow syslog entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5960 -m comment --comment "allow lumberjack entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 5961 -m comment --comment "allow tcp entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 443 -m comment --comment "allow nginx SSL entries inbound" -j ACCEPT +-A INPUT -p tcp -m tcp -m multiport --dports 80 -m comment --comment "allow nginx entries inbound" -j ACCEPT +-A INPUT -p udp -m multiport --dports 5962 -m comment --comment "allow udp entries inbound" -j ACCEPT +-A INPUT -i lo -m comment --comment "open_loopback" -j ACCEPT +# position 100 COMMIT -# Completed on Thu Aug 11 21:39:28 2016 Recipe: elkstack::elasticsearch * service[elasticsearch] action start (up to date) Recipe: elkstack::logstash * logstash_service[server] action restart * runit_service[logstash_server] action restart ================================================================================ Error executing action `restart` on resource 'runit_service[logstash_server]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '1' ---- Begin output of /usr/bin/sv restart /etc/service/logstash_server ---- STDOUT: timeout: run: /etc/service/logstash_server: (pid 20646) 634s, got TERM STDERR: ---- End output of /usr/bin/sv restart /etc/service/logstash_server ---- Ran /usr/bin/sv restart /etc/service/logstash_server returned 1 Cookbook Trace: --------------- /tmp/kitchen/cache/cookbooks/runit/libraries/helpers.rb:173:in `restart_service' /tmp/kitchen/cache/cookbooks/runit/libraries/provider_runit_service.rb:291:in `block in ' /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb:224:in `service_action' /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb:42:in `block in class_from_file' Resource Declaration: --------------------- # In /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb 222: sv = runit_service svc[:service_name] 223: end Compiled Resource: ------------------ # Declared in /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb:222:in `service_action' runit_service("logstash_server") do provider Chef::Provider::RunitService action :enable updated true supports {:restart=>true, :reload=>true, :status=>true} retries 0 retry_delay 2 default_guard_interpreter :default service_name "logstash_server" pattern "logstash_server" status_command "/usr/bin/sv status /etc/service" sv_bin "/usr/bin/sv" sv_dir "/etc/sv" service_dir "/etc/service" lsb_init_dir "/etc/init.d" options {:name=>"server", :home=>"/opt/logstash/server", :max_heap=>"97M", :min_heap=>"97M", :gc_opts=>nil, :java_opts=>"", :ipv4_only=>false, :debug=>false, :log_file=>"logstash.log", :workers=>1, :install_type=>"tarball", :supervisor_gid=>"logstash", :user=>"logstash", :web_address=>nil, :web_port=>nil} log true cookbook "logstash" restart_on_update true run_template_name "logstash" log_template_name "logstash" check_script_template_name "logstash_server" finish_script_template_name "logstash_server" sv_templates true log_dir "/var/log/logstash_server" service_mirror # Declared in service("logstash_server") do provider Chef::Provider::Service::Simple action [:nothing] supports {:restart=>true, :reload=>true, :status=>true} retries 0 retry_delay 2 default_guard_interpreter :default service_name "logstash_server" pattern "logstash_server" start_command "/usr/bin/sv start /etc/service/logstash_server" stop_command "/usr/bin/sv stop /etc/service/logstash_server" status_command "/usr/bin/sv status /etc/service/logstash_server" restart_command "/usr/bin/sv restart /etc/service/logstash_server" end declared_type :runit_service cookbook_name "elkstack" end Platform: --------- x86_64-linux ================================================================================ Error executing action `restart` on resource 'logstash_service[server]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ runit_service[logstash_server] (/tmp/kitchen/cache/cookbooks/logstash/providers/service.rb line 222) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of /usr/bin/sv restart /etc/service/logstash_server ---- STDOUT: timeout: run: /etc/service/logstash_server: (pid 20646) 634s, got TERM STDERR: ---- End output of /usr/bin/sv restart /etc/service/logstash_server ---- Ran /usr/bin/sv restart /etc/service/logstash_server returned 1 Cookbook Trace: --------------- /tmp/kitchen/cache/cookbooks/runit/libraries/helpers.rb:173:in `restart_service' /tmp/kitchen/cache/cookbooks/runit/libraries/provider_runit_service.rb:291:in `block in ' /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb:224:in `service_action' /tmp/kitchen/cache/cookbooks/logstash/providers/service.rb:42:in `block in class_from_file' Resource Declaration: --------------------- # In /tmp/kitchen/cache/cookbooks/elkstack/recipes/logstash.rb 19: logstash_service instance_name do 20: action :enable 21: end 22: Compiled Resource: ------------------ # Declared in /tmp/kitchen/cache/cookbooks/elkstack/recipes/logstash.rb:19:in `from_file' logstash_service("server") do action [:enable] retries 0 retry_delay 2 default_guard_interpreter :default declared_type :logstash_service cookbook_name "elkstack" recipe_name "logstash" instance "server" end Platform: --------- x86_64-linux Recipe: elkstack::kibana * runit_service[kibana] action restart (up to date) Recipe: rsyslog::default * service[rsyslog] action restart - restart service service[rsyslog] * service[iptables-persistent] action restart - restart service service[iptables-persistent] * service[iptables-persistent] action restart - restart service service[iptables-persistent] Running handlers: [2016-08-11T21:55:07+00:00] ERROR: Running exception handlers Running handlers complete [2016-08-11T21:55:07+00:00] ERROR: Exception handlers complete Chef Client failed. 174 resources updated in 21 minutes 28 seconds [2016-08-11T21:55:08+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out [2016-08-11T21:55:08+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2016-08-11T21:55:08+00:00] ERROR: logstash_service[server] (elkstack::logstash line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: runit_service[logstash_server] (/tmp/kitchen/cache/cookbooks/logstash/providers/service.rb line 222) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of /usr/bin/sv restart /etc/service/logstash_server ---- STDOUT: timeout: run: /etc/service/logstash_server: (pid 20646) 634s, got TERM STDERR: ---- End output of /usr/bin/sv restart /etc/service/logstash_server ---- Ran /usr/bin/sv restart /etc/service/logstash_server returned 1 [2016-08-11T21:55:46+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) >>>>>> ------Exception------- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: 1 actions failed. >>>>>> Converge failed on instance . Please see .kitchen/logs/default-ubuntu-1404.log for more details >>>>>> ---------------------- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also try running `kitchen diagnose --all` for configuration