Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
inthecloud247 / gist:4569472
Created January 18, 2013 23:08
my salt top.sls file that handles multiple environments...
#!mako|yaml
base:
'*':
- base.services
- base.states
'environment:localdev':
- match: grain
- localdev.services
snmpd:
pkg.installed:
- name: {{ pillar['snmpd'] }}
- order: 1
/etc/snmp/snmpd.conf:
file.managed:
- source: salt://etc/snmp/snmpd.conf
- template: jinja
- requires:
# Include the instantiated macro here
include:
- pkg_repo.10gen
mongo-10gen-server:
pkg:
- installed
- require:
- file: 'pkg_repo.10gen'
{% macro postconf(key, value) -%}
postconf-{{ key }}:
cmd:
- run
- name:
- postconf -e {{ key }}='{{ value }}'
- unless: test "x$(postconf -h {{ key }} )" = 'x{{ value }}'
- require:
- pkg: postfix
apt-update:
cmd:
- run
- name: /usr/bin/apt-get update
- onlyif: /bin/false
@inthecloud247
inthecloud247 / net.conf
Created February 11, 2013 08:21 — forked from rca/net.conf
addr={{ pillar['shoe']['network'].addr }}

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Creating a dynamic site-to-site VPN with OpenSwan on Ubuntu 10.04 on EC2

Wes Winham [email protected]

There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.

salt-minion:
pkg:
- installed
service:
- running
- require:
- pkg: salt-minion
- watch:
- file: /etc/salt/minion.d/grains.conf
# salt-minion.conf
description "salt-minion upstart daemon"
author "Jeff Bauer <[email protected]>"
# copy this file to /etc/init
start on (net-device-up and local-filesystems)
stop on shutdown
expect fork