Skip to content

Instantly share code, notes, and snippets.

@linickx
linickx / gist:3692156
Created September 10, 2012 17:01
hubot init script for RHEL / CENTOS
#!/bin/bash
# hubot
# chkconfig: 345 20 80
# description: hubot
# processname: hubot
# REFERENCE: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/
# This script assumes you have a user called "hubot" on your system and that hubot is installed in /opt/hubot
@reyjrar
reyjrar / logstash.conf
Created July 5, 2012 12:48
LogStash Configuration
input {
tcp {
type => "syslog"
port => 8514
}
}
filter {
## DISCARD IMPROPERLY FORMATTED MESSAGES
@actionjack
actionjack / Papercuts.md
Last active May 23, 2017 04:04
PAPERCUTS.md

Paper cuts

This is a log of things that have hurt us in the current environment that while not necessarily being technical debt, could possibly be things for us to discuss and possibly fix in the future.

Table of contents

Issue 1

Issue 2

@phrawzty
phrawzty / extant_infra_terraform.md
Last active June 16, 2017 00:40
Dealing with extant AWS resources in Terraform

What it is

Problem: Terraform doesn't play nicely with pre-existing infrastructure.

Solution: Officially there isn't one - but here's a work-around that does the trick.

Summary

  • Declare a new, temporary resource in your Terraform plan that is nearly identical to the extant resource.
  • Apply the plan, thus instantiating the temporary "twinned" resource and building a state file.
@mpasternacki
mpasternacki / README.md
Last active January 18, 2018 10:56
A Continuous Packaging Pipeline: The Materials

A Continuous Packaging Pipeline

A list of tools mentioned in my Ignite talk from Devopsdays Rome 2012 on a continuous packaging pipeline, with links and short description for each tool.

The talk slides are at https://speakerdeck.com/mpasternacki/a-continuous-packaging-pipeline; a longer blog post will be written soon.

Vendorificator

Available at https://github.com/3ofcoins/vendorificator/ or with gem install vendorificator

Include third party modules in your git repo, using pristine branches to sanely maintain local changes, upgrades, and merges.

@actionjack
actionjack / README-oneshot-systemd-service.md
Created September 7, 2018 15:17 — forked from drmalex07/README-oneshot-systemd-service.md
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

#! /usr/bin/ruby
# Query Foreman
# example usage:
#
# query for hosts
# ~~~~~~~~~~~~~~~
# $myhosts = foreman("hosts","facts.domain ~ lab")
# returns all hosts which have lab as part of their domain.
#
@jwalton
jwalton / REAMDE.md
Last active March 27, 2020 10:28 — forked from james/REAMDE.md
Pingdom widget for Dashing

Description

Simple Dashing widget (and associated job) to display Pingdom checks.

##Dependencies

rest-client

Add it to dashing's gemfile:

@ollyg
ollyg / logstash.conf
Created June 20, 2012 13:29
logstash config and filter to fully parse a syslog message (PRI, timestamp, host)
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
@scottslowe
scottslowe / lxc-ovsup
Created January 22, 2014 23:14
This script can be used to automatically attach LXC instances to Open vSwitch (OVS) on startup. You'll need to call this script from the container's configuration using the "lxc.network.script.up" configuration parameter.
#!/bin/bash
BRIDGE="br-int"
ovs-vsctl --may-exist add-br $BRIDGE
ovs-vsctl --if-exists del-port $BRIDGE $5
ovs-vsctl --may-exist add-port $BRIDGE $5