Last active
August 29, 2015 14:02
-
-
Save tknerr/9e9b627b1109cfd094ec to your computer and use it in GitHub Desktop.
Additional setup to make a codebox.io Ruby box (Ubuntu 12.10) ready for Chef / Vagrant development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 | |
| export TMP=/var/tmp | |
| # update package lists | |
| sudo apt-get update | |
| # install chef-dk | |
| wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.1.0-1_amd64.deb -O chefdk.deb | |
| sudo dpkg -i chefdk.deb | |
| rm chefdk.deb | |
| # install vagrant | |
| wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3_x86_64.deb -O vagrant.deb | |
| sudo dpkg -i vagrant.deb | |
| rm vagrant.deb | |
| # install lxc | |
| sudo apt-get install lxc redir btrfs-tools apparmor-utils linux-image-generic linux-headers-generic | |
| sudo aa-complain /usr/bin/lxc-start | |
| # install vagrant-lxc plugin | |
| vagrant plugin install vagrant-lxc --plugin-version 1.0.0.alpha.2 | |
| # set lxc as the default provider | |
| export VAGRANT_DEFAULT_PROVIDER=lxc | |
| # sample Vagrantfile | |
| cat << EOF > Vagrantfile | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "fgrehm/precise64-lxc" | |
| config.vm.provider :lxc do |lxc| | |
| lxc.backingstore = 'none' # not supported on lxc < 1.0 | |
| lxc.container_name = 'foo' | |
| end | |
| end | |
| EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment