Skip to content

Instantly share code, notes, and snippets.

@tknerr
tknerr / install.sh
Last active August 29, 2015 13:56
Latest https://www.opscode.com/chef/install.sh (25/02/2013) with modifications to make it play nicely with vagrant-cachier #13
#!/bin/sh
# WARNING: REQUIRES /bin/sh
#
# - must run on /bin/sh on solaris 9
# - must run on /bin/sh on AIX 6.x
# - if you think you are a bash wizard, you probably do not understand
# this programming language. do not touch.
# - if you are under 40, get peer review from your elders.
#
# Author:: Tyler Cloke (tyler@opscode.com)
@tknerr
tknerr / Teaser.md
Last active August 29, 2015 14:01
Vagrant / Chef Workshop Teaser

Vagrant / Chef Workshop

This DevOps / Infrastructure-As-Code with #Vagrant and #Chef workshop is all about automation, configuration management and being able to spin up everything from single servers to whole infrastructures at the push of a button.

Why?

Because your infrastructure should be:

  • reliably and repeatedly reproducible
  • described in a human readable DSL
@tknerr
tknerr / chef-vagrant-codebox.sh
Last active August 29, 2015 14:02
Additional setup to make a codebox.io Ruby box (Ubuntu 12.10) ready for Chef / Vagrant development
# show system info
cat /etc/lsb-release
uname -a
# set locale to UTF-8
locale -a
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
# TMP is unset, makes vagrant use . instead
@tknerr
tknerr / log
Last active August 29, 2015 14:02
debug output of running `vagrant up --debug &> log` for github issue https://github.com/fgrehm/vagrant-lxc/issues/290
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
@tknerr
tknerr / log
Last active August 29, 2015 14:04
upload to supermarket via stove fails
D:\Repos\_github\_cookbooks\sample-toplevel-cookbook>stove --category Other -l debug
DL is deprecated, please use Fiddle
Stove::Cli | ===> Options: {:endpoint=>nil, :username=>"tknerr", :key=>"C:\\Users\\tkn\\.chef\\tknerr.pem", :category=>"Other", :remote=>"origin", :branch=>"master", :sign=>false, :log_level=>"debug", :path=>"D:/Repos/_github/_cookbooks/sample-toplevel-cookbook", :version=>nil}
Stove::Cli | ===> ARGV: []
Stove::Runner | ===> Running plugin `:git'
Stove::Validator | ===> Running validations for `git.repository'
Stove::Validator | Validation repository passed!
Stove::Validator | ===> Running validations for `git.clean'
Stove::Plugin::Git | Running `git status -s 2>NUL', errors: false
Stove::Validator | Validation clean passed!
@tknerr
tknerr / Vagrantfile
Created July 22, 2014 09:40
Setting up N load-balanced apaches in 42 lines of Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "chef/ubuntu-12.04"
# load balancer VM
config.vm.define "lb" do |lb_config|
lb_config.vm.network "private_network", ip: "192.168.40.90"
lb_config.vm.provision "shell", inline: <<-EOF
sudo apt-get update
sudo apt-get install nginx -y
@tknerr
tknerr / README.md
Created July 30, 2014 06:16
Sample Workshop Excercise

Vagrant Basic Commands

Goal

Getting familiar with the Vagrant commandline interface

Excercise!

  • list the subcommands vagrant has
  • show the help / usage instructions for vagrant init
@tknerr
tknerr / Vagrantfile
Created August 23, 2014 08:34
Repro for chef/bento#232 with Vagrant 1.6.3
Vagrant.configure("2") do |config|
# x64 box works as expected
config.vm.define :works do |c|
c.vm.box = "chef/ubuntu-14.04"
end
# i386 box fails when mounting shared folders
config.vm.define :broken do |c|
c.vm.box = "chef/ubuntu-14.04-i386"
@tknerr
tknerr / Vagrantfile
Created October 9, 2014 05:26
Devstackomat - a Vagrantfile to bring up DevStack
# -*- mode: ruby -*-
# vi: set ft=ruby :
HOST_IP = "192.168.33.2"
VM_NET = "192.168.27"
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
# set the hostname, otherwise qrouter will be lost upon reload
@tknerr
tknerr / log
Last active August 29, 2015 14:11
Failing tests when running `rake test` on org-binbab/gem-vagrant-wrapper
D:\Repos\_github\gem-vagrant-wrapper>rake test
.....*....F...........FFFF
Pending:
VagrantWrapper#vagrant_version system search path returns a version less than 1.1
# missing support files
# ./spec/vagrant_wrapper_spec.rb:72
Failures: