Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile
export PYFLAKES_BUILTINS="__salt__,__opts__,__grains__,__pillars__,__context__"
Newrelic - install repo:
cmd.run:
- name: rpm -Uvh http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
- unless: rpm -qa | grep newrelic-repo
newrelic-sysmond:
pkg:
- installed
- require:
- cmd: Newrelic - install repo
#install instructions at https://newrelic.com/docs/server/server-monitor-installation-ubuntu-and-debian
base:
pkgrepo.managed:
- humanname: Newrelic PPA
- name: deb http://apt.newrelic.com/debian/ newrelic non-free
# - dist: precise
- file: /etc/apt/sources.list.d/newrelic.list
- keyid: 548C16BF
# - keyserver: subkeys.pgp.net
{
"title": "SSH",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#7EB26D",
"alias": "Success",
"pin": false,
{% set a = 'world' %}
{% set b = 'hello-{test}' %}
test:
file.touch:
- name: /tmp/{{ b.format(test=a) }}
#!/usr/bin/env python
# coding: utf-8
'''
A minimal but thorough example of a CherryPy app.
'''
import cherrypy
class Root(object):
@cherrypy.expose
def index(self):

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment

locale-gen en_US.UTF-8: # Locale must exist
cmd.run:
- unless: locale -a | grep -q en_US.utf8
en_US.UTF-8:
locale.system:
- require:
- cmd: locale-gen en_US.UTF-8
postgresql:
<contents of normal file>
# Add any additional locations to look for master runners
runner_dirs: [/srv/runners]
# Register a reactor whenever a cloud provider emits 'created'
# the * is the name of the VM, we want any, but you could
# do something like salt/cloud/Webservers-*/created if you only
# wanted your webservers
reactor:
available_zones:
loc.wiked.org:
file: db.loc.wiked.org
masters: "172.23.5.13"
5.23.172.in-addr.arpa:
file: db.172.23.5
masters: "172.23.5.13"