Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
#!py
import pprint
import yaml
space_character = " "
def run():
'''
Print the config files
'''
t = {
#!/usr/bin/env python
'''
Support for deploying an application
'''
# Import python libs
import os
import argparse
import re
import logging
import tempfile
# This would go in /etc/salt/master
file_roots:
base:
- /srv/salt/base
dev:
- /srv/salt/dev
- /srv/salt/qa
- /srv/salt/base
qa:
#!/bin/sh
trap '[ -f patch.$$ ] && patch -R < patch.$$' 0
PATH="$PATH:`pwd`/patchelf/src"
set -e
#exec >/dev/null
[ -f setup.py ] || { printf "You seem to be in the wrong directory.\n"} >&2; exit 1; }
if ! which patchelf >/dev/null 2>&1; then
printf "Couldn't find 'patchelf', going to download and compile.\n" >&2
git clone https://github.com/NixOS/patchelf
(
"""
This enables us to call the minions and search for a specific role
"""
import logging
# Import salt libs
import salt.utils
import salt.payload
#!/bin/bash
# /usr/local/bin/clone-prep
# vanilla-sl6.khresear.ch
#
# Clone preparation script
#
# Do not run if this machine is still named Vailla
if [ "$(hostname)" == "vanilla-sl6.khresear.ch" ]
then
@UtahDave
UtahDave / gist:6032439
Last active December 19, 2015 23:08 — forked from dginther/gist:6032369
mysql:
pkg:
- installed
- names:
- mysql-server
- mysql-client
- require:
- pkg: python-mysqldb
- debconf: 'mysql-debconf'
service:
@UtahDave
UtahDave / mult-line cmd.run
Last active December 20, 2015 11:39
Multi-line cmd.run wget->tar->rm->cd->make
'''
Redhost functionality
'''
# Import salt libs
import salt.utils
def install_redis():
'''

Description

Have you ever wanted to have a Vagrant workspace with more than one Virtual Machine, and managed by Salt Stack? I did, but the documentation is not all there yet.

I managed to make it work with the following, hope it will be useful.

To use

See the Complete salty-vagrant setup, but use the current Vagrantfile to have two machines.