Skip to content

Instantly share code, notes, and snippets.

@francisluong francisluong/Vagrantfile
Last active Sep 19, 2015

Embed
What would you like to do?
Vagrant Bootstrapping for Ubuntu
#!/usr/bin/env bash
su - vagrant -c "/bin/bash /vagrant/ubootstrap_user.sh"
#!/usr/bin/env bash
echo ">>> ubuntu root setup"
echo " update all packages"
sudo apt-get update -y
sudo apt-get upgrade -y
echo " install some packages too"
sudo apt-get install -y \
vim \
git \
openssh-client \
make \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
chromium-browser
echo "<<< ubuntu root setup"
echo " install pyenv"
cd ~
rm -Rf ~/.pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
source ~/.bashrc
PYENVBIN=~/.pyenv/bin/pyenv
$PYENVBIN install 2.7.8
$PYENVBIN global 2.7.8
$PYENVBIN versions
echo " install rvm with ruby"
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
echo "<<< ubuntu user setup"
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "public_network"
config.vm.synced_folder "../data", "/vagrant_data"
config.vm.provision :shell, path: "ubootstrap.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.