Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Different directories for Logstash
Browse files Browse the repository at this point in the history
references #1
pvandervelde committed Feb 15, 2019
1 parent d016260 commit 35cfb17
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
# LOGSTASH
#

home_directory = '/usr/local/logstash'
home_directory = '/usr/share/logstash'
settings_directory = '/etc/logstash'
default['logstash']['path']['home'] = home_directory
default['logstash']['path']['bin'] = "#{home_directory}/bin"
14 changes: 7 additions & 7 deletions src/cookbooks/resource_logs_processor/spec/logstash_spec.rb
Original file line number Diff line number Diff line change
@@ -6,16 +6,16 @@
context 'creates the logstash directories' do
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }

it 'creates the logstash install directory at /usr/local/logstash' do
expect(chef_run).to create_directory('/usr/local/logstash').with(
it 'creates the logstash install directory at /usr/share/logstash' do
expect(chef_run).to create_directory('/usr/share/logstash').with(
group: 'logstash',
mode: '0550',
owner: 'logstash'
)
end

it 'creates the logstash install directory at /usr/local/logstash/bin' do
expect(chef_run).to create_directory('/usr/local/logstash/bin').with(
it 'creates the logstash install directory at /usr/share/logstash/bin' do
expect(chef_run).to create_directory('/usr/share/logstash/bin').with(
group: 'logstash',
mode: '0550',
owner: 'logstash'
@@ -38,8 +38,8 @@
)
end

it 'creates the logstash plugins directory at /usr/local/logstash/plugins' do
expect(chef_run).to create_directory('/usr/local/logstash/plugins').with(
it 'creates the logstash plugins directory at /usr/share/logstash/plugins' do
expect(chef_run).to create_directory('/usr/share/logstash/plugins').with(
group: 'logstash',
mode: '0550',
owner: 'logstash'
@@ -168,7 +168,7 @@
# Entropy source for randomness
-Djava.security.egd=file:/dev/urandom
CONF
it 'creates jvm.options in the configuratino directory' do
it 'creates jvm.options in the configuration directory' do
expect(chef_run).to create_file('/etc/logstash/jvm.options')
.with_content(jvm_options_content)
.with(
10 changes: 5 additions & 5 deletions tests/integration/pester/Logstash.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Describe 'The logstash application' {
Context 'is installed' {
It 'with binaries in /usr/local/logstash' {
'/usr/local/logstash' | Should Exist
'/usr/local/logstash/bin' | Should Exist
It 'with binaries in /usr/share/logstash' {
'/usr/share/logstash' | Should Exist
'/usr/share/logstash/bin' | Should Exist
}

It 'with configurations in /etc/logstash' {
@@ -23,8 +23,8 @@ Describe 'The logstash application' {
$expectedContent = @'
[Service]
Type = forking
PIDFile = /usr/local/logstash/logstash_pid
ExecStart = /usr/local/logstash/run_logstash.sh
PIDFile = /tmp/logstash_pid
ExecStart = /usr/share/logstash/run_logstash.sh
RestartSec = 5
Restart = always
User = logstash

0 comments on commit 35cfb17

Please sign in to comment.