Skip to content

Commit

Permalink
Close issue 1, adjust Kafka data path.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgeiger committed Jan 2, 2016
1 parent 51f2373 commit c109cb6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tmp/
.vagrant
snort*
11 changes: 11 additions & 0 deletions cookbooks/simplerock/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,17 @@
command 'sed -i "s/log.retention.hours=168/log.retention.hours=1/" /opt/kafka/config/server.properties'
end

execute 'set_kafka_data_dir' do
command 'sed -i "s|log.dirs=/tmp/kafka-logs|log.dirs=/data/kafka|g" /opt/kafka/config/server.properties'
end

directory '/data/kafka' do
mode '0755'
owner 'kafka'
group 'kafka'
action :create
end

#Enable and start kafka
service 'kafka' do
action [ :enable, :start ]
Expand Down
6 changes: 5 additions & 1 deletion cookbooks/simplerock/templates/default/bro.sh.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Load bro to PATH
pathmunge /opt/bro/bin

# Helpers
alias bro-column="sed \"s/fields.//;s/types.//\" | column -s $'\t' -t"
alias bro-awk='awk -F" "'
bro-grep() { grep -E "(^#)|$1" $2; }
Expand Down Expand Up @@ -47,4 +51,4 @@ topconvo() { if [ $# -lt 1 ]; then echo "Usage: topconvo conn.log"; else
print $1, $2, size \
}' \
| sort -rnk 3 \
| head -n 20; fi; }
| head -n 20; fi; }
2 changes: 1 addition & 1 deletion cookbooks/simplerock/templates/default/pf_ring.conf.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
transparent_mode=0
min_num_slots=8192
enable_tx_capture=1
enable_tx_capture=0
enable_ip_defrag=0
quick_mode=0
11 changes: 11 additions & 0 deletions custom/cookbooks/simplerock/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,17 @@
command 'sed -i "s/log.retention.hours=168/log.retention.hours=1/" /opt/kafka/config/server.properties'
end

execute 'set_kafka_data_dir' do
command 'sed -i "s|log.dirs=/tmp/kafka-logs|log.dirs=/data/kafka|g" /opt/kafka/config/server.properties'
end

directory '/data/kafka' do
mode '0755'
owner 'kafka'
group 'kafka'
action :create
end

#Enable and start kafka
service 'kafka' do
action [ :enable, :start ]
Expand Down

0 comments on commit c109cb6

Please sign in to comment.