Skip to content

Instantly share code, notes, and snippets.

@tknerr
tknerr / gist:b2844befab22a5259931
Created January 17, 2015 19:24
running `bundle install` with different numer of `--jobs` and cpu cores assigned to the VM
4 jobs, 4 cpus
real 7m7.600s
user 19m12.659s
sys 3m24.444s
1 job, 4 cpus
real 11m3.151s
@tknerr
tknerr / cacert.pem
Created December 20, 2014 21:46
This is the cacert.pem from 20. August 2014, which still works with amazon S3. See here: https://github.com/opscode/chef-dk/issues/199
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla downloaded on: Wed Aug 20 03:12:04 2014
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
@tknerr
tknerr / vagrant-up.log
Created December 16, 2014 06:38
Vagrant Chef Solo Provisioner Changes Provisioning Paths between Up and Provision
D:\Repos\_github\bills-kitchen\target\build\repo\tmp>vagrant up
Bringing machine 'foo' up with 'virtualbox' provider...
==> foo: Importing base box 'chef/ubuntu-12.04-i386'...
==> foo: Matching MAC address for NAT networking...
==> foo: Setting the name of the VM: tmp_foo_1418711517976_72019
==> foo: Clearing any previously set network interfaces...
==> foo: Preparing network interfaces based on configuration...
foo: Adapter 1: nat
==> foo: Forwarding ports...
foo: 22 => 2222 (adapter 1)
@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:
@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 / 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 / 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 / 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 / vagrant-devstack-networking-hints.md
Last active September 30, 2021 06:58
Vagrant / DevStack Network Configuration
@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"