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.
#!/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 |
input { | |
tcp { | |
type => "syslog" | |
port => 8514 | |
} | |
} | |
filter { | |
## DISCARD IMPROPERLY FORMATTED MESSAGES |
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.
- 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.
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.
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.
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.
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. | |
# |
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" |
#!/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 |