Skip to content

Instantly share code, notes, and snippets.

@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 / vagrant-devstack-networking-hints.md
Last active September 30, 2021 06:58
Vagrant / DevStack Network Configuration
@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 / Notes.md
Last active March 30, 2024 06:56
groovy script classpath problem

I have the following file structure:

Y:\tmp\test
|   main.groovy
|
\---impl
        FooImpl.groovy
@tknerr
tknerr / install_ansible.sh
Created December 10, 2014 16:57
Shell script for installing ansible. Should be idempotent and work ob Ubuntu + CentOS. Based on https://github.com/vovimayhem/vagrant-guest_ansible/pull/6/files#diff-0
#!/bin/bash
if ! command -v ansible >/dev/null; then
echo "Installing Ansible dependencies and Git."
if command -v yum >/dev/null; then
sudo yum install -y git python python-devel
elif command -v apt-get >/dev/null; then
sudo apt-get update -qq
#sudo apt-get install -y -qq git python-yaml python-paramiko python-jinja2
sudo apt-get install -y -qq git python python-dev
@tknerr
tknerr / README.md
Last active January 23, 2024 16:42
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

@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: