Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile
@UtahDave
UtahDave / gist:23caa5614119a2753436
Created July 15, 2014 01:48
docker profile and map
# cat /etc/salt/cloud.profiles
do_512_git:
provider: do
size: 512MB
image: Ubuntu 12.04.4 x64
location: New York 1
script_args: '-- git develop'
# cat /etc/salt/docker.map
rackspace_8GB:
- sun
- mars
- pluto
- venus
#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
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
export PYFLAKES_BUILTINS="__salt__,__opts__,__grains__,__pillars__,__context__"
@UtahDave
UtahDave / rethinkdb.sls
Last active August 29, 2015 14:04
Salt State for RethinkDB on Ubuntu
setup_repo:
pkgrepo.managed:
- humanname: RethinkDB Repo
- name: deb http://download.rethinkdb.com/apt {{ grains['oscodename'] }} main
- file: /etc/apt/sources.list.d/rethinkdb.list
- key_url: http://download.rethinkdb.com/apt/pubkey.gpg
- require_in:
- pkg: rethinkdb
rethinkdb:
@UtahDave
UtahDave / gist:21326a28dd0295c17851
Created August 6, 2014 16:26
Salt example using "names"
create_dirs:
file:
- directory
- names:
- /tmp/dir1
- /tmp/dir2
- /tmp/dir100
- user: root
- group: root
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "mwrock/Windows2012R2"
config.vm.box_url = "https://vagrantcloud.com/mwrock/Windows2012R2/version/1/provider/hyperv.box"
# Change "." to a local folder you want to sync
config.vm.synced_folder ".", "/chocolateypackages", disabled: true
{
"rootDir": "{{ salt['pillar.get']('aptly:rootdir') }}",
"downloadConcurrency": 4,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
@UtahDave
UtahDave / cli
Created August 25, 2014 17:12
Example of passing pillar data on the command line
salt '*' state.highstate pillar='{"cheese": "spam"}'