Skip to content

Instantly share code, notes, and snippets.

@tomdz
tomdz / gist:8053592
Created Dec 20, 2013
Packer debug output showing a fault when trying to compress a VirtualBox VM
View gist:8053592
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 Aug 31, 2013
vmware tools installation log
View gist:6396206
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:
View easy-ubuntu-openvpn.sh
#!/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 Jan 22, 2016
Vagrant test setup for haproxy with ssl client certificates
View gist:5339163

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)

View gist:4719383
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/*