Skip to content

Instantly share code, notes, and snippets.

vagrant box add f18 http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vf503-nocm.box --provider=vmware_fusion
vagrant box add centos64 http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box --provider=vmware_fusion
vagrant box add deb607 http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vf503-nocm.box --provider=vmware_fusion
vagrant box add deb70rc1 http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vf503-nocm.box --provider=vmware_fusion
vagrant box add u1004 http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-fusion503-nocm.box --provide=vmware_fusion
vagrant box add u1204 http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-svr-12042-x64-vf503-nocm.box --provider=vmware_fusion
@kylog
kylog / Vagrantfile
Last active December 19, 2015 02:19
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define :centos64Master do |centos64Master|
centos64Master.vm.box = "centos64"
end
config.vm.define :centos64 do |centos64|
centos64.vm.box = "centos64"
@kylog
kylog / gist:5882622
Last active December 19, 2015 02:19
# Create and bring up machines (not sure why I needed to specify the provider, it already knows)
vagrant up u1004 --provider=vmware_fusion
vagrant up u1204 --provider=vmware_fusion
vagrant up centos64 --provider=vmware_fusion
# Use
vagrant ssh u1004 -c 'uname -a'
vagrant ssh u1204 -c 'uname -a'
vagrant ssh centos64 -c 'uname -a'
@kylog
kylog / gist:5959294
Created July 9, 2013 17:21
This is part of .bash_kylo. The prompt stuff is WIP and there's some old code. The Darwin line is the most recently hacked on prompt. And note the sshk function which I use to carry the .bash_kylo file forward to move the prompt (and other stuff) to new hosts. All kinda hacky but works for now.
# Fun with prompts
# Ideas:
# http://www.maketecheasier.com/8-useful-and-interesting-bash-prompts/2009/09/04
# http://www.termsys.demon.co.uk/vtansi.htm
# http://slashdot.org/comments.pl?sid=108424&cid=9219400
#
RESET="\[\017\]"
NORMAL="\[\e[0m\]"
BRIRED="\[\e[1;31m\]"
@kylog
kylog / gist:6186612
Created August 8, 2013 17:13
Trivial catalog, about to hit the wire
{
"document_type": "Catalog",
"data": {
"tags": [
"settings"
],
"name": "kylo.local",
"version": 1375980974,
"environment": "production",
"resources": [
@kylog
kylog / gist:6519450
Created September 11, 2013 04:46
Retrieve a catalog in one step. Apply it as a later step.
[52] kylo@kylo 102118:puppetk (master) be puppet catalog download --confdir=$testdir/client/conf --vardir=$testdir/client/var --server localhost > random_catalog.json
[53] kylo@kylo 102119:puppetk (master) cat random_catalog.json
{"document_type":"Catalog","data":{"tags":["settings"],"name":"kylo","version":1378873144,"environment":"production","resources":[{"type":"Stage","title":"main","tags":["stage","main"],"exported":false},{"type":"Class","title":"Settings","tags":["class","settings"],"exported":false},{"type":"Class","title":"Main","tags":["class","main"],"exported":false,"parameters":{"name":"main"}},{"type":"File","title":"motd1","tags":["file","motd1","class"],"file":"/Users/kylo/devel/test/foo/master/conf/manifests/site.pp","line":5,"exported":false,"parameters":{"path":"/tmp/motd1","ensure":"file","content":"hello world\n"}},{"type":"File","title":"motd2","tags":["file","motd2","class"],"file":"/Users/kylo/devel/test/foo/master/conf/manifests/site.pp","line":12,"exported":false,"parameters":{"pat
@kylog
kylog / gist:6642029
Last active December 23, 2015 13:29
# get dependencies by installing current puppet, but then erase that puppet so it doesn't interfere
rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm
yum install -y puppet
yum erase -y puppet
# clone puppet
cd /root && git clone https://github.com/puppetlabs/puppet && cd puppet
# then try out different versions ...
git checkout 3.2.4
@kylog
kylog / Thin rack setup
Last active December 24, 2015 00:59
Steps for thin rack on osx. Cleanup needed.
# This is how I invoked thin, inside a puppet directory
#
# The ssl args are so the https termination is at thin; others use nginx for the ssl termination
# (btw, testdir=/Users/kylo/devel/test/foo)
# The -V and -D are just verbosity and debug
bundle exec thin -R ~/config.ru -p 8140 -V -D --ssl --ssl-key-file $testdir/master/conf/ssl/private_keys/localhost.pem --ssl-cert-file $testdir/master/conf/ssl/certs/localhost.pem start
# For some reason I had ssl unhappiness until I got a promiscuous auth.conf:
rspec ./spec/integration/util/windows/security_spec.rb:112 # Puppet::Util::Windows::Security file behaves like a securable object on a volume that supports ACLs for a normal user#supports_acl? should accept \\localhost\C$
rspec ./spec/integration/util/windows/security_spec.rb:112 # Puppet::Util::Windows::Security file behaves like a securable object on a volume that supports ACLs for a normal user#supports_acl? should accept \\127.0.0.1\C$\foo
rspec ./spec/integration/util/windows/security_spec.rb:112 # Puppet::Util::Windows::Security directory behaves like a securable object on a volume that supports ACLs for a normal user#supports_acl? should accept \\localhost\C$
rspec ./spec/integration/util/windows/security_spec.rb:112 # Puppet::Util::Windows::Security directory behaves like a securable object on a volume that supports ACLs for a normal user#supports_acl? should accept \\127.0.0.1\C$\foo
@kylog
kylog / after
Created January 13, 2014 22:53
pup1212 for command: puppet apply --trace --parser future --evaluator future -e 'notice("hello" + 10)'
Error: Evaluation Error: The value 'hello' cannot be converted to Numeric. at line 1:8 on node kylo.local
/Users/kylo/devel/puppet/lib/puppet/pops/issue_reporter.rb:56:in `assert_and_report'
/Users/kylo/devel/puppet/lib/puppet/pops/evaluator/runtime3_support.rb:474:in `accept'
/Users/kylo/devel/puppet/lib/puppet/pops/validation.rb:205:in `accept'
/Users/kylo/devel/puppet/lib/puppet/pops/evaluator/runtime3_support.rb:16:in `fail'
/Users/kylo/devel/puppet/lib/puppet/pops/evaluator/runtime3_support.rb:202:in `coerce_numeric'
/Users/kylo/devel/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:375:in `calculate'
/Users/kylo/devel/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:345:in `eval_ArithmeticExpression'
/Users/kylo/devel/puppet/lib/puppet/pops/visitor.rb:43:in `block in visit_this'
/Users/kylo/devel/puppet/lib/puppet/pops/visitor.rb:39:in `each'