Skip to content

Instantly share code, notes, and snippets.

View stevepereira's full-sized avatar

Steve Pereira stevepereira

View GitHub Profile
@stevepereira
stevepereira / gist:6829649
Created October 4, 2013 17:33
file goes under input, pipe goes under output
file {
path => "/vagrant/src/api/log/events.log"
tags => "events"
}
pipe {
command => "/data/virtualenv/logstash_outputs/bin/python /vagrant/src/sandbox/logstash_outputs/pythonscript.py"
ttl => "0"
}
@stevepereira
stevepereira / gist:6816410
Created October 3, 2013 20:15
wave-cookbooks/base/rethink.rb add "recipe[base::rethink]", to roles/base.rb and vagrant provision
#
# Cookbook Name:: wave-rethink
# Recipe:: default
#
# Copyright (C) 2013 Steve Pereira
#
# All rights reserved - Do Not Redistribute
#
package "wget"
# docker build -t="rails" .
FROM ubuntu:12.04
RUN apt-get update
## MYSQL
RUN apt-get install -y -q mysql-client libmysqlclient-dev
## RUBY
{
"title": "Tweets Search",
"rows": [
{
"title": "Options",
"height": "50px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@stevepereira
stevepereira / gist:6341582
Created August 26, 2013 13:47
Ansible deployment script
vars.yml:
---
project_name: myproject
project_root: /var/projects/myproject
project_repo: git@bitbucket.org:username/myproject.git
system_packages:
- build-essential
- git
- libevent-dev
- nginx
@stevepereira
stevepereira / gist:6288036
Created August 20, 2013 22:13
I have had this work in the past, but I've recently Berkshelfed all my recipes and I can't figure out why it doesn't work now.
[2013-08-20T22:07:58+00:00] INFO: Processing directory[/opt/logstash/beaver] action create (logstash::beaver line 61)
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] created directory /opt/logstash/beaver
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] owner changed to 997
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] group changed to 997
[2013-08-20T22:07:58+00:00] INFO: Processing directory[/opt/logstash/beaver/etc] action create (logstash::beaver line 72)
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] created directory /opt/logstash/beaver/etc
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] owner changed to 997
[2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] group changed to 997
[2013-08-20T22:07:58+00:00] INFO: Processing directory[/var/log/logstash] action create (logstash::beaver line 72)
[2013-08-20T22:07:58+00:00] INFO: directory[/var/log/logstash] created directory /var/log/logst
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"
input {
file {
path => [ "/var/log/messages", "/var/log/kern.log" ]
type => "linux-syslog"
}
file {
path => "/var/log/apache2/access.log"
type => "apache-access"
}
@stevepereira
stevepereira / elasticsearch.rb
Created July 4, 2013 18:38
ElasticSearch role example
name "elasticsearch"
description "Install and configure elasticsearch"
run_list(
"role[network]",
"role[yum]",
"recipe[java]",
"recipe[elasticsearch]"
)
default_attributes({