Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile

Keybase proof

I hereby claim:

  • I am UtahDave on github.
  • I am utahdave (https://keybase.io/utahdave) on keybase.
  • I have a public key whose fingerprint is C670 DF2C 3C0C 3F14 93C9 7E5C F8A2 80B0 ACE2 1C3F

To claim this, I am signing this object:

@UtahDave
UtahDave / gist:10335251
Created April 10, 2014 01:19
This is a Salt Cloud map file that will create a brand new Salt Master with 3 new Salt Minions
rackspace_512:
dave-test-master:
make_master: True
dave-test-minion01:
retry_dns: 5
dave-test-minion02:
retry_dns: 5
dave-test-minion03:
retry_dns: 5
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:

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

#!/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):
{% set a = 'world' %}
{% set b = 'hello-{test}' %}
test:
file.touch:
- name: /tmp/{{ b.format(test=a) }}
@UtahDave
UtahDave / master config snippet
Created May 30, 2014 17:11
Example of using Salt Environments to only use _grains in the base environment.
file_roots:
base:
- /srv/salt/default_states
- /srv/salt/aws_stuff
vagrant:
- /srv/salt/default_states
Then place your aws specific custom grains in /srv/salt/aws_stuff/_grains
@UtahDave
UtahDave / gist:59eb47e12b113fce6398
Created June 16, 2014 19:34
Windows esky build process.
To make sure I get a clean install (Maybe I'm just paranoid)
1. delete all salt dirs from site-packages
2. delete salt/build and salt/dist from the repo clone
sudo python setup.py install --force
sudo python setup.py sdist
sudo python setup.py bdist
sudo python setup.py bdist_esky
@UtahDave
UtahDave / dev
Created June 26, 2014 21:45
Scenario 1 dev and prod are subdirectories of herlo
root@dasalt:/srv/salt/herlo# sudo salt-call state.top dev/devtop.sls
[INFO ] Executing command 'hostname' in directory '/root'
<-- snip -->
[INFO ] Completed state [nano] at time 15:39:31.434129
local:
----------
ID: nano
Function: pkg.installed
Result: True
Comment: The following packages were installed/updated: nano.
{
"title": "SSH",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#7EB26D",
"alias": "Success",
"pin": false,