Skip to content

Instantly share code, notes, and snippets.

@trebortech
trebortech / GPG-Salt-Prod.md
Created February 18, 2016 01:25 — forked from ytjohn/GPG-Salt-Prod.md
GPG-Salt-Prod.md

GPG In Pillar

Include this file in the git repo with your pillar data. It provides instructions for those commiting code to securely save and commit senstive data (like password and private certs).

This the Salt Prod key:

key A1234567: "Salt Prod [email protected]"

@trebortech
trebortech / notes
Created February 15, 2016 15:58
Salt the easy way
The following instructions will help you easily deploy out a SaltStack Master server with some basic settings.
Step 1.
Install docker on your machine where you want to run your SaltStack master. If you want to run this on Windows you could install virtualbox and deploy our a Linux VM that has docker installed on it. Additional network setup instructions are available upon request.
https://docs.docker.com/engine/installation/
Step 2.
Confirm docker is installed and running correctly
@trebortech
trebortech / NOTES
Created November 5, 2015 03:14
VMWare Provider Example
Provider file
- The provider id name is tt-vmware
- This provider is using the vmware provider module as specified with provider: vmware
Profile file
- You might not need script_args unless you have problems bootstrapping the new instance. The line I have here installs a version from github using a tag version
- provider is the name I have as the id in the provider file NOT THE FILE NAME
- clonefrom is an image I already have ready in vSphere named Ubuntu-1404
@trebortech
trebortech / vbox.py
Created September 3, 2015 17:39
vbox python script to clone vm
def cloneVm(ctx, srcname, newname):
vbox = ctx['vb']
clonemode = ctx['const'].all_values('CloneMode')
sourcevm = vbox.findMachine(srcname)
mach = vbox.createMachine("", newname, [], sourcevm.OSTypeId, "")
clone = sourcevm.cloneTo(mach, clonemode['MachineState'], "")
mach.saveSettings()
print "created clone of machine with UUID", mach.id
vbox.registerMachine(mach)
# update cache