Skip to content

Instantly share code, notes, and snippets.

@tomdz
tomdz / gist:8053592
Created December 20, 2013 11:32
Packer debug output showing a fault when trying to compress a VirtualBox VM
vagrant-centos64-docker (vagrant): Compressing box...
2013/12/20 03:22:18 ui: vagrant-centos64-docker (vagrant): Compressing box...
2013/12/20 03:22:18 /Users/tdudziak/bin/packer-post-processor-vagrant: 2013/12/20 03:22:18 Turning dir into box: /var/folders/7v/fj0xwdn97qn1qq48y8dl7b_w0000gn/T/packer956984428 => vagrant-centos64-docker-vbox.box
2013/12/20 03:22:18 /Users/tdudziak/bin/packer-post-processor-vagrant: 2013/12/20 03:22:18 Compressing with gzip compression level: -1
2013/12/20 03:22:18 /Users/tdudziak/bin/packer-post-processor-vagrant: 2013/12/20 03:22:18 Skipping directory '/var/folders/7v/fj0xwdn97qn1qq48y8dl7b_w0000gn/T/packer956984428' for box 'vagrant-centos64-docker-vbox.box'
2013/12/20 03:22:18 /Users/tdudziak/bin/packer-post-processor-vagrant: 2013/12/20 03:22:18 Box add: '/var/folders/7v/fj0xwdn97qn1qq48y8dl7b_w0000gn/T/packer956984428/Vagrantfile' to 'vagrant-centos64-docker-vbox.box'
vagrant-centos64-docker (vagrant): Compressing: Vagrantfile
2013/12/20 03:22:18 ui: vagran
@tomdz
tomdz / gist:6396206
Created August 31, 2013 04:21
vmware tools installation log
vagrant-centos56: Creating a new VMware Tools installer database using the tar4 format.
vagrant-centos56:
vagrant-centos56: Installing VMware Tools.
vagrant-centos56:
vagrant-centos56: In which directory do you want to install the binary files?
vagrant-centos56: [/usr/bin]
vagrant-centos56:
vagrant-centos56: What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
vagrant-centos56: [/etc/rc.d]
vagrant-centos56:
#!/bin/sh
# linux firewall/forwarding
modprobe iptable_nat
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.10.10.1/2 -o eth0 -j MASQUERADE
# install openvpn
apt-get update && apt-get install -y openvpn
cd /etc/openvpn/
INSTANCE=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
openvpn --genkey --secret ${INSTANCE}.key
@tomdz
tomdz / gist:5339163
Last active January 22, 2016 12:03
Vagrant test setup for haproxy with ssl client certificates

Setup vagrant vm

vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init precise64
sed -i 's/# config.vm.network :hostonly/config.vm.network :hostonly/' Vagrantfile
vagrant up
vagrant ssh

Install base software and apache (to have something to proxy)

for service in chef-server-webui chef-expander chef-solr chef-server rabbitmq-server couchdb; do
service $service stop
done
# couchdb 1.0.1's ubuntu package has a known bug where it doesn't stop properly
pkill -u couchdb
for folder in /etc/couchdb /var/lib/chef /var/lib/couchdb /var/chef/cache /var/cache/chef /var/log/chef /var/log/couchdb /etc/chef; do
rm -rf $folder
done
rsync -avzi $RESTORE_DIR /
rm -fr /var/lib/rabbitmq/mnesia/*